Nameservers are the servers that store your domain's DNS records and answer questions about them. Setting your nameservers is how you tell the internet which company is in charge of your domain's DNS. Pick Cloudflare's nameservers, and Cloudflare's dashboard becomes the only place your records matter.
Where nameservers sit in the chain
Your registrar sends your chosen nameservers to the registry for your ending. When a resolver looks up your domain, the registry's servers reply, in effect, "ask these nameservers", and those servers return the actual records. Nameserver names look like ns1.examplehost.com and ns2.examplehost.com. Registries normally require at least two, so a single failed server does not take the domain offline.
There is an important split here. The nameserver setting lives at the registrar. The records live at whichever provider those nameservers belong to. The two can be the same company or different ones.
Changing nameservers versus changing records
When connecting a domain to a new website, a provider may offer two routes. Change nameservers hands your whole DNS to them; they then manage every record. Add records keeps DNS where it is and just adds an A record or CNAME for the site. The second route is less disruptive when you already have email and other services set up, because nothing else moves.
Example: switching to a DNS provider
A gym moves its DNS from its registrar to Cloudflare. Cloudflare scans the existing zone and imports what it finds. The owner checks the list against the old panel, adds a missing DKIM record, then pastes Cloudflare's two assigned nameservers into the registrar. Once the change spreads through resolver caches, Cloudflare answers for the domain. Nameserver changes for a .com can take up to two days to be seen everywhere, because the delegation records in the .com zone carry a 48-hour TTL.
When you need to care
You need to know your nameservers whenever someone says "add a DNS record". If you are editing at company A but your nameservers point to company B, nothing will happen. A WHOIS or RDAP lookup on your domain shows the current nameservers in seconds.
Common nameserver mistakes
- Switching without migrating email records. Mail stops the moment the new, empty zone takes over.
- Mixing nameservers from two providers. Resolvers will get different answers depending on which server they ask.
- Cancelling the old DNS host too early. Keep it running until the change has fully spread.
- Typos in the names. One wrong letter and the domain stops resolving entirely.
Related terms
- DNS: the lookup system nameservers answer for.
- DNS records: what nameservers store.
- DNS propagation: the wait after a nameserver change.
- Domain registrar: where you set them.