Skip to main content

NS Record

Stands For: Name Server Record

Definition: An NS record is a type of resource record in the Domain Name System (DNS) that specifies the authoritative name servers for a particular domain. These records are responsible for delegating a domain or subdomain to a set of DNS servers that hold the actual DNS records for that zone.

Key Characteristics:

  • Purpose: To direct DNS queries to the correct servers that contain the official DNS records for a domain. NS records form the backbone of DNS delegation, making the hierarchical and distributed nature of DNS possible.
  • Delegation: When a user tries to access www.example.com, the DNS resolution process involves finding the authoritative name servers for example.com by querying the parent .com servers. The .com servers respond with the NS records for example.com, telling the resolver where to go next to find the A record for www.
  • Redundancy: For fault tolerance and high availability, a domain must have at least two NS records, pointing to geographically and network-diverse name servers.
  • Structure: A typical NS record includes:
    • Name: The domain being delegated (e.g., example.com).
    • TTL (Time to Live): The caching duration.
    • Class: IN (for Internet).
    • Type: NS.
    • Name Server: The hostname of an authoritative name server (e.g., ns1.dns-provider.com.).

Glue Records: If a name server’s hostname is a subdomain of the domain it serves (e.g., the name server for example.com is ns1.example.com), a circular dependency occurs. To solve this, a “glue record” (an A or AAAA record for ns1.example.com) must be provided by the parent DNS zone (e.g., the .com servers). This glue provides the IP address needed to reach the name server directly.

Related Records:

  • SOA (Start of Authority) Record: Every DNS zone contains an SOA record that declares which name server is the primary source of information for that zone. This primary name server is always listed in one of the domain’s NS records.

Usage Note: As of June 2025, NS records are a fundamental and critical part of a domain’s configuration. They are typically set at the domain registrar, which propagates them to the parent Top-Level Domain (TLD) registry. Incorrectly configured NS records can make an entire domain and all its services completely unreachable on the internet.