NS Record: What Nameserver Records Are, Parent vs Child Delegation, and Examples

An NS (Nameserver) record is a DNS resource record that declares which authoritative servers hold the master zone file and answer queries for a domain or subdomain. Recursive resolvers check NS records first to find where your DNS lives. The delegation of an NS record connects registrars to DNS hosts.

Visitor Resolver NS query Registry/Parent referral Your Nameservers A record IP ADDRESS the referral chain must be unbroken: one dead nameserver = intermittent failures
DNS Delegation Architecture: recursive resolvers query the parent registry zone to receive NS referrals directing lookups to your authoritative nameservers

What Is an NS Record and What Does Its Structure Look Like? (Syntax and Provider Examples)

An NS (Nameserver) resource record (IANA Type 2) acts as the authoritative delegation pointer that connects the global DNS hierarchy to your specific DNS hosting provider. Every active domain publishes its NS records in two locations simultaneously - in the parent Top-Level Domain (TLD) registry zone (such as .com, configured at your domain registrar) and at the apex (@) of your child zone file - across 4 zone fields (Host, TTL, Type, and Nameserver Target). The table below defines the structure of an NS record and lists the default nameserver naming patterns used by 6 major DNS providers.

Standard zone syntax illustrates root apex records alongside delegated subdomain entries:

; Host / Zone            TTL     Class  Type  Authoritative Nameserver Target (FQDN)
example.com.             86400   IN     NS    ada.ns.cloudflare.com.
example.com.             86400   IN     NS    bob.ns.cloudflare.com.

; Delegating a subdomain (app.example.com) to AWS Route 53 nameservers:
app.example.com.         3600    IN     NS    ns-2048.awsdns-64.com.
app.example.com.         3600    IN     NS    ns-2049.awsdns-65.net.

The table below details the technical specification of IANA Type 2 NS records and compares nameserver architectures across 6 major DNS providers:

DNS Provider / Specification Default NS Count Example Nameserver Hostname Pattern How Redundancy Is Architected
IANA Specification (Type 2) Minimum 2 (2 to 7 recommended) ns1.example.com. / ns2.example.com. Independent servers on separate subnets (RFC 2182).
Cloudflare DNS 2 nameservers <female-name>.ns.cloudflare.com & <male-name>.ns.cloudflare.com Global Anycast network across 300+ cities.
AWS Route 53 4 nameservers ns-xxx.awsdns-xx.com, .net, .org, and .co.uk Splits nameservers across 4 separate TLDs.
Google Cloud DNS 4 nameservers ns-cloud-a1.googledomains.com through a4 Distributed Anycast shards per zone.
Namecheap Basic/Premium DNS 2 to 5 nameservers dns1.registrar-servers.com & dns2.registrar-servers.com Multi-region Anycast clusters.
GoDaddy Standard DNS 2 nameservers nsXX.domaincontrol.com & nsYY.domaincontrol.com Sequential hostnames on paired IP ranges.

Provider architectures reflect differing resilience designs. AWS Route 53 assigns 4 nameservers across 4 distinct Top-Level Domains (.com, .net, .org, and .co.uk), ensuring resolvers reach alternate servers during a regional TLD registry outage. Cloudflare and Google Cloud utilize global Anycast routing where 2 or 4 hostnames distribute traffic across redundant edge nodes. Administrators verify live authoritative nameservers and inspect resolved endpoints using the NS Record Lookup and Nameserver Lookup (Find NS + IPs).

Parent TLD NS Records vs Child Zone NS Records: Why Both Sets Synchronize

Your domain's root NS records exist in two separate zones at the same time: the parent TLD registry zone (controlled by your domain registrar) and your own child authoritative zone file (controlled by your DNS host). The table below compares parent and child NS records and explains operational behaviors when they fall out of sync.

