# Change a domain's nameservers

> Point a domain registered with Coritan at Coritan's nameservers or at another DNS provider's.

Source: https://docs.coritan.com/websites/domains/change-nameservers/

In the dashboard:

- /dashboard/websites/…/settings: https://www.coritan.com/dashboard/websites

A domain's nameservers decide which DNS provider answers for it. Change them when you move the domain's DNS to another provider, or back to Coritan. This page covers domains registered with Coritan; for a domain registered elsewhere, change its nameservers at that registrar.

## Before you begin

- The registration must be `active` ([Statuses](/websites/domains/#statuses)).
- Make sure the new provider already holds the domain's records. Resolvers follow the new nameservers as soon as they see them.
- To use Coritan's DNS, the domain needs a zone on Coritan. The **DNS zone** row of the **Registration** card says **Hosted here** when it has one. If it does not, [add the domain as an existing domain](/websites/add-an-existing-domain/) first.

## Change the nameservers

1. In the dashboard, go to [Websites](https://www.coritan.com/dashboard/websites), open the domain and select the **Settings** tab.
2. In the **Nameservers** card, select **Edit nameservers**.
3. Change the nameservers:
   - Type over a nameserver to replace it, such as `ns1.example.net`.
   - Select **Add nameserver** to add another, up to 13.
   - Select the remove button beside a nameserver to take it off the list. The card keeps at least two.
4. Select **Save nameservers**.

To go back to Coritan's DNS, enter `ns1.coritan.com` to `ns8.coritan.com`.

## Result

The dashboard confirms that the nameservers are saved, and the card lists the new set. Resolvers keep the old nameservers until their cached answers expire. Check what the registry now publishes from a terminal:

```bash
dig NS example.com +short
```

Once the domain points elsewhere, the records on its **DNS** tab no longer answer for it, and neither do Coritan's load balancers and proxied records for its names.

## Troubleshooting

`Enter at least two nameservers.`, `Enter at most 13 nameservers.` or `Fill in every nameserver, or remove the empty ones.`
: A domain takes 2–13 nameservers, and none of them can be empty.

`Registration not found`
: The registration is not `active`. See [Statuses](/websites/domains/#statuses).

`Failed to update nameservers: …`
: The registry refused the change or did not answer. Check that each name is a working nameserver, then try again.

## Related

- [How DNS hosting works](/websites/dns/)
- [Transfer a domain to another registrar](/websites/domains/transfer-a-domain-away/)

## With the API

Send the full list, from 2 to 13 names. Coritan lowercases them and drops a trailing dot.

```bash
curl -X PUT https://api.coritan.com/api/v1/domains/registrations/7/nameservers \
  -H "Authorization: Bearer $CORITAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"nameservers": ["ns1.example.net", "ns2.example.net"]}'
```

```json
{"message": "Nameservers updated", "domain": "example.com", "nameservers": ["ns1.example.net", "ns2.example.net"]}
```

## API

- `PUT /api/v1/domains/registrations/{reg_id}/nameservers`: Update nameservers for a domain (https://docs.coritan.com/api/reference/client/domains/#op-put-api-v1-domains-registrations-reg-id-nameservers)
