Knowledge base

NS record

Learn what a DNS NS record is, how it delegates authority to name servers, why multiple are essential for redundancy, lookup methods, common setups (Cloudflare, Route 53, custom), and troubleshooting.

What Is an NS Record in DNS?

TL;DR
An NS record (Name Server) specifies the authoritative name servers for a domain.
These servers hold the official DNS records (A, MX, TXT, etc.) and answer queries for that domain.
NS records are set at your domain registrar and define who controls your DNS.
Always use at least two for redundancy.

Look up NS records
Enter a domain name to lookup NS records

Enter the domain name you want to lookup

How NS Records Work

  1. A resolver wants to look up www.example.com.
  2. It queries the root servers → .com TLD servers.
  3. TLD servers return the NS records for example.com.
  4. The resolver then queries those name servers for the actual records.

NS records create DNS delegation: handing off responsibility from parent zone to child zone. The target name servers must have their own A/AAAA records (often called glue records if they're in the same zone).

Common Use Cases

  • Pointing to a DNS provider: Cloudflare, Route 53, Google Cloud DNS, etc.
  • Redundancy & reliability: multiple name servers in different locations/providers
  • Subdomain delegation: e.g., delegate sub.example.com to a different set of NS
  • Custom/self-hosted DNS: running your own BIND, PowerDNS, etc.
  • Anycast DNS: global, low-latency resolution via providers like Cloudflare

How to Lookup NS Records

dig example.com NS
nslookup -type=NS example.com

Record Format

NAME          TTL    CLASS  TYPE  VALUE
example.com.  3600   IN     NS    ns1.example.com.
  • VALUE: Hostname of an authoritative name server (FQDN with trailing dot)
  • Multiple records allowed (recommended: 2–4)
  • Target hostnames need A/AAAA records (glue if in-zone)

Valid Examples

Basic custom

example.com.      NS  ns1.example.com.
example.com.      NS  ns2.example.com.
ns1.example.com.  A   192.0.2.1
ns2.example.com.  A   198.51.100.1

Cloudflare

example.com.  NS  lara.ns.cloudflare.com.
example.com.  NS  pat.ns.cloudflare.com.

AWS Route 53

example.com.  NS  ns-1234.awsdns-12.com.
example.com.  NS  ns-5678.awsdns-56.net.
example.com.  NS  ns-9012.awsdns-90.org.
example.com.  NS  ns-3456.awsdns-34.co.uk.

NS vs Other Record Types

FeatureNSA / AAAACNAME
PurposeDefines authoritative serversIP address mappingDomain alias
Controls DNS zoneYesNoNo
Multiple allowedYes (recommended)YesNo
Points toDomain nameIP addressDomain name
Required at registrarYesNoNo

→ See also: A Record, SOA Record

Frequently Asked Questions

How many NS records should I have?
At least 2, preferably 3–4. More improves redundancy; too many (10+) can slightly slow queries.
Can NS records point outside my domain?
Yes, this is most common (e.g., Cloudflare, AWS). Targets just need valid public A/AAAA records.
What's the difference between NS and glue records?
NS records list the name servers. Glue records are A/AAAA records for those servers in the parent zone, which solves the circular dependency problem.
Do I need to match NS at registrar and zone?
Yes, they must match exactly, or queries may get inconsistent or no answers.

References

Related: A Record · SOA Record · DNS Basics