Name Server (NS Record)

DNS Record Types
A DNS server authoritative for a domain, specified by NS records that delegate control to specific servers.
← Back to Glossary

What is a Name Server?

A name server is a DNS server that stores DNS records for a domain and responds to queries about that domain. NS (Name Server) records specify which name servers are authoritative for a domain, delegating DNS resolution responsibility to those servers.

How Name Servers Work

The DNS hierarchy relies on delegation through NS records:

1. Root Servers point to TLD servers via NS records

2. TLD Servers (.com, .org) point to domain name servers via NS records

3. Domain Name Servers contain the actual DNS records (A, MX, CNAME, etc.)

Query: example.com

→ Root: "Ask .com servers" (NS records)

→ .com: "Ask ns1.example.com" (NS records)

→ ns1.example.com: "Here's the IP" (A record)

NS Record Format

example.com.    IN    NS    ns1.example.com.

example.com. IN NS ns2.example.com.

Each domain typically has 2-4 name servers for redundancy.

Glue Records

When name servers are within the domain they serve, "glue records" provide their IP addresses:

example.com.    IN    NS    ns1.example.com.

example.com. IN NS ns2.example.com.

ns1.example.com. IN A 203.0.113.1

ns2.example.com. IN A 203.0.113.2

Without glue records, you'd have a circular dependency: to resolve ns1.example.com, you'd need to query ns1.example.com.

Types of Name Servers

Authoritative Name Servers

Hold the actual DNS records for domains they're responsible for. When queried, they provide definitive answers.

Recursive Resolvers

Query other servers on behalf of clients. Your ISP's DNS or services like Cloudflare (1.1.1.1) and Google (8.8.8.8) are recursive resolvers.

DNS Hosting Providers

Managed authoritative DNS services:

ProviderExample NS
Cloudflarens1.cloudflare.com
AWS Route 53ns-1234.awsdns-56.org
Google Cloudns-cloud-a1.googledomains.com
GoDaddyns1.godaddy.com

Changing Name Servers

At Your Registrar

Name servers are changed through your domain registrar's control panel. This updates the NS records at the TLD level.

Propagation Time

Name server changes can take 24-48 hours to propagate globally due to caching at various DNS levels.

Migration Steps

1. Set up DNS at new provider - Create all records before switching

2. Lower TTLs - Reduce TTLs on critical records

3. Update NS at registrar - Point to new name servers

4. Wait for propagation - Monitor resolution across regions

5. Verify and restore TTLs - Check all records work, then normalize TTLs

Checking Name Servers

Using dig:
dig example.com NS

; ANSWER SECTION:

example.com. 86400 IN NS ns1.example.com.

example.com. 86400 IN NS ns2.example.com.

Using whois/RDAP:

Name server information is also available in registration data.

Using DomScan:
curl "https://domscan.net/v1/health?domain=example.com"

# Returns hasNS status in health check

Name Server Best Practices

Redundancy

Always use at least two name servers, preferably on different networks:

example.com.    NS    ns1.provider.com.    ; Network A

example.com. NS ns2.provider.com. ; Network B

Geographic Distribution

For global audiences, use geographically distributed name servers to reduce latency and improve resilience.

TTL Configuration

NS record TTLs are typically long (86400 seconds / 24 hours) since name servers change infrequently.

Monitoring

Monitor your name servers for:

Name Servers and Domain Availability

When a domain has no NS records configured, it typically indicates:

However, NS record absence doesn't indicate domain availability—use RDAP/WHOIS for registration status.

Common NS Issues

Lame Delegation

When NS records point to servers that don't actually serve the domain's records. This breaks DNS resolution.

NS Record Mismatch

Discrepancies between NS records at the registrar and in the zone file can cause resolution issues.

Missing Glue Records

If name servers are within the domain but lack glue records, resolution fails with a circular dependency.

Name servers are the backbone of DNS delegation—proper configuration ensures your domain resolves correctly worldwide.

Put This Knowledge to Work

Use DomScan's API to check domain availability, health, and more.