Skip to main content

What is an NS record?

An NS record (Name Server record) is a DNS record that indicates which DNS servers are authoritative for a domain or DNS zone.

In simpler terms: an NS record says which DNS servers can be trusted to answer for this domain.


Why an NS record is needed

DNS is a distributed system. To understand who is responsible for a specific domain, NS records are used.

They are needed to:

  • determine where a domain's DNS records are stored
  • route DNS queries correctly
  • delegate a domain to other DNS servers

Without NS records, DNS would not know whom to ask next.


How an NS record works (simplified)

  1. The client wants to find the IP for example.com
  2. The DNS system reaches the .com zone
  3. .com answers:

"These DNS servers are responsible for example.com"

  1. The client contacts the specified NS servers
  2. It gets the needed A / CNAME / MX records

An NS record does not contain the site's IP, it contains a DNS server's address.


Example of NS records

Simplified:

NameTypeValue
example.comNSns1.provider.net
example.comNSns2.provider.net

This means: The DNS servers ns1.provider.net and ns2.provider.net are responsible for the domain example.com.


Important points for an interview

  • NS records:
    • point to the authoritative DNS servers
    • are stored in the DNS zone
  • a domain usually has several NS records (for fault tolerance)
  • changing NS records = changing the DNS provider

Where NS records are configured

NS records are set:

  • at the domain registrar
  • in the parent zone (.com, .org, etc.)

That is why changing NS can take time (propagation across DNS).


Real-life example

An NS record is like a sign:

"For all questions about this building, contact this management company"

The building is the domain The company is the DNS server


Short interview answer

Remember this formulation:

An NS record is a DNS record that indicates the DNS servers authoritative for a domain or zone, and defines where its DNS records are stored and served.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.