Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Explainers · Explainer

What Is a Nameserver? A Plain Explanation

What Is a Nameserver? A Plain Explanation

Short answer

A nameserver is a DNS server that holds the DNS records for a domain and answers queries about that domain. Your domain's nameservers decide where your DNS is managed, so changing them moves control of your records to a new provider. A domain always needs at least two nameservers for backup.

Key takeaways

  • A nameserver is a DNS server that holds your domain's records and answers queries about it.
  • There are 13 DNS root nameservers, run as hundreds of servers around the world.
  • A domain always needs at least two nameservers, so a second server can answer if the first fails.
  • A nameserver change can take up to 24 to 48 hours to reach every resolver.
  • Turn DNSSEC off at your registrar before you replace your nameservers.

What is a nameserver?

A nameserver is a DNS server that holds the DNS records for a domain and answers queries about that domain.

When someone types your domain into a browser, a nameserver is the server that gives back the IP address for it. Cloudflare's nameserver docs describe nameservers as the servers that hold the final DNS records for a domain and give the final response in DNS resolution.

Your domain's nameservers decide where your DNS is managed. If a domain uses one company's nameservers, the DNS zone file lives in that company's account. Change the nameservers, and you change who answers for the domain.

What is the difference between an authoritative nameserver and a recursive resolver?

An authoritative nameserver holds the final records for a domain, while a recursive resolver asks other servers on your behalf until it finds the answer.

All DNS servers fall into four groups, as Cloudflare's DNS server types guide explains: recursive resolvers, root nameservers, TLD nameservers, and authoritative nameservers.

A recursive resolver is the first stop in a DNS query. It acts as a middleman between your device and the nameservers, answering from its cache when it can, or asking a root nameserver, then a TLD nameserver, then the authoritative nameserver.

Most people use a resolver run by their internet provider, though public options such as Cloudflare's 1.1.1.1 exist.

An authoritative nameserver holds the records for the domains it serves and gives the final answer. When a nameserver is authoritative for example.com, resolvers trust its answers for that domain.

Server typeJobExample
Recursive resolverAsks other servers until it finds the answerYour ISP resolver, 1.1.1.1
Root nameserverPoints the resolver to the right TLD servera.root-servers.net
TLD nameserverHolds the nameservers for one ending, such as .comThe .com TLD servers
Authoritative nameserverHolds the final records for a domainYour host or DNS provider's servers

How does a DNS lookup use nameservers?

A lookup moves from the resolver to a root server, then to a TLD server, then to the domain's authoritative nameserver.

The chain works like this. The resolver asks a root nameserver, which points it to the TLD nameserver for the domain's ending, such as .com. The TLD nameserver then points to the authoritative nameserver for the domain, which gives the final record.

There are 13 DNS root nameservers, known to every recursive resolver and overseen by ICANN. IANA's root server page lists them as 13 named authorities, from a.root-servers.net through m.root-servers.net. The number 13 does not mean 13 machines: Cloudflare notes there are over 600 servers in total, spread around the world with Anycast routing.

How many nameservers does a domain need?

A domain always needs at least two nameservers, so a second server can answer if the first one fails.

GoDaddy's help page states this plainly: there are always at least two nameservers for a domain. Cloudflare assigns two standard nameservers per zone, and three per zone on Enterprise plans with Foundation DNS advanced nameservers. Cloudflare account custom nameserver sets must hold between two and five names.

Some endings set their own limits. Namecheap notes that .CA domains must have at least 2 and at most 6 nameservers, each with its own IP address. The extra nameservers add redundancy, not speed: they are backups, not a way to make lookups faster.

How do you change your nameservers?

You change nameservers where you registered the domain, by replacing the old nameserver names with the new ones.

The steps differ a little by registrar, but the shape is the same. Cloudflare's full setup guide lists four steps: get your assigned nameservers from the zone overview page, log in to your registrar, turn off DNSSEC first, then remove the old nameservers and add the new ones, copied exactly.

GoDaddy's flow is: sign in to Domain Portfolio, pick the domain, open Domain Settings, then DNS, then Nameservers, choose “I'll use my own nameservers”, and save.

Namecheap's flow is: open Domain List, click Manage next to the domain, find the Nameservers section, pick an option from the drop-down, and save. For Custom DNS, you type nameservers in the form ns1.example.tld.

For WordPress sites, our guide to how to point a domain to WordPress hosting walks through the same change with hosting in mind.

How long does a nameserver change take?

A nameserver change can take up to 24 to 48 hours to reach every resolver, though many changes show up within an hour.

Vendor figures differ. GoDaddy says most DNS changes take effect within an hour but can take up to 48 hours to update around the world. Namecheap says it may take up to 24 hours, and more in rare cases, for local ISPs to update their caches.

Cloudflare tells users to wait up to 24 hours while the registrar updates the nameservers.