Dimension Parent Zone NS Records (Delegation) Child Zone NS Records (Apex Authority)
Where They Are Stored Inside the parent zone (such as .com at Verisign) At the top (@) of your own zone file alongside the SOA Record
Where You Edit Them Domain Registrar's "Nameservers" screen DNS Host's zone record editor
Authoritative Flag (AA) Referral response (AA=0) Authoritative answer (AA=1)
Typical TTL Fixed 48 hours (172,800 seconds) Configurable (3,600 to 86,400 seconds)
Role in a DNS Lookup Directs resolvers to your DNS host (How DNS Works) Confirms authoritative servers within your zone

Parent and child NS records frequently diverge during provider migrations. Resolvers initially follow parent TLD records to reach your DNS host. Upon receiving an authoritative response, resolvers discover child NS records carrying AA=1. Under RFC 2181 Section 5.4.1 trust rankings, AA=1 authoritative data supersedes parent referrals, prompting resolvers to overwrite their cache. Set mismatches trigger intermittent query drops and localized resolution failures. Administrators verify parent and child nameserver agreement using the DNS Delegation Checker.

How Many NS Records Should a Domain Have? (Redundancy, Subnets, and Anycast)

Every domain requires a minimum of 2 authoritative NS records (with 2 to 4 being standard and 7 being the practical maximum) to satisfy TLD registry rules and prevent single server failures from taking domains offline.

  1. Minimum of 2 Nameservers on Separate IP Networks (RFC 2182): TLD registries reject registrations specifying only 1 nameserver. Independent authoritative nameservers operate across separate IP subnets, distinct Autonomous System Numbers (ASNs), and isolated networks. Resolvers automatically fail over between servers in milliseconds.
  2. All Published NS Servers Serve Identical Zone Data (No Priority Ranking): Nameserver records lack priority numbers. Resolvers query all listed servers in parallel or track round-trip latency (RTT) to favor the fastest responder. Primary and secondary designations merely describe where zone edits originate (SOA MNAME).
  3. Why Anycast DNS Providers Only Need 2 to 4 NS Hostnames: Anycast routing platforms broadcast identical IP addresses globally via BGP. Each individual hostname (such as ada.ns.cloudflare.com) terminates across hundreds of edge locations, routing visitors to their nearest geographic node.

Publishing beyond 7 nameservers introduces protocol overhead without improving uptime. Legacy UDP limits restrict unfragmented response packets to 512 bytes (RFC 1035). Packing 8 or more NS records with IPv4 and IPv6 glue records triggers packet truncation (TC=1), forcing resolvers to fall back to slower TCP handshakes.

How to Delegate a Subdomain (sub.example.com) to Another DNS Provider Using NS Records

To manage a specific subdomain (such as app.example.com or mail.example.com) on a separate DNS provider without moving your main domain, publish child NS delegation records for that subdomain inside your main DNS zone across 4 steps:

  1. Create a standalone DNS zone for the subdomain (app.example.com) on the secondary provider and note the 2 to 4 assigned nameserver hostnames.
  2. Add production A, AAAA, MX, or TXT records inside the new subdomain zone first so nameservers answer authoritatively before receiving live queries.
  3. Open your primary domain DNS panel (example.com) and create NS records pointing the app host to the secondary provider's nameservers.
  4. Verify the delegation pathway with dig app.example.com NS +short to confirm proper referral resolution.
; Apex zone file (example.com):
; Host / Subdomain       TTL     Class  Type  Delegated Nameserver Target
app                      3600    IN     NS    ns-1024.awsdns-00.org.
app                      3600    IN     NS    ns-1025.awsdns-01.co.uk.

Subdomain delegation introduces two serious security risks. A lame delegation occurs when an NS record references a server lacking a configured zone, returning REFUSED or SERVFAIL. A dangling NS subdomain takeover occurs when teams delete a cloud zone while leaving child NS records active in the parent zone, allowing attackers to re-register the zone on that provider and hijack subdomain traffic.

What Are the 3 Strict Rules for NS Target Hostnames? (No IPs, No CNAMEs, and Vanity Glue Records)

