What Is a Nameserver and What Happens When You Change It?
Nameservers decide where your domain's DNS records live. This guide explains delegation, what moves when you change them and how to switch without downtime.
10 min readUpdated Nov 19, 2026By XPASS Editorial Team

Every domain has to answer one question before anything else works: who is in charge of its DNS? The answer is a pair of hostnames called nameservers. They are the reason your website opens, your email arrives and a change in your control panel eventually shows up on the real internet. They are also the reason a rushed switch to a new provider can take a site offline for hours.
This guide explains in plain language what a nameserver is, how the registry and your registrar fit in, what actually changes when you point a domain to different nameservers, and how to make the switch safely. If you are new to the topic, it helps to read the overview in what DNS is and how it works for web builders first, and the guides on A records and AAAA records fill in the details of what lives on those servers.
What a nameserver is
A nameserver is a DNS server that holds the records for a zone and gives authoritative answers about it. When a visitor's resolver needs the address for www.example.com, it eventually reaches one of the nameservers assigned to example.com. That server returns the A record, the AAAA record, the MX record or whatever was asked for.
Nameservers are written as hostnames, for example ns1.provider-example.net and ns2.provider-example.net. Providers almost always give you at least two. If one is unreachable, resolvers can try the other, so your domain keeps working. The concept is part of the original DNS design in RFC 1034, which describes delegation of authority from one zone to another.
Nameserver versus record
A common confusion is mixing up the nameserver with the records themselves. The nameserver is the machine and service that answers. The records are the data stored on it. Changing a record changes one line of data; changing the nameservers changes who holds all the data. The second is a much bigger step.

