Nameservers control which DNS provider serves a domain's records. Knowing how to check nameservers is essential when troubleshooting DNS issues, confirming a migration, or verifying that a domain change has propagated. This guide covers every method — from web tools to command-line utilities.
Why Check Nameservers?
You need to check nameservers when:
- You have changed nameservers at your registrar and want to confirm the change has propagated.
- DNS changes are not taking effect and you need to verify which provider is serving records.
- You are onboarding a domain and need to know where its DNS is currently hosted.
- You suspect a domain hijacking or unauthorized nameserver change.
- You are auditing domains before or after a migration.
Method 1: Use the ShowDNS NS Lookup Tool
The fastest method is to use the ShowDNS NS Lookup tool:
- Go to showdns.net/ns-lookup.
- Enter the domain name (e.g.,
example.com). - Click Lookup.
- The tool returns the current NS records from multiple global locations.
This method is useful because it shows what nameservers resolvers worldwide see — not just what your local DNS returns. This is important during nameserver transitions.
Method 2: Using nslookup
nslookup is available on Windows, macOS, and Linux:
# Query NS records using nslookup
nslookup -type=NS example.com
# Query against a specific resolver (e.g., Google Public DNS)
nslookup -type=NS example.com 8.8.8.8Example output:
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
example.com nameserver = ns1.example-dns.com.
example.com nameserver = ns2.example-dns.com.Method 3: Using dig
dig is available on Linux and macOS, and provides more detailed output:
# Query NS records
dig example.com NS
# Short output (nameservers only)
dig example.com NS +short
# Query from a specific resolver
dig example.com NS @1.1.1.1
# Trace from root to authoritative (shows full delegation)
dig example.com NS +traceExample output from dig example.com NS +short:
ns1.cloudflare.com.
ns2.cloudflare.com.Method 4: Using whois
The whois command returns the nameservers registered at the domain registrar (in the parent zone). This shows what the registrar has on file — which may differ from what DNS currently returns during a propagation period:
whois example.com | grep -i "Name Server"Name Server: NS1.EXAMPLE-DNS.COM
Name Server: NS2.EXAMPLE-DNS.COMVerifying Nameserver Propagation
After changing nameservers at your registrar, propagation can take 24–48 hours. To verify that the change is spreading globally:
- Use the ShowDNS DNS Propagation Checker to query NS records from multiple global locations.
- Look for consistency — all locations should return the new nameservers once propagation is complete.
- During the transition, some locations may still return the old nameservers. This is normal and resolves as resolver caches expire.
Checking if NS Records Match the Registrar
A common problem is a mismatch between the nameservers at the registrar and the NS records in the zone itself. This can cause resolution failures. To compare them:
# Step 1: Check NS records as seen by the TLD (registrar level)
dig example.com NS +trace | grep -A5 "example.com"
# Step 2: Query the authoritative nameserver directly
dig example.com NS @ns1.example-dns.com
# The output should matchCommon Nameserver Issues
| Issue | Symptom | Fix |
|---|---|---|
| Wrong nameservers at registrar | DNS changes don't take effect | Update NS at registrar to match DNS host |
| Nameserver not responding | Intermittent DNS failures | Check nameserver health; consider adding more NS records |
| Only one nameserver configured | Single point of failure | Add at least two NS records on different servers |
| NS mismatch between registrar and zone | DNSSEC validation failures | Ensure NS records in the zone match registrar configuration |
Frequently Asked Questions
How many nameservers should a domain have?
A domain should have at least two nameservers for redundancy. If one is unreachable, the other can still serve DNS queries. Most DNS providers configure two to four nameservers. Using nameservers on different physical networks or providers increases resilience.
How long does a nameserver change take?
Nameserver changes typically propagate within 24–48 hours, though many resolvers see the change much faster (often within a few hours). The propagation time depends on the TTL of the NS record in the parent (TLD) zone — this is controlled by the registry, not by you.
Can I check nameservers for a domain I don't own?
Yes. NS records are public DNS data. Anyone can query nameservers for any domain using the tools described in this guide.