NS Record
Name Server
- Type code
- 2
- Status
- In use
- Defined in
- RFC 1035
What the NS record is for
NS records are how the DNS hierarchy is delegated. The parent zone (for example .com) holds NS records that point resolvers at the servers for a child zone, and the child zone repeats the same set at its own apex.
When the name servers sit inside the zone they serve (ns1.example.com for example.com), the parent also holds their addresses as glue records, because otherwise a resolver could not find them.
The two NS sets are supposed to match. The parent copy is only a referral; resolvers treat the child's own NS set as authoritative once they reach it.
Wire format and fields
| Field | Size | Meaning |
|---|---|---|
| NSDNAME | domain name | The host name of an authoritative name server for the owner name. |
Zone file syntax
<owner> <ttl> IN NS <nsdname>
Example
The NS records at google.com, fetched from live DNS on 27 November 2026:
google.com. 86400 IN NS ns3.google.com. google.com. 86400 IN NS ns2.google.com. google.com. 86400 IN NS ns1.google.com. google.com. 86400 IN NS ns4.google.com.
Common mistakes
- Pointing an NS record at a name that is a CNAME. RFC 2181 forbids it and some resolvers will fail.
- Putting an IP address in an NS record. NSDNAME is a host name; the address belongs in an A or AAAA record for that name.
- Changing name servers at the registrar but not in the zone (or the reverse), so the parent and child NS sets disagree.
- Listing a server that does not answer authoritatively for the zone (a lame delegation), which slows down or breaks resolution.
- Running every listed name server on one host or one network, so a single outage takes the whole zone offline.
Specifications
- RFC 1035: Domain names - implementation and specification
- RFC 1034: Domain names - concepts and facilities (Describes delegation, referrals and glue.)
- RFC 2181: Clarifications to the DNS Specification (Says an NS record must not point to an alias (CNAME), and clarifies zone cuts.)
- IANA DNS Resource Record (RR) TYPEs registry: type code and status
Related record types
Domain Intelligence APIs
Get started with our easy-to-use API docs.