How delegation works
DNS is a tree, and each level hands off to the next. This handing off is called delegation.
- The root zone knows which servers run each top-level domain such as
comororg. - The registry for the top-level domain keeps a list of delegations: for every registered domain, which nameservers are responsible for it. These are stored as NS records in the registry's zone.
- The nameservers you choose hold your own zone, with your A, MX, TXT and other records.
When you set nameservers at your registrar, you are asking the registrar to update the registry's NS records for your domain. Your registrar is the only party that can do this. That is why the nameserver setting is found in the domain management area rather than in the DNS record editor.
The overall rules for domain names and their registries are overseen at the global level by organisations such as ICANN, but day to day you only deal with your registrar and your DNS provider.
Registrar, DNS provider and host: three roles
These are often the same company, but they do not have to be.
| Role | What it does | Typical setting |
|---|---|---|
| Registrar | Holds your domain registration and tells the registry which nameservers to use | Nameserver fields in domain settings |
| DNS provider | Runs the nameservers that hold your zone | DNS record editor |
| Web host | Runs the server your website lives on | Gives you an IP address or a hostname |
If your registrar also provides DNS, the default nameservers point to it and you edit records in the same panel. If you move to another DNS provider, the registrar keeps your registration, but the records now live somewhere else.
What changes when you switch
Switching nameservers does not move your website, your email or your registration. It changes one thing: where DNS answers come from.
- Records at the old provider stop being used once caches expire. They are not deleted, but they are no longer consulted.
- Records at the new provider start being used. If they are missing or different, your website or email behaviour changes.
- Registration, ownership and expiry date stay exactly the same.
- Services that depend on DNS, such as email delivery, certificate validation and verification of third-party tools, follow whichever records the new provider holds.
The most frequent cause of trouble is a zone that was not copied over. If your old DNS had MX records for business email and the new zone does not, email may fail to arrive after the switch.
Why people change nameservers
- To use a DNS service with extra features, such as faster updates, health checks or an API.
- To manage DNS in the same place as the hosting platform.
- To consolidate several domains at one provider.
- To follow instructions from a service that requires its own nameservers.
None of these reasons are wrong, but each one should be weighed against the simpler alternative: leave the nameservers alone and just add the records the service asks for.
Step by step: change nameservers safely
- Find where DNS is currently hosted. Look up the NS records with
dig example.com NSor in the domain panel. This tells you the current authoritative servers. - Export or write down every existing record. Include A, AAAA, CNAME, MX, TXT and any special entries. Many providers let you export a zone file; if not, copy the records manually.
- Create the zone at the new provider and recreate all the records. Compare them line by line with the old list.
- Test the new zone before switching. Query the new nameservers directly, for example
dig @ns1.provider-example.net example.com A, and check that the answers match what you expect. - Lower the TTL on your important records at the old provider a day or two before the move, if you can.
- Replace the nameservers at your registrar with the exact values from the new provider. Enter them carefully, without extra spaces.
- Keep the old zone running for at least a few days. Some resolvers will keep using the old delegation until their cache expires.
- After a few days, check email delivery, the website and any third-party integrations, then retire the old zone.
A worked example
Imagine bakery-example.com is registered with one company, and its website runs on a hosting platform. The owner wants to move DNS to the hosting platform so that records can be updated from the same dashboard.
The hosting platform gives two nameservers. Before changing anything, the owner exports the current records: an A record for the website, a CNAME for www, three MX records for business email and two TXT records used for email sender authentication. She recreates all of them in the new zone and double-checks the MX priorities.
She tests the new nameservers directly with dig and sees the expected answers. Then she opens the domain settings at her registrar, replaces the old nameservers with the new pair and saves. For the next day or two, some visitors reach the site through the old servers and some through the new ones, and since both zones contain the same records, nobody notices. After three days, she confirms mail is arriving and retires the old zone.
Checking which nameservers are in use
dig example.com NS +shortlists the nameservers resolvers currently see.dig example.com NS @a-tld-serverstyle queries ask the registry's servers directly; this shows the delegation itself, which can differ from what your registrar's panel says if a change is still being processed.- A WHOIS or RDAP lookup also shows the nameservers registered for the domain.
- Compare the NS list from the registry with the NS records inside your zone. They should match. A mismatch is a common cause of inconsistent behaviour.
Common mistakes when changing nameservers
A short list of errors accounts for most failed switches.
- Switching first and building the zone afterwards. Between the moment the new nameservers take over and the moment you finish adding records, visitors and mail servers receive empty or wrong answers.
- Using nameservers from a tutorial instead of the ones assigned to your own account. Many DNS providers give each customer a specific pair, and using someone else's pair may not work for your zone.
- Mixing nameservers from two providers. A domain should list only the nameservers of one provider, because resolvers pick among the listed servers and may get inconsistent data.
- Forgetting that subdomains follow the zone. Every subdomain record, such as
shopormail, must also be present in the new zone. - Skipping a final check. After the switch, test the website over HTTPS, send and receive a real email, and confirm that any third-party tool that checks a TXT record still verifies.
What to do if something breaks
If the website or email fails right after the switch, do not panic and do not change ten things at once. First check whether the new nameservers answer for your zone. If they do not, set the registrar back to the old nameservers, which still hold a working copy, and fix the new zone before trying again. If they answer but a record is missing, add the missing record at the new provider. Because the old zone is still running, some visitors will keep working during this repair, which is exactly why the overlap period matters.
Limits and what to watch for
Nameserver changes are powerful and slightly unforgiving, so keep these points in mind.
- Delegation data is cached by resolvers, often with a longer TTL than ordinary records. Do not assume a switch is instant, and do not delete the old zone the same day.
- If you enter a nameserver that does not answer for your zone, the domain can stop resolving completely. This is sometimes called a lame delegation. Always test the new nameservers before the switch.
- Some DNS features, such as DNSSEC, need extra steps when you change providers. If DNSSEC is enabled and you switch without updating or removing the DS record at the registry, validating resolvers may reject your domain. Check with both providers before moving a signed domain.
- Some registrars let you set "glue" records if your nameservers are inside your own domain. These need correct IP addresses and are best left to experienced users.
- Changing nameservers affects every record in the zone, including those you may have forgotten, such as verification entries for email or search tools.
- Domain transfers are a separate process. Moving DNS does not transfer the registration, and transferring a registration does not necessarily move DNS.
Summary
A nameserver is the server that answers DNS questions for your domain, and the nameservers set at your registrar decide which provider's records the internet will use. Changing them does not move your website, email or registration, but it does change where all DNS data comes from, so the new zone must contain every record you need. Copy the records first, test the new nameservers directly, lower TTLs, make the switch, and keep the old zone for several days. Be careful with DNSSEC and with records that are easy to forget, such as MX and TXT.
When you are ready to register a domain or review where its DNS is managed, the domains page is a good place to start.
Frequently asked questions
What is a nameserver?
A nameserver is a server that stores the DNS records for a domain and answers questions about them. The nameservers listed for your domain at the registry are the authoritative source for everything else, such as your A and MX records.
What happens when I change nameservers?
The world starts asking the new nameservers for your records. Any records you created at the old provider are no longer used, so you must recreate them at the new one before or at the moment you switch.
Will changing nameservers move my domain registration?
No. Registration stays with your registrar. Changing nameservers only changes which service answers DNS questions for the domain.
How long does a nameserver change take?
It depends on caching. The delegation data at the top-level registry is cached according to its own TTL, which is often long, so some visitors may reach the old servers for a day or more. Keep the old zone running during the transition.
How many nameservers should a domain have?
Most registries require at least two so that DNS keeps working if one is unreachable. Use exactly the names your DNS provider gives you.
About the author

Bob Kanokphon Thongdee
- Founder of XPASS VPN
- Co-founder of eSIMonline.asia
- More than 7 years in online marketing
- Founder of Cojourney Visa and Cojourney Travel
Ready to register your domain?
Search a name, compare extensions and pay once for the years you choose.
.com registration from $18.81 for the first year
Search domainsKeep reading

Domain & DNS Guides
What Is DNS? A Plain Explanation for Web Builders
DNS is the naming system that connects your domain to your website and email. This guide explains lookups, record types, TTL and caching in plain language.
10 min read

Domain & DNS Guides
What Is an A Record and How Do You Point a Domain to a Server?
An A record links a domain name to an IPv4 address. This guide explains how it works, how to point your domain at a server, and what to check when it does not resolve.
10 min read

Domain & DNS Guides
What Is an AAAA Record and How Does It Relate to IPv6?
The AAAA record is the IPv6 counterpart of the A record. This guide explains the format, when you need it, how to add it safely and how to test that IPv6 works.
10 min read