How to Change Nameservers in Cloudflare

Change the nameservers of a domain in Cloudflare without downtime: what to copy first, where to click and why DNSSEC can break it.

October 3, 20263 min readCloudflare · Nameservers · DNS

The short answer. Open the nameserver settings for the domain in Cloudflare, switch to custom nameservers, enter the ones your new DNS host gave you and save. Copy your DNS records to the new host first, or the website and email stop working.


Before You Change Nameservers

Nameservers decide which company answers every DNS question for the domain: the website, email and every record. Changing them moves all of that at once. The new nameservers start with whatever records they hold, not the ones you have now.

Get Ready First

Do these four things first, in this order:

  1. Recreate every record at the new host. Export or write down the existing records, in particular A, CNAME, MX and TXT.
  2. Check DNSSEC. If DNSSEC is on, turn it off at the registrar, or add the new host’s key, before you change the nameservers. A leftover DS record makes the domain fail to resolve.
  3. Lower the TTL of important records a day ahead if you can, so mistakes are quick to fix.
  4. Pick a quiet time. The change is accepted at once, but caches of the old nameservers expire over up to 48 hours.

The Nameservers to Enter

FieldValue
SettingNameservers (custom)
EntriesTwo or more, as your new DNS host gives them
Examplens1.example-dns.com and ns2.example-dns.com
ns1.example-dns.com
ns2.example-dns.com

Step by Step in Cloudflare

Step 1. Get the nameservers Cloudflare assigned

To move a domain to Cloudflare, add it under Add a domain, let Cloudflare scan the records and review them. The last step shows the two nameservers assigned to your account, such as ada.ns.cloudflare.com and bob.ns.cloudflare.com. Yours will differ.

Step 2. Enter them at the registrar

Sign in to the company where the domain is registered, open its Nameservers setting, choose custom nameservers and enter both. Back in Cloudflare click Done, check nameservers. If the domain is registered with Cloudflare, nothing needs changing: it already uses them.

Step 3. Moving away from Cloudflare

For a domain registered at Cloudflare, open Domain Registration › Manage Domains, choose the domain, then Configuration and set the new nameservers. For a domain registered elsewhere, change them at that registrar instead; Cloudflare itself cannot.

Common Mistakes

  • Changing the nameservers before the records exist at the new host. The site and mail go dark until you add them.
  • Leaving DNSSEC switched on when moving to a host that does not sign the domain. Many resolvers then refuse to answer for it.
  • Mixing old and new nameservers. Entries from two hosts return different answers.
  • Adding records at the old host afterwards and wondering why nothing changes. Once the nameservers change, records are edited at the new host.
  • Typing a nameserver with a typo or a trailing space. Copy them instead of typing them.

Check That It Worked

Look up the NS records of the domain. They should list the new nameservers; during the change, you may see either set for a while. Then check that the website and mail still work. Changes show up as caches expire, usually within minutes for a record and up to two days for nameservers, see how long DNS propagation takes.

More Cloudflare DNS Guides

The same task elsewhere: Namecheap, GoDaddy, Hostinger, Squarespace.

Menu names last checked October 2026. Providers rename things now and then; if a label differs, look for the closest match.

Get told when nameservers change.

Axath watches the nameservers of every domain in your Hub and alerts you when they change, so a move you did not make never goes unnoticed.

Open the Domain Hub

ImprintPrivacy