HTTPfy

NS record

NS (name server) records list the servers that are authoritative for a zone. They appear twice: in the parent zone as the delegation, and at the apex of the zone itself.

type code 2 RFC 1035RFC 1034

Live NS records from real domains

Checked at via public DNS
google.comNS
google.com. 342296 IN NS ns1.google.com.
  ; points to ns1.google.com
google.com. 342296 IN NS ns2.google.com.
  ; points to ns2.google.com
google.com. 342296 IN NS ns3.google.com.
  ; points to ns3.google.com
google.com. 342296 IN NS ns4.google.com.
  ; points to ns4.google.com
github.comNS
github.com. 1373 IN NS dns1.p08.nsone.net.
  ; points to dns1.p08.nsone.net
github.com. 1373 IN NS dns2.p08.nsone.net.
  ; points to dns2.p08.nsone.net
github.com. 1373 IN NS dns3.p08.nsone.net.
  ; points to dns3.p08.nsone.net
github.com. 1373 IN NS dns4.p08.nsone.net.
  ; points to dns4.p08.nsone.net
github.com. 1373 IN NS ns-1283.awsdns-32.org.
  ; points to ns-1283.awsdns-32.org
github.com. 1373 IN NS ns-1707.awsdns-21.co.uk.
  ; points to ns-1707.awsdns-21.co.uk
github.com. 1373 IN NS ns-421.awsdns-52.com.
  ; points to ns-421.awsdns-52.com
github.com. 1373 IN NS ns-520.awsdns-01.net.
  ; points to ns-520.awsdns-01.net
wikipedia.orgNS
wikipedia.org. 159949 IN NS ns0.wikimedia.org.
  ; points to ns0.wikimedia.org
wikipedia.org. 159949 IN NS ns1.wikimedia.org.
  ; points to ns1.wikimedia.org
wikipedia.org. 159949 IN NS ns2.wikimedia.org.
  ; points to ns2.wikimedia.org
cloudflare.comNS
cloudflare.com. 85224 IN NS ns3.cloudflare.com.
  ; points to ns3.cloudflare.com
cloudflare.com. 85224 IN NS ns4.cloudflare.com.
  ; points to ns4.cloudflare.com
cloudflare.com. 85224 IN NS ns5.cloudflare.com.
  ; points to ns5.cloudflare.com
cloudflare.com. 85224 IN NS ns6.cloudflare.com.
  ; points to ns6.cloudflare.com
cloudflare.com. 85224 IN NS ns7.cloudflare.com.
  ; points to ns7.cloudflare.com

What the NS record does

When you register example.com, the registrar puts NS records for it in the .com zone. Resolvers follow that delegation to your nameservers, which should publish the same NS set at the apex of your zone. If the two sets differ, resolvers may use either, so a stale entry on one side causes intermittent failures.

If a nameserver lives inside the zone it serves (ns1.example.com for example.com), the parent also needs glue: A/AAAA records for that nameserver, published in the parent zone, so resolvers can reach it without a circular lookup.

Zone-file syntax

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

Wire format: RDATA is one domain name: the host name of an authoritative server.

Fields

FieldMeaning
OwnerThe zone apex (or, in the parent, the delegated name).
TTLUsually long (hours to two days). Delegation TTLs in TLD zones are set by the registry, not by you.
NameserverHostname of an authoritative server. It must not be an IP address or a CNAME.

Common mistakes

  • Changing nameservers at the registrar while the new provider has not loaded the zone yet: the domain goes dark until caches expire.
  • NS records at the apex that do not match the delegation at the registrar.
  • Only one nameserver, or two on the same network. Most registries require at least two, and they should be on different networks.
  • Lame delegation: a listed server that does not answer authoritatively for the zone.

Specification

  • RFC 1035: Domain names - implementation and specification
  • RFC 1034: Domain names - concepts and facilities

Related record types

  • SOA: serial, timers and negative caching
  • DS: the DNSSEC link from parent to child zone
  • A: map a hostname to an IPv4 address

All DNS record types