A nameserver (or DNS server) stores and serves DNS records for a domain. When anyone on the internet looks up your domain, their resolver ultimately queries your authoritative nameservers to get the answer.
Types of Nameservers
| Type | Role |
|---|---|
| Root nameservers | 13 clusters (a–m.root-servers.net) — top of DNS hierarchy |
| TLD nameservers | Handle .com, .org, .net etc. — managed by registries |
| Authoritative nameservers | Your DNS provider — the source of truth for your domain |
| Recursive resolvers | Google (8.8.8.8), Cloudflare (1.1.1.1) — look up answers for users |
NS Records
Your domain’s nameservers are published as NS records:
example.com. 172800 IN NS ns1.cloudflare.com.
example.com. 172800 IN NS ns2.cloudflare.com.
These are set at your registrar and point to your DNS provider.
Changing Nameservers
When you migrate from one DNS provider to another, you update the NS records at your registrar. This change propagates through the registry (Verisign for .com) — it can take 24-48 hours since registries set their own TTLs. Copy all records to the new provider before changing NS records to avoid downtime.
Redundancy
DNS requires at least 2 nameservers (RFC 1034). Most providers supply 2-4. If one nameserver is unreachable, resolvers try the others — preventing DNS outages from single points of failure.