Free — no signup required

Infrastructure Records: NS and SOA

2 min read

The records that define authority itself

NS Record (Name Server)
NS records answer the question: "Which servers are the authoritative source of truth for this domain?" They are the delegation mechanism of DNS. When you register example.com, the .com TLD registry stores NS records pointing to your chosen name servers. Anyone querying for records under example.com is directed to those servers.

example.com.    172800    IN    NS    ns1.exampledns.com.
example.com.    172800    IN    NS    ns2.exampledns.com.

You typically have at least two NS records for redundancy. If you change your DNS provider, you update these NS records at your domain registrar — this is what "changing your nameservers" means.

SOA Record (Start of Authority)
Every DNS zone has exactly one SOA record at its apex. It is the administrative record for the zone and contains:

  • MNAME: The primary authoritative name server for the zone.
  • RNAME: The email address of the zone administrator (written with a . instead of @).
  • Serial: A version number. Secondary name servers compare this to their own copy; if the primary's serial is higher, they initiate a zone transfer to sync.
  • Refresh: How often secondary servers should check for updates (in seconds).
  • Retry: How long to wait before retrying a failed refresh.
  • Expire: How long a secondary server will continue serving zone data if it cannot reach the primary.
  • Minimum TTL: The default TTL for negative responses (NXDOMAIN — "this name does not exist").
example.com.    IN    SOA    ns1.exampledns.com. admin.example.com. (
                              2024010101  ; Serial
                              3600        ; Refresh
                              900         ; Retry
                              604800      ; Expire
                              300 )       ; Minimum TTL

The SOA serial number is critical for zone replication. A common convention is to use the date format YYYYMMDDNN (e.g., 2024010101 = January 1, 2024, revision 01). If you edit zone records but forget to increment the serial, secondary servers will not pull the updated zone.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free