# set_domain_nameservers

Source: https://modulify.ai/docs/mcp/bought-domains/set-domain-nameservers

Points a domain the workspace bought at the nameservers of another DNS host, or back at Modulify's.

- Title: Change the nameservers of a bought domain
- Scope: `domains:write`
- Access: Destructive

Pass `nameservers`, 2 to 13 different full hostnames from your DNS host, or `reset` true to switch back to Modulify's nameservers, its `DefaultNameservers`. A nameserver that is the domain itself or a name under it is refused, for example `ns1.acme.com is under acme.com itself, so it cannot be one of its nameservers!`

Moving away deletes no record, but the records `list_dns_records` shows stop answering, and so do the sites and email that rely on them, until the same records exist at the new host or the domain is switched back. The tool tells the client to confirm with you first. While the domain uses other nameservers, Modulify stops managing the records of the workspace's sites and email domains on it, so they have to be added at the new host, and switching back brings them up to date straight away.

The change can take up to 48 hours to reach every network. The answer is the domain as `get_bought_domain` reads it. It needs the **Manage domains** permission, and the domain must be `active` or `expiring`. The workspace can make 30 domain changes a minute, shared with the **Domains** page and covering DNS records, nameservers, the registrant, the transfer lock, auto-renew and transfer codes, and a refusal says how long to wait. See [Change the nameservers](https://modulify.ai/docs/publish/manage-dns#change-the-nameservers).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | string | Yes | The workspace that owns the domain. |
| `domainId` | string | Yes | The `_id` of the bought domain, from `list_bought_domains`. |
| `nameservers` | array of strings | No | The new nameservers, 2 to 13 full hostnames such as `ns1.example.net`, each up to 253 characters. Leave it out when `reset` is true. |
| `reset` | boolean | No | True switches the domain back to Modulify's nameservers and ignores `nameservers`. |