NS Lookup: Find Nameservers

See which nameservers run a domain's DNS, and check they work.
More Tools

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.

The .com registry delegates example.com to its two nameservers, which hold the same version of the zone.
Root → registry → your nameservers. (Example names.)

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 likeDNS provider
ada.ns.cloudflare.comCloudflare
ns-123.awsdns-45.comAmazon Route 53
ns-cloud-a1.googledomains.comGoogle Cloud DNS
ns1-01.azure-dns.comAzure DNS
ns01.domaincontrol.comGoDaddy
ns01.squarespacedns.comSquarespace
dns1.registrar-servers.comNamecheap
dns1.p01.nsone.netNS1 (IBM)
a1-64.akam.netAkamai

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.

  1. 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.
  2. Change the nameservers at your registrar, using the names the new provider gives you.
  3. Check the registry: look up the domain above. The "Listed in" column shows whether each nameserver is at the registry and in the zone.
  4. Check the resolvers: click "Compare all DNS servers" to see which public resolvers already return the new nameservers.
  5. 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.

CheckWhat it means, and what to do if it fails
AnswersEach nameserver must reply. A dead one makes resolvers wait and retry; if all are dead, the domain is down.
AuthoritativeA 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 serialThe 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 = zoneThe 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.
GlueNameservers 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 networksRFC 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

Diagram: a recursive resolver may answer NS records from cache up to the TTL; authoritative mode asks 8.8.8.8 for the NS records, resolves them and asks those servers directly for a live answer
Recursive answers can come from cache; the health check asks the servers themselves.
NS recordsLive 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"
ZoneIf the name has no NS records (www.example.com), its parent zone is checked
RegistryA non-recursive NS query to a server of the parent zone (for example a.gtld-servers.net for .com), with its glue records
Each nameserverResolved 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
NetworkASN and owner of each address from the GeoLite2-ASN database
Runs onOur server in the US (AWS, N. Virginia)
What we keepLookups are not saved. Our server and Cloudflare keep standard access logs.

Frequently Asked Questions

How do I find a domain's nameservers?
Type the domain above and click Lookup. You'll see its nameservers, each one's IP addresses and network, the DNS provider, and a health check. In a terminal, run nslookup -type=ns example.com or dig example.com ns +short.
How do I know who my DNS provider is?
Look at the nameserver names: *.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?
They end in 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?
They end in 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?
For visitors there's no difference: resolvers treat all of a domain's nameservers as equals and tend to prefer the faster ones, so the order you enter them at your registrar doesn't matter. The primary is the server that holds the original copy of the zone, named in the SOA record (the "Primary nameserver" line in the result); secondaries copy the zone from it.
How long does a nameserver change take?
The registry usually publishes the change within minutes to a few hours. Resolvers that already cached the old nameservers keep them until the TTL runs out: for .com and .net the registry's TTL is 2 days, so allow up to 48 hours. During that time, keep the old DNS provider serving the same records.
How many nameservers should a domain have?
At least two (RFC 1034 requires it), ideally on different networks (RFC 2182), so the domain stays reachable if one fails. Most providers give you two to four.
What does "SOA serial mismatch" mean?
The nameservers hold different versions of the zone: one hasn't received the latest change yet, so visitors can get different answers depending on the server they reach. It usually fixes itself within minutes; if it lasts, zone transfers to that server are failing.
Is NS lookup the same as nslookup?
No. An NS lookup finds a domain's nameservers. 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

Related Tools

DNS Lookup
All the DNS records of a domain, like the nslookup command.
Domain WHOIS Lookup
The registrar, dates and status of a domain.
CNAME Lookup
Follow a name's alias chain.
ASN Lookup
The network behind a nameserver's IP.

Related Guides

Guide What Is DNS?
Root, TLD and authoritative servers, and how a lookup finds them.