A nameserver is the server that holds a domain's DNS records and answers queries about them. When a resolver needs the address of example.com, the nameservers listed for that domain are the ones with the authoritative answer. Without them, the name has nowhere to point.
This guide explains what nameservers do, how they differ from resolvers, what an NS record is, and how to check or change the nameservers for a domain you own.
What a nameserver does
A nameserver stores the records for one or more DNS zones: the A and AAAA records that point a name at an address, the MX records for email, the TXT records for verification and mail policy, and the rest. It answers from that data alone, so it is described as authoritative. It answers authoritatively for data it serves, but can return a referral when a child zone has been delegated elsewhere.
ICANN defines an authoritative name server as a DNS server that hosts the official database of resource records for a DNS zone. The parent zone publishes NS records identifying the authoritative servers. Glue address records may also be needed so resolvers can reach those servers; multiple authoritative servers provide redundancy.
Need the domain first?
Runs the same live check as the front page. If it is taken we will show you when it expires.
Nameservers, resolvers and the rest of the chain
The word "nameserver" gets used loosely, so it helps to separate the roles. A DNS lookup involves four kinds of server:
- Recursive resolver. Asks other servers on your behalf and caches the answers. It normally retrieves and caches answers rather than hosting your authoritative zone.
- Root nameserver. Points the resolver at the server for the relevant top-level domain.
- TLD nameserver. Knows which nameservers are delegated for each domain under its extension.
- Authoritative nameserver. Holds the domain's records and gives the final answer.
Your domain's nameservers are in the last group. The DNS overview covers the whole path in order.


The NS record that lists them
The nameservers for a domain are published as NS records. One set sits in the parent zone, telling the TLD servers which servers to refer queries to; another set normally sits inside the domain's own zone, listing the same servers. A typical example:
example.com. 21600 IN NS ns1.exampleserver.com.
example.com. 21600 IN NS ns2.exampleserver.com.Two practical rules follow from how NS records work. They must point at hostnames, never at a CNAME, and they are the records you change when you move a domain from one DNS provider to another.
Primary and secondary nameservers
Almost all domains use more than one nameserver, because a single server is a single point of failure. The usual arrangement is one primary, which receives edits, and one or more secondaries, which hold copies of the zone and answer queries too. When the primary is updated, the secondaries pick up the change.
That redundancy is why DNS providers hand out a pair of nameservers rather than one, and why NS records should list every server that answers for the zone. If one is unreachable, resolvers can try another and the name still resolves.
What nameservers look like
Nameservers are hostnames, so they look like domain names themselves. Providers often number them:
ns1.example.comandns2.example.comfor a hosting company's own servicelola.ns.cloudflare.comandsean.ns.cloudflare.comfor a zone-assigned pair at a DNS providerns-320.awsdns-42.comfor a provider that encodes a zone number in the name
Managed DNS providers normally assign these names and the addresses behind them. Custom nameserver setups can use hostnames you control. You normally never type the IP addresses yourself.
How to check a domain's nameservers
Several methods show the same delegation. A WHOIS lookup is the simplest, since most WHOIS services list the nameservers along with the registrar. The command line gives the same answer and is easier to repeat:
dig NS example.com @1.1.1.1
dig NS example.com @8.8.8.8
nslookup -type=NS example.com 1.1.1.1The first two run on macOS and Linux, the third on Windows. Asking two different public resolvers is deliberate: disagreement may reflect cached data or a configuration problem; it does not by itself prove the cause. Our WHOIS lookup shows the nameservers recorded for a domain, and where is my domain registered helps if you need to find the account that controls them.
How to change nameservers
Nameservers are changed at the registrar, not at the old DNS provider. The new provider supplies its assigned nameservers. Before replacing the existing entries, copy and verify the website, email and other required records at the new provider, and save the old delegation for rollback. Follow the provider’s DNSSEC migration instructions: a stale DS record can stop validation. Then replace the entries in the registrar’s control panel and verify the delegation. If the move fails, use the saved delegation and provider guidance to restore service; do not delete the old zone prematurely. As the delegation and cached answers update, resolvers begin using the new servers. Prepare and check the new zone before switching.
The change is not instant. The timing depends on the registrar, registry and cached TTLs. Cloudflare tells users to allow up to 24 hours for registrar nameserver updates; other providers may give different guidance. During that window some visitors reach the old servers and some reach the new ones, so the old DNS zone should stay in place until the move has settled.
We have step-by-step instructions for the common registrars: GoDaddy and Namecheap. The same pattern applies elsewhere: find the nameserver section for the domain, replace both entries, save, then verify with a lookup.
When nameservers are the problem
A domain with correct records can still fail if the nameservers are wrong. Typical signs:
- The site does not load at all, and the browser reports that the server's address cannot be found.
- Email stops arriving even though the MX records look correct in the DNS panel.
- Two public resolvers return different nameservers for the same domain.
- A WHOIS lookup shows nameservers from an old host, long after the move.
In each case, check the delegation first, then the records. A records can only be read once the right nameserver is being asked. If the nameservers are correct but individual records misbehave, the issue is usually in the zone: what is a DNS record covers the rules that break configurations.
Do you need nameservers from a separate DNS provider?
Many hosts run nameservers for their customers, and using them is the simplest option: the records are managed in the same panel as the hosting. A separate DNS provider makes sense when you want DNS managed independently of the host, for example so that changing hosts does not mean changing nameservers, or when you need record types or DNSSEC controls that the host does not offer.
Either way, the mechanics are identical. The registrar points at a pair of nameservers, and those servers hold the zone.