Skip to content

Nameservers: what changes when you switch them

Your nameservers decide who’s in charge of your DNS. What they are, what happens when you move them to Cloudflare, and how to do it without breaking email.

Written by 3 min read

Browse all guides

The short version

Nameservers are the servers that hold your domain’s DNS records. Your registrar tells the internet which nameservers to ask.

Switching nameservers, for example to Cloudflare, moves your whole DNS to a new home. It’s safe as long as every record is copied over first, and it can take up to a day or two to settle everywhere.

What nameservers are

Your DNS records have to live somewhere. The servers that hold them and answer questions about them are your . They usually come in pairs, with names like ns1.yourregistrar.com or ada.ns.cloudflare.com.

At your , there’s a setting that says which nameservers are in charge of your domain. By default it’s the registrar’s own. Change that setting, and a different company runs your DNS.

What changes when you switch to Cloudflare

Before and after a nameserver change

Before

  1. Registrarkeeps your name
  2. uses its own nameservers
  3. Registrar’s DNSholds your records
  4. points to
  5. Website and email

After

  1. Registrarstill keeps your name
  2. points to Cloudflare’s nameservers
  3. Cloudflare DNSnow holds your records
  4. points to
  5. Website and email
Your domain stays registered where it is. Only the job of answering DNS moves.
  • Your domain doesn’t move. It stays registered, and renewed, at your registrar.
  • Your records move. From now on you edit DNS in Cloudflare, not at the registrar. Records left at the registrar stop mattering.
  • **Cloudflare creates a ** for your domain: the full set of its records, plus Cloudflare’s security and speed settings.

Doing it safely

  1. Copy every record first. Cloudflare scans for existing records when you add a domain, but it can miss some. Compare the list with your registrar’s, especially and records for email.
  2. Change the nameservers at the registrar to the two Cloudflare gives you.
  3. Wait. Cloudflare emails you when the domain is active. Most changes are picked up within hours, but it can take up to 24 to 48 hours everywhere.
  4. Test the website, and send yourself an email from an outside account.

How a nameserver change spreads

  1. Minute 0

    You save the new nameservers at your registrar

  2. Usually within minutes

    The registry publishes the change

    The .com (or other ending) servers start pointing to the new nameservers.

  3. Often within a few hours

    Most of the internet has caught up

    Resolvers that hadn’t saved the old answer go straight to the new nameservers.

  4. Up to 24 to 48 hours

    The last saved copies expire

    Everyone now asks the new nameservers. Cloudflare emails you when your domain is active.

Timings are typical, not guaranteed. Your site and email keep working the whole time if both sets of nameservers hold the same records.

Do it yourself

Change your nameservers yourself

  1. Get your two new nameservers from the new DNS provider. Cloudflare shows them when you add your domain.
  2. Check that every record has been copied to the new provider first, especially email (MX and TXT) records.
  3. Log in to your registrar and find your domain’s Nameservers setting. Choose the option for custom nameservers.
  4. Replace the existing nameservers with the two new ones, exactly as written, and save.
  5. Wait, then check with whatsmydns.net (opens in a new tab). Test your website and send yourself an email from an outside account.

Or we can do it for you as part of the Cloudflare setup add-on, on a free Cloudflare account in your name.

Go deeperDelegation, propagation, and DNSSEC
  • Delegation. Your registrar sends the new nameservers to the registry, which publishes them as in the TLD zone. Resolvers follow that delegation to find your authoritative nameservers.
  • Why it’s slow. The TLD’s NS records for your domain often carry a TTL of a day or two, so resolvers that cached the old delegation keep using it until it expires. That’s what really means: old cached answers aging out.
  • Lower TTLs ahead of time. If you control the old DNS, lowering record TTLs a day before a change shortens the overlap for individual records. It doesn’t speed up the NS change itself.
  • DNSSEC. If is on at the registrar, turn it off before switching nameservers, then turn it back on with the new provider’s settings. Leaving the old DS record in place can make your domain fail to resolve for resolvers that check signatures.

Sources and further reading

Want a website you don’t have to worry about?

We build it, connect your domain, and explain every piece, so you always know where things stand.