NS Lookup: Find Nameservers |
Nameservers are the servers that hold a domain's DNS records. Their names are published as NS records, both in the domain's own zone and at the registry (.com, .org…), and every lookup of the domain ends at one of them. This lookup lists each nameserver's IPv4 and IPv6 addresses.
What Are Nameservers?
A domain's nameservers are the authoritative servers that answer for its records; the registry points the world to them.
When someone visits your site, their resolver asks the root servers, which send it to the registry of the ending (.com, .uk…). The registry doesn't know your records, only which nameservers do: that list is the delegation, and you set it at your registrar. The resolver then asks one of those nameservers and caches the answer.
What is an NS record?
An NS record names one nameserver of a zone, for example example.com. NS ada.ns.cloudflare.com.
A domain has one per nameserver, and the same list exists twice: at the registry (the delegation) and in
the zone itself. The two should match; the check above compares them. NS records always point to a
hostname, never to an IP address.
Who Is My DNS Provider?
The nameserver names usually reveal the provider: *.ns.cloudflare.com is Cloudflare, awsdns is Amazon Route 53.
| Nameservers look like | DNS provider |
|---|---|
ada.ns.cloudflare.com | Cloudflare |
ns-123.awsdns-45.com | Amazon Route 53 |
ns-cloud-a1.googledomains.com | Google Cloud DNS |
ns1-01.azure-dns.com | Azure DNS |
ns01.domaincontrol.com | GoDaddy |
ns01.squarespacedns.com | Squarespace |
dns1.registrar-servers.com | Namecheap |
dns1.p01.nsone.net | NS1 (IBM) |
a1-64.akam.net | Akamai |
The lookup recognises about 40 providers. When the names are the domain's own
(ns1.example.com), it shows the network that runs them instead. Three different companies are
often involved: the registrar where you bought the domain (see the
domain WHOIS), the DNS provider that runs the
nameservers, and the web host your A record points to (see website to IP).
How to Change Nameservers (and Check It Worked)
Change them at your registrar, not at the DNS provider. The registry updates within minutes, but resolvers may keep the old nameservers until the TTL expires, up to 2 days for .com.
- Copy every record first. Create the zone at the new DNS provider with all the records (A, MX, TXT…) before you switch, so nothing breaks while resolvers move over.
- Change the nameservers at your registrar, using the names the new provider gives you.
- Check the registry: look up the domain above. The "Listed in" column shows whether each nameserver is at the registry and in the zone.
- Check the resolvers: click "Compare all DNS servers" to see which public resolvers already return the new nameservers.
- Wait before closing the old account: keep the old zone running for at least 48 hours.
Nameserver Health Check
This DNS health check looks for what healthy DNS needs: at least two nameservers that all answer, with the same SOA serial, matching the registry's list.
| Check | What it means, and what to do if it fails |
|---|---|
| Answers | Each nameserver must reply. A dead one makes resolvers wait and retry; if all are dead, the domain is down. |
| Authoritative | A server that replies without the authoritative flag, or refuses, is a lame delegation: it's listed but doesn't have the zone. Load the zone on it or remove it from the list. |
| Same serial | The SOA serial is the zone's version number. Different serials mean a server hasn't synced the latest change; if it lasts, zone transfers are failing. |
| Registry = zone | The registry and the zone should list the same nameservers. A difference is normal for a short time after a change; otherwise fix the list at the registrar. |
| Glue | Nameservers inside the domain itself (ns1.example.com) need their IP addresses at the registry too, or resolvers can't find them. |
| Two or more, two networks | RFC 1034 requires at least two nameservers, and RFC 2182 recommends different networks. Big anycast providers meet this with many sites behind each address. |
The SOA record shown above also has the zone's timers: how often secondary servers refresh, when they give up, and how long resolvers cache "name not found".
Do it yourself
How to Find Nameservers with nslookup or dig
nslookup -type=ns example.com or dig example.com ns +short; dig +trace example.com shows the delegation from the root.
Windows Command Prompt
nslookup -type=ns example.com
nslookup -type=soa example.com
Windows PowerShell
Resolve-DnsName example.com -Type NS
Resolve-DnsName example.com -Type SOA -Server ada.ns.cloudflare.com
Mac / Linux dig
dig +short example.com ns
dig +trace example.com
dig +norecurse @a.gtld-servers.net example.com ns
dig +short @ada.ns.cloudflare.com example.com soa
The third command asks the .com registry directly for the delegation, as this page does; the last one asks a nameserver for its SOA serial. Repeat it for each nameserver to compare serials.
How This NS Lookup Works
| NS records | Live query (no cache) to the server you pick: Google, Cloudflare, Quad9, OpenDNS, DNS4EU, AdGuard, Control D, Yandex, or the domain's authoritative servers; or all of them with "Compare" |
| Zone | If the name has no NS records (www.example.com), its parent zone is checked |
| Registry | A non-recursive NS query to a server of the parent zone (for example a.gtld-servers.net for .com), with its glue records |
| Each nameserver | Resolved to its IPv4 and IPv6 addresses; each IPv4 address gets a non-recursive SOA query with a 3-second timeout. IPv6 addresses are listed, not tested |
| Network | ASN and owner of each address from the GeoLite2-ASN database |
| Runs on | Our server in the US (AWS, N. Virginia) |
| What we keep | Lookups are not saved. Our server and Cloudflare keep standard access logs. |
Frequently Asked Questions
How do I find a domain's nameservers?
nslookup -type=ns example.com or dig example.com ns +short.How do I know who my DNS provider is?
*.ns.cloudflare.com means Cloudflare, ns-….awsdns-… means Amazon Route 53, *.domaincontrol.com means GoDaddy. This page names the provider for you, or the network that runs the nameservers when the names aren't a known pattern.What are GoDaddy's nameservers?
domaincontrol.com, for example ns01.domaincontrol.com and ns02.domaincontrol.com. The numbers vary, so use the pair your GoDaddy account lists for the domain, or enter the domain above. To keep GoDaddy's DNS but send the site to another host, change the A record instead of the nameservers.What are Squarespace's nameservers?
squarespacedns.com. Domains bought through Squarespace usually use ns01 to ns04.squarespacedns.com together with NS1's dns1 to dns4.p01.nsone.net (IBM's NS1 is the DNS provider for many Squarespace domains). A domain registered elsewhere and connected by nameservers uses connect1.squarespacedns.com and connect2.squarespacedns.com. Enter the domain above to see the ones it uses now.What are primary and secondary nameservers?
How long does a nameserver change take?
How many nameservers should a domain have?
What does "SOA serial mismatch" mean?
Is NS lookup the same as nslookup?
nslookup is a command that can query any record type; to look up all records of a domain online, use the DNS lookup.Next steps