NS record at a glance

FieldValue
Type code2
Defined inRFC 1035, section 3.3.11
ValueOne name server hostname, such as ns1.example.net.
Allowed at the apexRequired there; also used at any delegated subdomain
Target rulesA hostname with A or AAAA records; never an IP address or a CNAME

Here is how an NS record looks in a zone file:

example.com.  86400  IN  NS  ns1.example.net.
example.com.  86400  IN  NS  ns2.example.org.

Two or more name servers on different networks is the long-standing advice of RFC 2182, so one outage cannot take the whole domain offline.

Two copies: parent and child

NS records exist in two places. The parent zone (for example.com, that is the .com registry) holds a copy that you set at your registrar. This is the delegation: resolvers follow it to find your servers. Your own zone holds a second copy at the apex, which those servers return when asked directly.

The two sets should match. When they differ, resolvers may use either list depending on what they cached, so a server that appears in only one copy gets some traffic and not the rest. After moving DNS providers, the most common leftover is a registrar delegation that still lists an old provider. Moving DNS providers gives the safe order of steps.

Glue records

If a zone's name servers sit inside the zone, such as ns1.example.com serving example.com, a resolver could not look up their addresses without already knowing them. The parent breaks the loop by publishing glue: A and AAAA records for those name servers alongside the delegation. You set glue at your registrar, often called "host records" or "child name servers". Delegation and glue records covers the details.

Lame delegation

A delegation is lame when a listed name server does not answer authoritatively for the zone: it refuses, times out, or answers without the authoritative flag. Resolvers retry another server, so users see slow lookups rather than failures, until every listed server is lame. Lame delegation explains how to find and fix it.

How to look up an NS record

Each tool below sends the query to your default resolver unless you name a server. Swap in your own domain for example.com, and add a public resolver such as 1.1.1.1 to compare answers with what your network sees. To see the parent copy, ask a server for the parent zone, such as a.gtld-servers.net for .com.

dig (macOS, Linux, WSL)

CommandWhat it does
dig example.com NSThe NS set your resolver has, normally the child copy
dig +short example.com NSOnly the name server names
dig example.com NS @a.gtld-servers.net +norecurseThe parent copy: the delegation the .com registry publishes, with glue
dig @ns1.example.net example.com NS +norecurseThe child copy, straight from one of your name servers
dig +trace example.com NSWalk the delegation from the root down

nslookup (Windows, macOS, Linux)

CommandWhat it does
nslookup -type=NS example.comName servers from your default DNS server
nslookup -type=NS example.com a.gtld-servers.netThe delegation as the .com servers publish it
nslookup -type=SOA example.com ns1.example.netConfirm a listed server answers for the zone

PowerShell (Windows)

CommandWhat it does
Resolve-DnsName -Name example.com -Type NSNS records; the server names are in the NameHost column
Resolve-DnsName example.com -Type NS -Server a.gtld-servers.net -NoRecursionThe parent copy, without asking that server to recurse
Resolve-DnsName example.com -Type SOA -Server ns1.example.net -NoRecursionCheck that one name server answers for the zone
Reading the parent answer

A parent server answers an NS question with a referral, so the records appear in the authority section rather than the answer. dig prints them under AUTHORITY SECTION, and that is expected.

Common mistakes

  • Registrar and zone NS sets that differ. Update both when you add or remove a provider.
  • A single name server, or two on the same network. One failure takes the domain offline.
  • NS pointing at a CNAME. Forbidden by RFC 2181 section 10.3.
  • Stale glue after renumbering a name server. The parent keeps handing out the old address until you update the host record at the registrar.
  • Delegating a subdomain to a provider account you later delete. The NS records stay and can be claimed; see dangling DNS.

NS records in Domain Visualizer

Domain Visualizer looks up the apex NS set on every scan and resolves each name server to its addresses. The detail panel lists each server, which makes a single-provider or single-server setup easy to spot.

FAQ

How many NS records should a domain have?

At least two, on different networks. Many registries require two. More than four rarely adds resilience and makes every change harder to keep in sync.

Why do my registrar and DNS provider show different name servers?

They are separate copies. The registrar sets the delegation in the parent zone and the DNS provider publishes the NS set inside your zone. Update the registrar to match the provider.

What TTL do NS records use?

The parent zone sets the TTL on the delegation, often one or two days for .com. Your own zone sets the TTL on its copy. Expect NS changes to take up to the longer of the two to reach every resolver.

Sources and further reading