In short
Nameservers are the DNS servers designated as authoritative for a domain: they hold its records and answer queries about where the website, email and other services are. The registrar records which nameservers a domain uses; the DNS host runs them. Changing nameservers moves the entire zone to a different DNS host and must be preceded by recreating every record there; changing a record within the existing nameservers is a small edit. Most tasks need the second, and doing the first by mistake is a common cause of outages.
What a nameserver does
When a resolver needs to find example.com, it asks the root servers, which point it to the servers for .com, which point it to the nameservers for example.com. Those nameservers, typically two to four with names like ns1.dnsprovider.net, hold the domain's zone: the A, CNAME, MX, TXT and other records that say where everything is. They answer the query, and the resolver caches the answer.
So nameservers are the authority for a domain. Everything DNS knows about your domain lives on them. If they are unreachable, the domain does not resolve; if their records are wrong, the domain resolves to the wrong place.
Registrar, DNS host and nameservers
Three things people conflate:
The registrar is where the domain is registered and renewed. It records, among other things, which nameservers the domain uses, and publishes that to the top-level domain's registry. It may also offer DNS hosting, but that is a separate service.
The DNS host is whoever runs the nameservers and provides the interface for editing records. It might be the registrar, the web host, a CDN such as Cloudflare, or a dedicated DNS service.
The nameservers are the specific servers the DNS host operates, named in the registrar's settings.
A domain registered at one company can use nameservers at another, and the records at those nameservers can point the website at a third and email at a fourth. That separation is normal and healthy; the domain and hosting relationship is built on it.
Changing nameservers versus changing records
This is the distinction that matters in practice.
Changing a record means editing an entry within the current zone: pointing www at a new host, adding an MX record, updating a TXT for verification. It is done at the DNS host, takes effect within the record's TTL, and touches nothing else.
Changing nameservers means telling the registrar that a different set of servers is now authoritative. The entire zone moves: every record must exist at the new DNS host before the switch, or the domain will resolve to an empty or partial zone. It takes effect as the top-level domain's NS records expire from caches, commonly up to 24 to 48 hours, and during that period different resolvers may consult different nameservers.
Most everyday tasks, connecting a new website, setting up email, verifying a service, are record changes. A hosting provider's instructions that say "change your nameservers to ours" are asking you to move your whole DNS to them, which is convenient for them and ties your DNS to your host. Unless you want that, ask for the records to add instead; every host can provide them.
When changing nameservers is right
Moving DNS to a better provider, such as from a registrar's basic DNS to Cloudflare for speed, features or a CDN. Consolidating scattered DNS. Leaving a host that currently runs your DNS. In each case the destination is a DNS host you have chosen for DNS, not a side effect of another decision.
The migration procedure
- Export or list every record at the current DNS host: A, AAAA, CNAME, MX, TXT, SRV, CAA, everything. Include the ones nobody remembers, especially TXT records for email authentication and service verification.
- Recreate them all at the new DNS host. Most providers can import a zone file or scan the existing records; verify the result manually.
- Lower TTLs at the old host a day in advance if you want a faster switch; it helps for record caches, though the NS change itself is governed by the registry's TTL.
- Update the nameservers at the registrar to the new provider's.
- Monitor for a day or two, querying both old and new nameservers to confirm they answer identically, and checking that the website, email and any verified services keep working.
- Keep the old zone live until the change has fully propagated, then decommission it.
The entire risk is in step 1. A migration that misses the MX records breaks email silently; one that misses a DKIM TXT record makes mail start landing in spam; one that misses a verification record can cause a service to disconnect the domain.
Failure modes
Empty zone. Nameservers changed before records were recreated. Everything stops until they are.
Partial zone. The website records were copied, the email records were not. The site works; email fails, sometimes days later when caches expire.
Lame delegation. The registrar points at nameservers that do not actually host the zone, or the DNS host has not activated it. Resolution fails intermittently.
Registrar lock and expiry. Nameserver changes are blocked on an expired or locked domain, which is discovered mid-migration.
Split resolution during propagation. Some visitors reach the old zone, some the new. Harmless if both are identical, which is why the old one stays live.
Checking
dig NS example.com shows the nameservers the world sees; dig @ns1.newprovider.net example.com A queries a specific nameserver directly, which is how to verify the new zone before and after the switch. Online DNS checkers do the same from several locations. A nameserver change is one of the few DNS operations that touches everything at once, and the TTL and propagation rules apply with the longest delays. If you are planning one and would like the record inventory checked before the switch, book a call.
Common questions
What is the difference between a registrar and a nameserver?
The registrar is where the domain is registered and renewed, and it records which nameservers the domain uses. Nameservers are the DNS servers, run by a DNS host, that hold the domain's records and answer queries about where its website and email are. A domain can be registered at one company and use nameservers at another.
Should I change my nameservers or my DNS records?
Almost always the records. Connecting a website, setting up email or verifying a service are edits to individual records at your current DNS host. Changing nameservers moves the entire zone to a different DNS host and requires recreating every record first; do it only when you have deliberately chosen a new DNS provider.
How long does a nameserver change take?
Commonly up to 24 to 48 hours, because the NS records at the top-level domain registry carry long TTLs and resolvers cache them. During that window some visitors reach the old nameservers and some the new, so both should serve identical records until propagation completes. Verify with a DNS lookup that queries the new nameservers directly.
Can I use Cloudflare nameservers with a domain registered elsewhere?
Yes. Add the domain to Cloudflare, let it import or recreate the existing records, verify them, then set the nameservers at your registrar to the two Cloudflare provides. The domain stays registered where it is; only the DNS hosting moves. This is a common and sensible arrangement.
Why did my email stop working after changing nameservers?
Because the MX records, and usually the TXT records for SPF, DKIM and DMARC, were not recreated at the new DNS host before the switch. The website records were copied and email was forgotten. Add the missing records at the new host immediately; mail will resume as caches expire.
