Tutorial · cloudflare · Published 2026-08-15 · 3 min read

Preparing nameservers for Cloudflare

Prepare nameservers before moving a domain to Cloudflare. Export DNS records, lower TTL, verify delegation, and cut over without downtime.

What moving nameservers does

When you move your domain's authoritative nameservers to Cloudflare, the new zone starts answering DNS. Both the old and the new nameserver sets may be delegated for a while because TTL defaults and cascading resolvers hold the old answer.

Do this only after you added the DNS records to the Cloudflare zone, because Cloudflare serves them from the moment delegation switches. Empty or partial zones create a window where the domain resolves nothing.

Before you start

  1. Export the current DNS from your registrar or old provider. You need every A, AAAA, CNAME, MX, TXT, SRV and the like, exactly as they were.
  2. Copy them into the Cloudflare zone and check proxied status. Keep exact values: an MX without the mail host, or a TXT with the truncated value, breaks mail.
  3. Lower TTL to 300 (5 minutes) on the records you will cut over, at least 24 hours before the switch, so the edge does not store the old answer too long.
  4. Freeze DNS edits during the window. Do not add a record to the old provider after you lower TTL, then expect the change to arrive later, split-brain will bite.

The night of the swap

  1. Open the registrar's nameserver page and replace the old nameservers with the two (or more) Cloudflare nameservers Cloudflare assigned to the zone, for example:
anya.ns.cloudflare.com
jay.ns.cloudflare.com
  1. Save. The registrar waits. Often a confirmation email or a . end-state is returned.
  2. Confirm the domain in the dashboard even before propagation completes. Cloudflare shows "active" once it answers the domain, although global resolvers still take minutes to catch up.

| Step | Who | What you get |

| Registrar | You now | New delegation submitted |

| Cloudflare | Dashboard | Zone shows the assigned NS |

| Worldwide | Everyone else | Old cache answers until TTL |

Verify the zone is serving

  1. After the switch, run a local query against the new nameservers directly:
nslookup -type=ns example.com anya.ns.cloudflare.com
nslookup www.example.com anya.ns.cloudflare.com
  1. Compare answers for a few records across the old and new. For a domain that uses email, mail must point at the exact same MX that ran before the move.
  2. Probe the mail servers: nslookup -type=mx example.com. Push tests after the switch to confirm mail flows and deliverability rather than only the MX lookup.

Common mistakes

After the move

Need a website built, fixed, optimised, migrated or replaced?

This technical resource is written by CSMBAC, a small design and development studio. If you would rather hand the problem to a professional, the website service page explains how we build enquiry-ready websites.

Explore website services