Support >
  About cybersecurity >
  What are the roles of NS records and SOA records? A breakdown of the DNS permission system.

What are the roles of NS records and SOA records? A breakdown of the DNS permission system.

Time : 2026-08-07 10:40:10
Edit : DNS.COM

  To understand the vast distributed navigation system of DNS, the two most crucial keys are the NS record and the SOA record. One determines "who is responsible," and the other defines "who has the final say," together forming the cornerstone of authorization and trust in the entire domain name system. Almost all DNS zone files begin with these two records; their existence allows DNS servers worldwide to collaborate, translating human-remembered domain names into machine-readable IP addresses.

  Let's first look at the NS record, short for Name Server record. Its function is very straightforward: it explicitly tells DNS resolvers worldwide which server is authorized to provide authoritative answers for a specific domain name. You can think of it as a "list of external contact departments" published in an organization's official manual. When a DNS recursive server receives a query for a domain name, it traces the root servers and top-level domain servers, ultimately being directed to the true authoritative DNS server through the NS record to obtain the answer.

  A domain name zone can have multiple NS records, both for redundancy (to prevent a server from failing) and for facilitating traffic distribution. There's an easily overlooked detail in NS records: the glue record. When the domain name pointed to by the NS record also belongs to the same zone (e.g., ns1.example.com as the NS server for example.com), a chicken-and-egg circular dependency problem occurs. To break this cycle, the parent DNS server must include the A record (IP address) corresponding to the NS server domain name when returning the NS record. This additional record is called the "glue record," and it is the crucial "glue" that allows the entire authorization chain to function properly.

  If the NS record is a list, then the SOA record is the "highest rule" and "management charter" of that list. SOA stands for Start Of Authority record. Its core mission is to identify which DNS server is the primary server among the many listed by the NS record, and it includes a series of core parameters for managing the synchronization and caching of that zone. Every DNS zone file must have an SOA record as its first record, and there can only be one.

  The key information contained in the SOA record is like a zone's management file. It first specifies the domain name of the primary DNS server through the "Primary Server" field, and then leaves the administrator's contact information through the "Responsible Person's Email" field, which is a crucial clue for regaining control in case of problems. However, its most important value lies in the following numerical parameters: the sequence number is an incrementing number that must be updated every time the zone data changes; the slave server determines whether data synchronization is needed by comparing the sequence number; the refresh interval defines how often the slave server checks the primary server's sequence number; the retry interval specifies how long to wait before retrying if the check fails; the expiration time is a safety valve; if the slave server cannot contact the primary server for an extended period, it will stop providing service after this time to prevent errors caused by its outdated data; finally, the minimum TTL value sets a "remember time" for negative caches (i.e., queries for non-existent domain names).

  At this point, the differences and connections between the two are very clear. NS records and SOA records together constitute a zone's "power structure." The NS record is like a "constitution," publicly declaring who is qualified to answer questions; while the SOA record is like a "president + parliament," establishing a central authority among these qualified individuals to release the final version and establishing a set of rules and processes to ensure information is synchronized across all members. You can think of the NS record as a signpost when asking for directions, telling you which machines to access; while the SOA record is the "synchronization protocol" and "master-slave specification" that these machines must adhere to, ensuring that regardless of which machine you ultimately ask, you receive a consistent answer based on the same authoritative database.

  Some questions and answers about NS and SOA records:

  Q1: If I change an NS record, how long will it take for it to take effect globally?

  A1: This depends on two levels of caching time. One is the TTL value of the NS record in your parent domain (e.g., the .com registry), and the other is the TTL value of the NS record on your old NS server. Before making changes, it's best to reduce the TTL value (e.g., 300 seconds) and wait for the original TTL to expire before making the changes. Changes typically take anywhere from a few hours to 48 hours to take effect, but the safest approach is to wait for the longer of the two time-to-live (TTL) periods before removing data from the old server.

  Q2: Can the primary server name in a domain's SOA record be any non-existent domain?

  A2: No. The "primary server" declared in the SOA record must be a real, existing DNS server domain name listed in the NS record list, responsible for resolving the zone. If a name not in the NS record is entered, or if it points to a non-DNS server, the entire authorization chain will break, and other DNS servers will not be able to trust the zone's authority.

  Q3: What happens if I delete a subdomain's NS record (i.e., cancel delegation), but the parent zone (primary domain) still has an A record for that subdomain?

  A3: This will cause resolution ambiguity or even failure. If a subdomain does not have an independent NS record for delegation, it is managed by the parent zone's DNS server by default. However, if both NS and A records point to the subdomain in the parent zone, but the subdomain's server lacks a corresponding SOA record, it will lead to inconsistent DNS responses. In severe cases, it may even cause some queries for the subdomain (such as MX mail records) to fail completely. The correct approach is either to fully delegate (with independent NS and SOA records) or to have the parent zone manage everything (keeping only A records in the parent zone).

  Q4: Does reverse lookup (PTR record) also need to be configured with NS and SOA records?

  A4: Yes, it does. Reverse lookup of the in-addr.arpa zone is essentially an independent DNS zone. It also needs an SOA record to define the primary server and synchronization parameters, and an NS record to declare which servers are authorized to answer DNS queries for that IP range.

DNS Amy
DNS Anna
DNS NOC
Title
Email Address
Type
Information
Code
Submit