How to Find a Domain's Nameservers: NS Lookup Explained
Find a domain’s nameservers, compare NS records across multiple domains and separate recursive answers from parent-zone delegation.
To find a domain’s published nameservers, query its NS records. You can do this in a browser with DNSBatch or from a terminal with nslookup or dig. Start with the domain itself, such as example.com, rather than assuming its www hostname has its own nameservers.
An NS lookup is a useful starting point when you need to find where DNS is managed, check a provider migration, or compare several domains. The important next step is understanding which part of DNS your answer represents: a recursive resolver’s view is not a complete check of the domain’s delegation.
What nameservers do
An authoritative nameserver publishes DNS data for a zone. That data can include the A and AAAA records for a website, MX records for incoming email, and TXT records used for verification or email policies. NS records identify the nameservers associated with the zone.
Your registrar and DNS host can be different companies. The registrar manages registration and usually provides the interface for changing the domain’s delegation. The DNS host operates the servers that publish the zone. Your website host can be a third company again.
For example, buying a domain from one company and hosting a website elsewhere does not automatically move DNS management to the web host. Follow the actual delegation rather than guessing from who sends the hosting invoice. See the DNS introduction for the resolver and authoritative-server distinction.
Find nameservers with a browser-based NS lookup
- Open the Bulk NS Checker.
- Enter the domain you want to investigate, such as
example.com. - Leave Expected nameservers empty for lookup only, or enter the complete assigned set to compare it with the answers.
- Choose Cloudflare or Google as the public resolver and select Check Nameservers. No queries run before you start.
- Read each returned nameserver hostname, TTL and comparison result. A provider hint is a hostname-pattern estimate, not proof of account ownership.
- Export all completed results as CSV if you need a snapshot to compare with a later check.
To inspect a portfolio, enter one domain per line. DNSBatch supports up to 500 unique domains in a batch. Search and filter the completed results to isolate domains that returned records, no matching records, or resolution errors.
Compare nameservers for multiple domains
Group domains by the nameserver set they should use. Copy the complete assigned set from the relevant DNS account into Expected nameservers, then run that group. A provider may assign different pairs to different zones; one provider label is not one universal expected set.
The comparison ignores order, letter case and a final dot. Missing or additional hostnames prevent an exact match. Select Show mismatches to find exceptions, but also review Lookup error and No NS records: neither is counted as a usable set that mismatches your expectation. Export includes every completed row, even when a filter hides it.
For example, ns1.dns-host.example and ns2.dns-host.example form one illustrative expected set. A result containing ns1 and ns3 from that host family is a mismatch, not a match just because both suggest the same provider. Follow the nameserver mismatch investigation before changing delegation.
Compare nameservers across your domains. For an audit that also includes website addresses, TXT verification and email routing, use the bulk DNS audit checklist.
Use the domain’s actual zone name. A query for www.example.com can return no NS records even when example.com is healthy: the www label may simply be an address or alias inside the parent zone. A separately delegated subdomain, such as department.example.com, can have its own NS records.
Check NS records with nslookup or dig
On a system with nslookup, request the NS type explicitly:
nslookup -type=NS example.com
To ask a particular public resolver, add its address:
nslookup -type=NS example.com 1.1.1.1
nslookup -type=NS example.com 8.8.8.8
If dig is installed, an equivalent focused query is:
dig @1.1.1.1 example.com NS +noall +answer
These are query examples, not evidence that the example domain uses any particular provider. Microsoft documents the resolver argument and record-type options in its nslookup reference. For a broader command walkthrough, see practical nslookup examples.
Read the nameserver answer correctly
A simplified, illustrative answer might be:
example.com. 3600 IN NS ns1.dns-provider.example.
example.com. 3600 IN NS ns2.dns-provider.example.
The first name is the record owner. 3600 is the displayed TTL in seconds, IN is the Internet class, and the final hostname is a nameserver. A trailing dot indicates a fully qualified DNS name; it is not an extra character to remove from the provider’s identity.
Multiple NS records normally represent a set of authoritative servers. They do not use MX-style preference numbers. The order in a lookup result does not identify a primary server, and a larger set is not automatically healthier than a smaller one.
A provider-looking hostname can suggest who operates the DNS service, but it is not proof of ownership or account access. Some services use branded nameservers, and organizations can operate nameservers under their own domain. Confirm the management account before editing records.
Recursive NS answers versus registrar delegation
Two related configurations matter:
- Parent delegation: the parent zone tells resolvers which servers to ask for the child zone. For an ordinary
.comdomain, this delegation comes from the.comzone. - Child-zone NS records: the authoritative zone also publishes its own NS set. A recursive NS query can return this information from cache or after resolution.
During a migration, those sets can disagree. Changing NS records inside the old DNS dashboard does not necessarily change the parent delegation. Likewise, selecting new nameservers at the registrar does not copy your A, MX or TXT records into the new zone.
For a deeper investigation, dig +trace example.com NS can help follow the delegation path. It needs direct DNS connectivity and requires interpretation; it is not the same operation as DNSBatch’s recursive lookup. Cloudflare’s delegation troubleshooting guide explains how to investigate what a parent zone actually publishes.
If nameserver hostnames sit within the domain they serve, glue records may also be needed to make the servers reachable during resolution. DNSBatch does not audit glue or contact every authoritative server independently.
Why nameservers can still look old after a change
A recursive resolver may retain a cached answer. Another resolver may have refreshed more recently. Compare the queried name, record type, resolver and lookup time before deciding that a change failed.
Run the same list once through each provider and compare the exports. DNSBatch’s optional fallback only handles eligible connection failures; it does not automatically perform simultaneous checks from many locations.
If both public resolvers continue returning an unexpected provider, inspect the delegation and confirm that the change was saved for the correct domain. If lookups return SERVFAIL instead, investigate resolution and DNSSEC configuration rather than assuming you only need to wait. The propagation and caching guide explains why TTL is evidence rather than a universal countdown.
A checklist before moving DNS providers
- Record the current delegation and export the existing zone using your DNS provider’s supported tools.
- Create the complete zone at the destination, including mail and verification records.
- Confirm the exact nameservers assigned to your account; do not copy another customer’s pair.
- Plan DNSSEC changes with the provider’s migration instructions so that parent DS records and the new zone’s keys remain consistent.
- Change the registrar delegation when the destination is ready.
- Check the website’s A and AAAA records, email’s MX records, and required TXT data after the move.
An NS lookup helps verify part of that process. Successful NS answers alone do not prove the website, mailboxes, certificates or every authoritative server are working.
Common questions about nameserver lookups
Are nameservers the same as DNS resolvers?
No. In this context, nameservers publish the domain’s authoritative zone, while a recursive resolver finds and caches answers for clients. Selecting Google or Cloudflare in DNSBatch chooses the recursive resolver for the lookup; it does not change your domain’s nameservers.
Does an NS lookup show where a website is hosted?
It shows nameserver information, not a reliable website-hosting identity. DNS hosting, web hosting and registration can all be separate. Inspect A, AAAA and CNAME records for the website’s routing, and remember that a CDN can hide the origin server’s address.
Can I list every DNS record by knowing the nameservers?
Not with an ordinary NS lookup. DNSBatch asks for selected record types at the names you provide. It does not enumerate every subdomain or perform a zone transfer. Start with the record-type reference to choose the next useful query.
Compare nameserver sets across multiple domains
Use the Bulk NS Checker when you need to compare up to 500 domains with the same expected nameserver set. It lists missing and unexpected nameservers, separates lookup errors from mismatches, and exports the exact returned values. If your provider assigns each domain a different set, check domains in groups with the same expected set. This comparison does not verify parent-zone delegation.
For the next step, learn the difference between nameservers and DNS records, follow the nameserver change checklist, or diagnose a nameserver mismatch before editing delegation.