# remove()

Canonical URL: https://developers.iagenify.com/sdk/ref/domains/remove/
Language: en

`api.domains.remove(id) → Promise<{ ok: true }>`

Detaches the domain: its zone leaves us. The domain itself stays the customer's.

Status: the zone goes · the domain stays theirs · point the registrar elsewhere first

```javascript
await api.domains.remove("example.com");
```

## The order matters {#order}

> **Move the nameservers before detaching, not after**
>
> While the registrar still points here and the zone is gone, the domain resolves to nothing: the site, the mail and everything else stop. Point the registrar at its new home first, then detach.

## What goes with it {#what-goes}

- The zone, and every record in it.
- The mail hosts configured on it — and mailboxes on those hosts stop receiving.
- Any hostname served through it.

## The registration is untouched {#domain-stays}

We hold DNS, not the registration. Detaching changes nothing at the registrar and nothing about who owns the name.

## A zone that existed before us is not destroyed {#adopted}

A domain whose zone was already here when it was attached keeps it. Its records were not ours to create and they are not ours to delete.

- [domain.remove()](/sdk/ref/domain/remove): The same thing from the object.
- [api.domains](/sdk/ref/domains): Searching, attaching, listing.

```python
api.domains.remove("example.com")
```