DNS protocol specifications enforce 3 strict rules on every NS record target covering raw IP addresses, CNAME aliases, and in-bailiwick vanity nameserver glue records:

  1. An NS Record Never Points Directly to an IPv4 or IPv6 Address: Entering an IP address (such as 198.51.100.53) into the target field violates zone syntax. An NS record always specifies a Fully Qualified Domain Name (FQDN) like ns1.example.com., resolving to an IP via its own A Record or AAAA record.
  2. An NS Target Hostname Never Points to a CNAME Record: Pointing an NS target to a CNAME Record alias is strictly prohibited under RFC 2181 Section 10.3 and causes resolver delegation failures.
  3. Custom "Vanity" Nameservers (ns1.yourdomain.com) Require Glue Records at Your Registrar: Domains utilizing nameservers within their own apex domain (in-bailiwick hostnames) create circular resolution dependencies. Administrators register IPv4 and IPv6 glue records directly at the domain registrar to provide bootstrap addresses, auditable via the Glue Record Checker.

Domains using third-party nameservers (such as *.ns.cloudflare.com) avoid in-bailiwick glue requirements because parent registries resolve those hostnames through their respective TLD zones. Custom vanity nameservers require vigilance to keep registrar glue addresses aligned with server infrastructure.

How to Check Your Domain's NS Records (dig NS, dig +trace, and Browser DoH)

To inspect your domain's active authoritative nameservers and verify that your registrar's parent TLD delegation matches your child zone, run a browser DoH check or terminal dig query across 3 steps:

  1. Query authoritative NS records and trace parent TLD delegations:
    # 1. Query child NS records on Linux / macOS:
    dig example.com NS +short
    
    # 2. Trace parent TLD (.com) delegation vs child NS records:
    dig +trace example.com NS
    
    # 3. Query NS records on Windows:
    nslookup -type=ns example.com 1.1.1.1
  2. Compare NS records returned by TLD registries against your child zone records, evaluating cache lifetimes detailed in DNS TTL Explained.
  3. Track global propagation across recursive vantage points following registrar updates (which take up to 48 hours as explained in DNS Propagation) using the DNS Propagation Checker.

Auditing nameserver synchronization across parent and child zones preserves operational reliability throughout the broader index of DNS Record Types. Every production NS record (IANA Type 2) anchors DNS architecture by delegating authority from parent TLD registries to child nameservers. Deploying 2 to 4 nameservers on diverse subnets, configuring in-bailiwick glue records for vanity hostnames, and monitoring for lame delegations shields internet services from outages and subdomain hijacking.

Frequently Asked Questions

What is the difference between changing NS records and changing an A record? ▾

Changing your NS records at your domain registrar moves your entire DNS zone (web, email, and subdomains) to a new DNS hosting provider (like moving from GoDaddy to Cloudflare) and takes up to 48 hours. Changing an A record only updates the web server IP address while keeping DNS and email records at your existing DNS host.

Does ns1 get more traffic than ns2 in my NS records? ▾

No, NS records do not have priority numbers or follow a strict 1-then-2 order. Recursive resolvers treat all published NS records as equally authoritative peers, querying them in parallel or preferring whichever nameserver has the lowest network latency (RTT) from the resolver's location.

Why did my company email stop working right after I changed my nameservers (NS records)? ▾

In real-world migrations, this represents the most common outage: switching nameservers causes the previous provider to stop answering queries immediately. Omitting your MX, SPF, and DKIM records from the new provider's zone prior to delegating nameservers breaks incoming and outgoing email until administrators publish those records at the new DNS host.

Should I edit the root (@) NS records inside my Cloudflare or Route 53 DNS table when moving my domain away? ▾

No, in practice you change root nameservers inside your domain registrar's "Nameservers" console, not by editing @ NS rows inside your existing DNS host's table. You only add NS rows inside your DNS zone when delegating a subdomain (such as app.example.com) to separate nameservers.

Last verified: 2026-11-02