
Nameservers are the DNS servers that hold the official records for your domain and answer questions about it, such as which server hosts the website and where email should go. Your registrar tells the rest of the internet which nameservers to ask. Change them and you change who controls your domain's DNS. This guide explains what nameservers are, how to check them, and how to change them without breaking your site or email.
Key takeaways
- Nameservers are authoritative DNS servers. They hold your domain's DNS records and give the final answer in a lookup.
- Nameservers decide where your DNS records live. DNS records (A, MX, TXT and so on) decide what the answers are.
- Check a domain's nameservers with
dig NS example.com,nslookup -type=NS example.com, or a WHOIS lookup. - Before changing nameservers, copy every DNS record to the new provider and turn off DNSSEC at your registrar.
- The change happens at the registrar, but caches can keep the old nameservers for up to the TTL, which is two days for .com delegations.
What are nameservers?
Cloudflare's documentation defines nameservers as "DNS servers that answer DNS queries about the domains they are authoritative for," and describes authoritative nameservers as the servers that hold the definitive DNS records for a domain and provide the final response in DNS resolution (Cloudflare Docs).
"Authoritative" is the important word. Plenty of DNS servers can tell you a domain's IP address from their cache, but only the domain's own nameservers hold the source data. The DNS standard also requires redundancy: "we require every zone to be available on at least two servers" (RFC 1034, section 4.1). That is why registrars ask for at least two nameservers.
In October 2026, example.com used two Cloudflare nameservers.
$ dig NS example.com +short
hera.ns.cloudflare.com.
elliott.ns.cloudflare.com.Where nameservers fit in a DNS lookup
When someone visits your site, their DNS resolver works its way down the DNS tree:
- It asks a root server, which refers it to the servers for the top-level domain (for example
.com). - The
.comservers don't know your website's address, but they do know your domain's nameservers. That referral, called the delegation, is what you set at your registrar. - The resolver asks your nameservers, which return the actual record, for example the A record with your server's IP address.
You can watch this happen with dig +trace, which the BIND documentation describes as tracing "the delegation path from the root name servers for the name being looked up" (BIND 9 manual):
dig +trace example.comNameservers vs DNS records
People often mix these up, and it causes most "I changed my DNS but nothing happened" problems.
| Nameservers | DNS records | |
|---|---|---|
| What they are | The servers that are authoritative for your domain | The individual entries in your domain's zone |
| Examples | ns1.host.example, hera.ns.cloudflare.com | A, AAAA, CNAME, MX, TXT |
| Where you change them | At your domain registrar | At whichever provider your nameservers point to |
| What they control | Who answers DNS questions for the domain | What the answers are (website IP, mail server, verification text) |
In DNS terms, an NS record names "a host which should be authoritative for the specified class and domain" (RFC 1035, section 3.3.11). The records under it live in the zone on those servers.
In practice, edit records with the provider your nameservers point to. If your domain uses your registrar's nameservers, changes made in your hosting control panel (for example cPanel's Zone Editor, which creates and edits A, CNAME, MX, TXT and other records per cPanel's docs) won't be seen by anyone, and the reverse is also true.
How to find a domain's current nameservers
With an online tool
Run a WHOIS lookup to see the nameservers listed in the domain's registration and which registrar manages it. The DNS lookup tool shows the NS records along with the domain's other records.
With dig (macOS and Linux)
dig NS example.com +shortTo see what the registry itself hands out, which is the delegation set at the registrar, ask a .com server directly with recursion turned off. The BIND manual explains that +norecurse clears the "recursion desired" bit, so the server answers from its own data:
dig +norecurse @a.gtld-servers.net example.com NSThe authority section of the reply lists the nameservers and their TTL. In October 2026 the .com servers returned these delegations with a TTL of 172800 seconds (48 hours). Use the matching registry servers for other TLDs; dig NS org +short lists them for .org, for example.
With nslookup (Windows)
Microsoft documents the -type=<resourcerecordtype> option for returning a specific record type (Microsoft Learn):
nslookup -type=NS example.comAdd a server address at the end to query a specific resolver, for example nslookup -type=NS example.com 1.1.1.1.
How to change nameservers
Registrar dashboards differ, but the job is the same everywhere. Follow these steps in order.
1. Get the exact nameserver names
Your new DNS provider or host gives you the nameserver hostnames. If you are moving to WaseerHost, use the nameservers in your WaseerHost welcome email or client area. Copy them exactly. Cloudflare warns that if the names "are not copied exactly, your DNS will not resolve correctly" (Cloudflare Docs).
2. Recreate your DNS records at the new provider first
The new nameservers only know about records you have added there. Before switching, copy every record that matters: the A/AAAA records for the root domain and www, any subdomains, MX records for email, and TXT records for SPF, DKIM, DMARC and site verification. Cloudflare notes that activating a domain without the correct records can leave visitors with DNS_PROBE_FINISHED_NXDOMAIN errors. A DNS lookup of your domain before the change gives you a list to work from.
3. Turn off DNSSEC if it is on
If your domain uses DNSSEC, your registrar holds a DS record that matches your current DNS provider's signing keys. Cloudflare's guidance is to remove the DS record at the registrar first, wait for its TTL to expire (they suggest 24 to 48 hours, and you can check with dig DS example.com), and only then change nameservers. If you skip this, validating resolvers return SERVFAIL because the cached DS record no longer matches the new provider's keys (Cloudflare DNSSEC docs).
dig DS example.com +shortAn empty result means no DS record is published.
4. Update the nameservers at your registrar
- Log in to the registrar that manages the domain. A WHOIS lookup tells you which one it is.
- Open the domain's settings and find the nameserver or DNS section.
- Choose the option to use custom nameservers.
- Remove all the old nameservers and enter the new ones. Don't leave a mix of old and new.
- Save the change.
Cloudflare's official video shows the same flow at a registrar. The steps are the same whichever DNS provider you are moving to:
5. Wait, then verify
Cloudflare says to allow up to 24 hours for the registrar to update the nameservers. Then check the registry's delegation directly, as shown above, and your own resolver:
dig +norecurse @a.gtld-servers.net example.com NS
dig NS example.com +shortKeep the old DNS provider's zone and the old hosting running until both show the new nameservers.
6. Turn DNSSEC back on
Once the change has settled, enable DNSSEC at the new provider and add its DS record at your registrar.
Propagation and TTL: what the wait really is
"Propagation" is mostly caching. Every DNS record carries a TTL, which RFC 1035 defines as the time interval "that the resource record may be cached before the source of the information should again be consulted," measured in seconds (RFC 1035, section 3.2.1). Cloudflare puts it simply: a longer TTL "means that updates to your records take longer to go into effect" (Cloudflare TTL docs).
For a nameserver change, two waits stack up:
- The registrar and registry update. This is the up-to-24-hours step above.
- Caches holding the old delegation. A resolver that looked up your domain recently may keep using the old nameservers until the cached NS records expire. With the 48-hour TTL the
.comservers used in October 2026, plan for up to two days.
During that window some visitors reach the old provider and some the new one. That is harmless if both serve the same records, which is why step 2 matters. Your own computer may also hold a cached answer for a while, as Cloudflare notes that local caches can take longer to update.
Common mistakes when changing nameservers
- Typos or a mixed set. One misspelled nameserver, or old and new nameservers listed together, gives inconsistent answers. Replace the full set.
- Missing MX and TXT records. The website comes back but email stops, or SPF and DKIM checks fail. Copy mail records before you switch.
- Leaving the DS record in place. With DNSSEC on, a nameserver change without removing the DS record makes the domain fail for validating resolvers.
- Child nameservers without glue. If your nameservers are inside your own domain, such as
ns1.yourdomain.com, resolvers can't find their IP addresses without glue records. RFC 1034 describes glue as address records for name servers that are needed only when "the name server's name is 'below' the cut" (RFC 1034, section 4.2.1). Register the nameserver hostnames with their IP addresses at your registrar. Cloudflare's docs warn that without these records "DNS lookups for your domain will fail" (Cloudflare Docs). You can see glue in practice in the additional section ofdig +norecurse @a.gtld-servers.net cloudflare.com NS, which lists the IP addresses forns3.cloudflare.comand its siblings. - Editing records in the wrong place. After the switch, make DNS changes at the new provider only.
- Cancelling the old service too early. Wait until the new nameservers show everywhere and email arrives at the new server.
If you are moving a site to new hosting rather than only changing DNS, free website migration covers copying the site. You can also register new domains on the domains page, and for the bigger picture of how domains and hosting fit together, see web hosting vs domain name.
Frequently asked questions
A nameserver stores a domain's DNS records and answers queries about them with authority. When a browser needs your website's IP address or a mail server needs your MX records, the lookup ends at your nameservers. They are what make your domain point to your hosting and email.

Written by
Web & AI Systems Lead
Web and AI Systems Lead at Wasevo, the company behind WaseerHost. He builds web applications and AI systems.


