▲ Quick answer

To change your domain’s nameservers, first re-create your DNS records (A, CNAME, MX, TXT) at the new provider. Then log into your registrar, open the domain’s DNS or nameserver settings, replace the existing nameservers with the new ones, and save. The change can take up to 24–48 hours to propagate. Confirm it with a WHOIS or RDAP lookup, which will show the new nameservers once the registry updates.

Your registrar is where you own the domain, but your nameservers decide who actually answers questions about it. The two are often the same company by default, which is why many people never touch nameservers at all. You change them when you want a different provider to run your DNS — a web host that wants to manage records for you, a CDN such as Cloudflare, or a dedicated DNS service chosen for speed or reliability.

Nameserver

A DNS server that is authoritative for your domain — the server the rest of the internet asks for the domain’s records. Each domain is delegated to a set of nameservers (commonly named like ns1. and ns2.), and whichever provider runs those nameservers controls the domain’s DNS records.

Why would you change nameservers?

Changing nameservers is about moving where your DNS is managed, not changing what your domain is. There are a handful of common reasons:

  • Moving DNS to your web host. Many hosts ask you to point the domain at their nameservers so they can manage records automatically when you set up a site or mailbox.
  • Putting a CDN in front of your site. Services like Cloudflare typically take over your DNS by giving you their nameservers, so they can proxy and accelerate traffic.
  • Using a dedicated DNS provider. Some operators choose a specialist DNS service for faster global resolution, redundancy, or advanced routing.

If you only need to repoint your website or update mail, you usually don’t need to touch nameservers at all — you just edit the DNS records at whoever is already authoritative. Changing nameservers is the bigger move: it hands the whole zone to a new provider.

!

Changing nameservers replaces ALL your DNS records

This is the single most important thing to understand. When you switch nameservers, control of your entire DNS zone moves to the new provider — and that provider starts fresh. Your old A, CNAME, MX and TXT records do not follow the nameservers. Re-create everything you depend on at the new provider first, or your website and email can go dark the moment the change takes effect.

Step-by-step: changing your nameservers

The actual switch is a short form at your registrar. The preparation is what matters:

  1. Record your current DNS. At your existing DNS provider, list every active record — the A/AAAA records that point your site, the CNAMEs, the MX records for email, and any TXT records (SPF, DKIM, domain verification). Screenshot or export them.
  2. Re-create those records at the new provider. Add the same records in the new DNS host or CDN dashboard before changing anything at the registrar. This way the new nameservers already answer correctly when delegation moves.
  3. Log into your registrar. Open your account and find the domain you want to change.
  4. Find the DNS / Nameserver settings. Look for a section labelled “Nameservers”, “DNS”, or “Manage DNS”. Choose the option to use custom nameservers.
  5. Replace the existing nameservers. Delete the current entries and enter the ones your new provider gave you — usually at least two, such as ns1.newprovider.com and ns2.newprovider.com.
  6. Save the change. Confirm and submit. The registrar sends the updated delegation to the registry that runs your TLD.

That’s the whole operation. The new provider is now authoritative for your domain, and because you pre-built the records, the transition should be seamless.

i

Glue records and custom nameservers

Most people use their provider’s named nameservers and never think about glue. But if you run your own nameservers inside the domain they serve — for example ns1.example.com hosting example.com itself — resolvers hit a chicken-and-egg problem: to find the nameserver they’d need to resolve the very domain it serves. Glue records solve this by storing those nameservers’ IP addresses at the registry, which you register through your registrar (often called “register a host” or “private nameservers”). Using a host’s or Cloudflare’s nameservers means glue is handled for you.

Propagation and verifying the change

A nameserver change is not instant everywhere. The delegation update has to leave the registry and reach resolvers worldwide, and older cached answers expire on their own schedule. In practice the switch is often live within a few hours, but you should allow up to 24–48 hours for full propagation. During that window some visitors may still hit your old DNS while others see the new one — another reason to keep both sets of records consistent until the change settles.

To confirm the change actually went through, check the domain’s public registration record with a WHOIS or RDAP lookup. It lists the nameservers currently delegated for the domain; once it shows the new servers, the registry-side change is complete and the rest is just propagation. A DNS query for the domain’s NS records will likewise return the new nameservers once caches refresh.

Don’t cancel the old DNS too soon

Keep your previous DNS zone active for a few days after the switch. Because propagation is gradual, traffic can still arrive at the old nameservers during the transition. Leaving the old records in place means nobody hits a dead end while the change finishes spreading.

★ Key takeaways

  • Nameservers decide which provider is authoritative for your domain; you change them at your registrar.
  • Re-create your DNS records at the new provider first — switching nameservers replaces your entire zone and old records do not carry over.
  • Allow up to 24–48 hours for the change to propagate, and keep the old DNS running until it settles.
  • Confirm the switch with a WHOIS/RDAP lookup; custom in-domain nameservers also need glue records.

Frequently asked questions

How long does a nameserver change take to work?

A nameserver change is usually visible within a few hours, but allow up to 24 to 48 hours for it to propagate fully across the internet. The delegation update has to filter out from the registry and through caching resolvers worldwide, and older cached answers expire at their own pace. Until propagation finishes, some visitors may still reach your old DNS while others see the new one.

Will changing nameservers break my website or email?

It can, if you do not prepare. Switching nameservers hands all DNS control to the new provider, which starts with an empty or default zone — your old A, CNAME, MX and TXT records do not travel with the change. Re-create every record you need at the new provider before you switch, so that when delegation moves, your site and email keep resolving without a gap.

What is the difference between changing nameservers and editing DNS records?

Changing nameservers decides which provider is authoritative for your whole domain. Editing DNS records changes individual entries (like an A record or MX record) within whichever provider is currently authoritative. If you only need to repoint your site or update mail, you usually edit records at your existing DNS host rather than moving nameservers at all.

What are glue records and when do I need them?

Glue records are IP addresses stored at the registry for nameservers that live inside the domain they serve — for example using ns1.example.com to host example.com itself. Without glue, resolvers would face a chicken-and-egg loop. You only need glue when you run custom, in-domain nameservers; if you use a host’s or Cloudflare’s named nameservers, glue is handled for you.

How do I confirm my nameserver change went through?

Check the public registration record with a WHOIS or RDAP lookup — it lists the nameservers currently delegated for the domain. Once it shows the new nameservers, the registry-side change is live and the rest is propagation. A DNS lookup for the domain’s NS records will likewise return the new servers once caches refresh.

Sources & further reading