The main factor is TTL, the time to live on each record. GoDaddy explains that a 1-hour TTL means servers store the record for an hour before asking again, so a shorter TTL speeds up the change but adds more queries.

Some ISPs ignore TTL and only refresh cached records every 2 to 3 days.

Our guide to how long DNS propagation takes covers the timing in more depth.

How do you check which nameservers a domain uses?

Run dig ns example.com or whois example.com in a terminal, or use an online DNS lookup tool.

Cloudflare's setup guide gives the exact commands. On macOS or Linux, run whois example.com or dig ns example.com @1.1.1.1.

On Windows, run nslookup -type=ns example.com 1.1.1.1. You can also run dig example.com +trace to watch each step of the lookup.

Online tools such as whatsmydns.net show the same answers, though Cloudflare warns that most of them use cached results, so they may take longer to show updates. If the check still shows the old nameservers after a day, the change may not have saved at the registrar.

What happens if your nameservers point to the wrong host?

If your nameservers point to the wrong host, your domain stops resolving, or it loads the wrong site and email.

Changing nameservers changes where DNS is managed, so the records must exist at the new host. Namecheap warns that switching nameservers does not move host records on its own: save all needed settings and set them up by hand after the switch.

Switching to Namecheap Web Hosting DNS even overwrites custom DNS records with hosting ones.

Cloudflare's troubleshooting page is blunt: if the nameservers at your registrar do not match the ones Cloudflare gave you exactly, your domain will not resolve correctly.

It also says to list only the Cloudflare nameservers there, with no extras. GoDaddy adds a similar warning: changing nameservers may break existing links to your website or email, so check your settings before and after the change.

What is DNSSEC, and why does it matter when you change nameservers?

DNSSEC is a security layer for DNS, and you must turn it off at your registrar before you replace your nameservers.

Cloudflare's setup guide warns that changing nameservers while DNSSEC is active can make your domain unreachable. The fix is simple: turn DNSSEC off first, change the nameservers, then turn DNSSEC back on through the new provider.

The same advice shows up in Cloudflare's troubleshooting page. It tells you to remove any pre-Cloudflare DS records at your registrar to update the authoritative nameservers, which turns DNSSEC off and lets Cloudflare resolve the domain. You can then re-enable DNSSEC in Cloudflare and at your registrar after the change.

What mistakes should you avoid?

The most common nameserver mistakes are typos, extra nameservers left behind, and forgetting about DNSSEC.

Check this list before and after a change:

  • Copy each nameserver name exactly. One wrong letter breaks resolution.
  • Remove the old nameservers. Cloudflare says you should have only its nameservers listed at your registrar.
  • Turn DNSSEC off before the switch, and turn it back on after.
  • Recreate your DNS records at the new host before you switch, including A, CNAME, MX, and TXT records.
  • Wait up to 24 hours before you judge the change, since some ISPs cache old records for days.

Typical nameserver hostnames show the pattern to expect. Namecheap BasicDNS uses dns1.registrar-servers.com and dns2.registrar-servers.com, and Cloudflare assigns names ending in .ns.cloudflare.com.

If your site stops loading after a change, our guide to fixing DNS probe errors walks through the checks.

If you moved hosts as well, see how to change the domain of a WordPress site.

Cloudflare users can also read how to set up Cloudflare for WordPress.

Frequently asked questions

What is the difference between an authoritative nameserver and a recursive resolver?

An authoritative nameserver holds the final records for a domain and gives the final answer. A recursive resolver is the middleman: it asks the root, TLD, and authoritative servers on your behalf, then returns the answer to your device. Most people use a resolver run by their internet provider.

How long does a nameserver change take?

It can take up to 24 to 48 hours to reach every resolver, though many changes show up within an hour. GoDaddy cites up to 48 hours, while Namecheap and Cloudflare cite up to 24 hours. The wait depends on the TTL of the old records and on how each ISP caches them.

Do I need to turn off DNSSEC before changing nameservers?

Turn DNSSEC off at your registrar before you replace the nameservers, then turn it back on through the new provider after the change. Changing nameservers while DNSSEC is active can make your domain unreachable, because the old signatures no longer match the new setup.

How do I check which nameservers my domain uses?

Run dig ns example.com or whois example.com in a terminal, or nslookup -type=ns example.com on Windows. Online tools such as whatsmydns.net show the same answers, though they may use cached results and take longer to show updates.

What happens if my nameservers point to the wrong host?

Your domain may stop resolving, load the wrong site, or lose email. Changing nameservers moves DNS control to a new host, so recreate your A, CNAME, MX, and TXT records there first. Also remove the old nameservers and copy the new names exactly, with no typos.

Sources

  1. Nameservers Cloudflare
  2. DNS server types Cloudflare
  3. Change your nameservers (Full setup) Cloudflare
  4. Root Servers IANA
  5. Change my domain nameservers GoDaddy
  6. How to Change DNS For a Domain Namecheap

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.