Key facts
- Nameservers are the authoritative servers for a domain's DNS records.
- The nameservers set at the registrar decide which DNS provider answers.
- Your registrar and your DNS host can be different companies.
- Most domains have at least two nameservers for resilience.
- Glue records are needed when nameservers sit inside the domain they serve.
- Cloudflare gives each domain two assigned nameservers.
What a nameserver does
A nameserver is a server that holds the DNS zone for a domain: the A, MX, TXT and other records that say where the website and email are. When a resolver needs an answer for your domain, the nameserver is the final, authoritative source. Our guide on how DNS works walks through that lookup.
Nameservers look like ordinary hostnames, for example ns1.example-dns.net and ns2.example-dns.net. Most domains have at least two, run on separate systems, so one can fail without taking the domain offline.
The names usually tell you who runs your DNS. Nameservers ending in a registrar's domain mean the registrar hosts your records. Names ending in cloudflare.com mean Cloudflare does. Names ending in a hosting company's domain mean your web host does. Whichever company it is, that is the only place where changes to your website, email or verification records will take effect. Changing the nameservers hands the whole zone to a different company, so every record must be copied across first.
Registrar vs DNS host
This is the part that confuses most people. Two jobs are involved:
| Job | Who does it | What you change there |
|---|---|---|
| Registrar | The company you registered the domain through | Ownership details, renewal, transfer lock and which nameservers the domain uses |
| DNS host | The company whose nameservers are set at the registrar | The individual records: website, email, verification |
Often the registrar is also the DNS host, using its own nameservers. But if the nameservers point to Cloudflare or a hosting company, that company is now in charge of your records, and editing records at the registrar does nothing. See domain registrar vs hosting company and Cloudflare vs registrar DNS.
Glue records
Imagine example.co.uk uses ns1.example.co.uk as its nameserver. To find ns1.example.co.uk, a resolver would need to ask the nameserver for example.co.uk, which is ns1.example.co.uk. That is a loop.
Glue records break it. They are IP addresses for the nameservers, published at the registry alongside the nameserver names, so the resolver gets the address in the referral. You only need glue when the nameservers sit inside the domain they serve. If your nameservers belong to Cloudflare or another provider's domain, no glue is needed. Glue is set at the registrar, usually under a "host records" or "child nameservers" option.
How to see your nameservers
- At your registrar. Log in and open the domain's settings. The nameservers are listed there, and this is where they are changed.
- With a command. On a Mac or Linux terminal, run
dig NS example.co.uk +short. On Windows, runnslookup -type=ns example.co.uk. Our guide on how to check DNS records has more examples. - With a WHOIS lookup. Public WHOIS results normally list the nameservers even when personal details are hidden.
If the names end in a provider you do not recognise, that provider is your DNS host, and you will need access to that account to make changes.
How dijitul helps
We can tell you where your DNS really lives, recover access and move nameservers safely. DNS management is included with dijihost Complete Hosting at £1 a day + VAT. On its own, set-up and changes are £45 an hour + VAT. See DNS hosting and DNS migration, or contact us.
Frequently asked questions
Are nameservers the same as my registrar?
Not necessarily. The registrar is where the domain is registered and where the nameservers are set. The nameservers may belong to the registrar, to Cloudflare or to a hosting company. Whoever runs the nameservers controls your DNS records.
Why does my domain have two or more nameservers?
For resilience. If one nameserver is unreachable, resolvers ask another. Registries normally require at least two, and good providers run them on separate networks so a single fault does not take your website and email offline.
When do I need glue records?
Only when your nameservers are inside the domain they serve, such as ns1.example.co.uk for example.co.uk. Glue gives resolvers the nameservers' IP addresses so they avoid a lookup loop. If you use a provider's nameservers, you do not need glue.
I changed a record but nothing happened. Why?
The most common reason is editing records at a provider that is not your active DNS host. Check which nameservers the domain uses, then make the change in that provider's account. Also allow time for the old record's TTL to expire.
Can I see someone else's nameservers?
Yes. Nameservers are public, because resolvers need them. A WHOIS lookup or a command such as dig NS shows them for any domain. That can help you work out who hosts a domain's DNS before a move.
Related
Get domains, DNS and email sorted
Set up properly, records checked, and real people to call. DNS and email are included with dijihost hosting.