Domains & Infrastructure
Nameservers and NS Records: How DNS Delegation Works
9 min read · Updated 2026-06-19
Every domain on the internet relies on nameservers — the servers that hold and hand out its DNS records — and on NS records, the small but crucial entries that point from one zone to the nameservers responsible for the next one down. Together they form the chain of delegation that lets a query for example.com find its way from the root of DNS all the way to your records.
This guide explains what a nameserver actually does, the difference between authoritative and recursive servers, how delegation and glue records work, why your registrar and your zone should agree, and how to look any domain's nameservers up on who.is.
What a nameserver is
A nameserver is a server that answers DNS queries. More precisely, it is software listening for DNS questions ("what is the A record for example.com?") and returning answers. Which questions it can answer depends on which zones it has been made responsible for.
A zone is a slice of the DNS namespace that one set of nameservers manages — for example, all the records under example.com. When a nameserver holds the real records for a zone, it is authoritative for that zone, and its answers are the source of truth. Every domain needs at least one authoritative nameserver, and in practice several, so that the rest of the internet can find its records. See What is DNS? for how this fits into the wider system.
Authoritative vs recursive nameservers
It helps to separate two very different jobs that both get called "nameserver":
- Authoritative nameserver: holds the actual zone data for one or more domains and answers questions about those domains directly. When you set up DNS for
example.com, you are publishing records onto its authoritative nameservers. - Recursive resolver: does not own any zone data. Instead it looks answers up on behalf of clients — walking the chain from the root down to the authoritative server, then caching the result so the next identical query is fast. The resolver your laptop or ISP uses is recursive.
So a recursive resolver is the one doing the legwork of a lookup, while authoritative nameservers are the ones that actually know the answer. Delegation, which the rest of this guide is about, is the mechanism a resolver follows to find the right authoritative server.
What an NS record is and how delegation works
An NS record ("name server") names an authoritative nameserver for a zone. Its value is a hostname — for example ns1.example.com — not an IP address.
NS records are how delegation happens. A parent zone publishes NS records that point to the authoritative nameservers of a child zone, effectively saying "I don't hold those records myself; ask these servers instead." That hand-off repeats down the tree:
- The root zone delegates
.comby publishing NS records for the.comnameservers. - The .com TLD zone delegates
example.comby publishing NS records pointing to your domain's authoritative nameservers, such asns1.example.comandns2.example.com. - Those authoritative nameservers answer for everything inside
example.com— its A, AAAA, MX, TXT, and other records.
A recursive resolver follows this chain on every cold lookup: root → TLD → your domain. Each step is a delegation made of NS records.
Nameservers at the registrar vs NS records in the zone
Confusingly, a domain's nameservers are recorded in two places, and the two must agree.
- At the registrar (the parent side): when you register or manage a domain, you tell your registrar which nameservers are authoritative. The registrar passes that to the TLD's registry, which publishes the matching NS records in the parent zone (e.g. in
.com). This is the delegation that resolvers actually follow. - In the zone itself (the child side): at the apex of
example.comthere is also a set of NS records, served by the authoritative nameservers themselves. These are sometimes called the "in-zone" or apex NS records.
Best practice is that the parent's NS records and the zone's apex NS records list the same nameservers. When they disagree, you get hard-to-diagnose behavior: the delegation sends resolvers to one set of servers while the zone advertises another. Whenever you change DNS providers, update both — the registrar/parent delegation is the one that matters most for reachability.
Glue records: breaking the circular dependency
There is a chicken-and-egg problem when a domain's nameserver lives inside the domain it serves. Suppose example.com is delegated to ns1.example.com. To look up ns1.example.com's IP address, a resolver would need to query the nameservers for example.com — but those are ns1.example.com. It cannot resolve the nameserver without already being able to reach the nameserver.
Glue records solve this. Alongside the NS records, the parent zone (the TLD) also publishes the nameserver's IP address as an A and/or AAAA "glue" record — for example, telling resolvers that ns1.example.com is at 198.51.100.53 (and perhaps 2001:db8::53 over IPv6). That IP is supplied directly in the delegation, so the resolver can reach the nameserver without a separate lookup.
You only need glue when the nameserver hostname is within the domain it serves. If example.com were delegated to nameservers under a different domain — say a DNS provider's ns1.dnsprovider.net — no glue is required, because that hostname is resolved through its own independent delegation. You normally configure glue (sometimes called "host records" or "child name servers") at your registrar.
Primary, secondary, and redundancy
You almost never want a single nameserver. The convention of primary and secondary nameservers exists for resilience: the primary holds the master copy of the zone, and secondaries pull a copy (a "zone transfer") and serve the same answers. To a resolver they are interchangeable — all of them are authoritative.
The practical rule is to run at least two nameservers, ideally on diverse networks, in different locations, and on different infrastructure. If ns1.example.com goes offline, ns2.example.com keeps answering and your domain stays reachable. Spreading nameservers across networks protects you from a single outage, route problem, or DDoS taking your whole domain dark. Most TLD registries require a minimum of two nameservers for exactly this reason.
Changing nameservers and propagation
Moving to a new DNS host means changing the nameservers your domain is delegated to. The safe sequence is: set up the full zone on the new provider first, confirm it serves the right records, then update the nameservers at your registrar so the parent delegation points to the new servers.
The change is not instant. Resolvers cache the existing delegation according to its TTL, and the TLD's NS records often have long TTLs (a day or two). Until those caches expire, some resolvers still send queries to your old nameservers — so you should keep the old zone serving correct records during the transition. For the full picture of caching and timing, see TTL and propagation. Plan nameserver moves with a window of hours to a couple of days, not minutes.
How this connects to WHOIS
A domain's nameservers are part of its registration data, so they show up in WHOIS and RDAP. When you look up a domain on who.is WHOIS, the record lists the nameservers the registrar has on file — the same nameservers that drive the parent delegation.
That makes WHOIS a quick sanity check: the nameservers listed there should match the NS records you actually intend to use and the ones published at your domain's apex. A mismatch in WHOIS is often the first visible sign that a nameserver change is half-finished or that a delegation is pointing somewhere stale.
Common problems
Most nameserver issues come down to a handful of recurring mistakes:
- Lame delegation: a nameserver is listed in the delegation but doesn't actually answer authoritatively for the zone (it's offline, misconfigured, or never had the zone loaded). Resolvers may try it, time out, and slow everything down — or fail intermittently.
- Mismatched parent and child NS records: the registrar/parent delegation lists one set of nameservers while the zone's apex lists another. This causes inconsistent resolution and breaks tools and validators that expect them to agree.
- Single point of failure: only one nameserver, or two nameservers on the same network or provider. One outage takes the whole domain down.
- Missing or stale glue: in-domain nameservers with no glue records, or glue pointing at an old IP, so resolvers can't reach the nameservers at all.
How to look up nameservers on who.is
To see which nameservers are authoritative for any domain, use the who.is nameserver lookup. It shows the delegated nameservers and lets you find other domains that share a given nameserver — handy for spotting a provider's full footprint or confirming a migration.
For the registration-side view, run the domain through who.is WHOIS (or RDAP for the structured version), and check the nameservers there against what the nameserver lookup reports and what your zone publishes. To inspect the records those nameservers actually serve, use the DNS lookup. When all three agree, your delegation is healthy.
Key takeaways
- A nameserver answers DNS queries; an authoritative nameserver holds a zone’s real records, while a recursive resolver looks answers up for clients and caches them.
- NS records delegate a zone: the parent publishes NS records pointing to the child’s authoritative nameservers, forming the chain root → TLD → your domain.
- A domain’s nameservers live in two places — the registrar/parent delegation and the zone’s apex NS records — and the two should list the same servers.
- Glue records supply a nameserver’s IP in the parent zone when its hostname is inside the domain it serves (e.g. ns1.example.com for example.com), breaking the circular lookup.
- Run at least two nameservers on diverse networks for redundancy, and remember nameserver changes propagate on the delegation’s TTL, not instantly.
Look up a domain’s nameservers
See which nameservers are authoritative for any domain, and which domains share a nameserver, on who.is.
Frequently asked questions
What's the difference between a nameserver and an NS record?▾
A nameserver is the actual server that holds and serves DNS records for a zone. An NS record is a DNS entry that names a nameserver as authoritative for a zone. NS records in a parent zone delegate to the nameservers of a child zone; the nameservers themselves are the machines that answer the queries.
What are glue records and when do I need them?▾
Glue records are A/AAAA records for a nameserver's hostname, published in the parent zone alongside the NS records. You need them when a nameserver's hostname is inside the domain it serves — for example ns1.example.com serving example.com — because a resolver otherwise couldn't find the nameserver's IP without already being able to reach it. You typically set glue at your registrar. If your nameservers live under a different domain (like a DNS provider's), no glue is needed.
Why does my domain have nameservers at both the registrar and in the zone?▾
Because DNS records the delegation in two spots. At the registrar, you set the nameservers, which the TLD registry publishes as NS records in the parent zone — this is the delegation resolvers follow. Inside the zone itself, the apex also carries NS records served by the authoritative nameservers. They should list the same servers; a mismatch causes inconsistent resolution.
How long do nameserver changes take?▾
It depends on caching. Resolvers hold the existing delegation until its TTL expires, and TLD NS records often have TTLs of a day or two. Plan for hours to a couple of days, and keep your old DNS serving correct records during the move so nobody hits a dead zone. See TTL and propagation for details.
How many nameservers should a domain have?▾
At least two, and most TLD registries require it. For real resilience, put them on diverse networks, providers, and locations so a single outage, route problem, or attack can't take your whole domain offline. More than two is fine and common; what matters is that they're genuinely independent of each other.
How do I find a domain's nameservers?▾
Use the who.is nameserver lookup to see the authoritative nameservers for any domain (and which domains share a nameserver). You can also check WHOIS or RDAP, which list the nameservers the registrar has on file. When the nameserver lookup, WHOIS, and your zone all agree, your delegation is set up correctly.