What are nameservers?
They decide who gets to answer questions about your domain — and changing them hands your whole domain to a different company.
Nameservers are the servers that hold the authoritative answer to "where does this domain point?" Every domain names two or more of them, and whichever ones it names are the only machines on the internet whose answers about that domain count.
They look like hostnames, because that is what they are:
ns1.example-host.com
ns2.example-host.com
What they actually do
When somebody types your domain into a browser, their computer has to turn that name into a server address. It asks the internet's root servers, which say "for .com, ask the .com registry". The registry says "for this domain, ask these nameservers". And those nameservers give the final answer: this is the IP address of the website, this is where the email goes, and so on.
The registry only stores which nameservers to ask. It does not store your records. That distinction explains almost every confusing thing about DNS.
Why it matters which ones you use
Because the nameservers hold your records, whoever runs them controls your domain's DNS — and the panel where you edit those records lives with them too.
| If your nameservers are… | Then you edit DNS records… |
|---|---|
| your hosting provider's | in your hosting control panel |
| your registrar's | at the registrar, where you bought the domain |
| a third party's (a CDN, a DNS service) | in that service's dashboard |
Editing records in the wrong place. If your domain uses your host's nameservers, records you carefully change at the registrar are simply never consulted — the registrar's DNS panel is still there, still editable, and completely ignored. Nothing warns you. Find out which nameservers the domain actually uses before you edit anything.
How to see which ones a domain is using
dig +short NS yourdomain.com
nslookup -type=ns yourdomain.com # Windows
Whatever comes back is authoritative for that domain right now, regardless of what any control panel shows you.
When you need to change them
Rarely, and always deliberately. The usual reasons are moving to a new hosting provider, or moving DNS to a service that offers something your current provider does not. Our guide to pointing a domain at your hosting covers the change step by step.
Two things worth knowing before you do:
- Changing nameservers moves everything at once — website, email, subdomains, verification records. If any of those currently work, recreate them on the new nameservers before you switch, not after.
- Replace, never mix. Leaving the old nameservers alongside the new ones means different visitors get different answers depending on which server they happened to ask. The site then appears to work intermittently, which is far harder to diagnose than a site that is plainly down.
Nameservers and the domain registration are separate things
A domain can be registered with one company and use another company's nameservers indefinitely. Changing nameservers does not move the registration, does not affect renewal, and does not change who you pay for the domain. The two are often confused because both are set from the same page at the registrar.
Related reading
The two ways to connect a domain to a hosting account, when to use each, and how to tell the change has actually taken effect.
How long does DNS propagation take?Usually a few hours, occasionally up to 48 — and your own browser is almost always the last thing on earth to catch up.
What is DNS, and how does a domain find a server?The system that turns a domain name into the address of a server, and what really happens in the gap between typing and loading.
Can I use a domain I bought somewhere else?Yes — a domain registered anywhere can be hosted with us without ever moving its actual registration.