Changing Nameservers: Step-by-Step Guide
Learn how to change nameservers safely, prepare the new DNS zone, avoid website and email downtime, and verify the domain after propagation.
Introduction
Changing nameservers means moving DNS control for a domain from one provider to another. The nameservers set at the registrar decide which DNS zone is live.
This is a sensitive change because nameservers control all DNS records for the domain, including website records, email routing, SPF, DKIM, DMARC, SSL validation, verification records and subdomains. If the new DNS zone is incomplete, the website may stop loading or email may stop working.
The safest process is simple: prepare the new DNS zone first, change nameservers second, then verify website, email and SSL after the change.
Quick answer
To change nameservers safely, copy all important DNS records to the new DNS provider before updating nameservers at the registrar. This includes A, AAAA, CNAME, MX, TXT, SPF, DKIM, DMARC, CAA and verification records. After switching nameservers, check propagation and verify that website, email and SSL still work.
What does changing nameservers mean?
Changing nameservers means changing which DNS provider is authoritative for your domain.
For example, your domain may currently use:
ns1.oldprovider.com
ns2.oldprovider.com
If you change it to:
ns1.newprovider.com
ns2.newprovider.com
then the DNS zone at the new provider becomes responsible for answering public DNS queries.
This is different from editing one DNS record. A nameserver change can affect the entire domain.
Registrar vs DNS provider vs hosting provider
Registrar
- Where the domain is registered and renewed
- This is usually where nameservers are changed
Change NS at registrar → new DNS zone goes live
DNS provider
- The provider whose nameservers are active
- This is where live DNS records must be managed
ns1.cloudflare.com → edit A, MX, TXT here
Hosting provider
- The server or platform where website files are hosted
- Hosting and DNS can be at the same provider, but they do not have to be
Website on VPS, DNS at Cloudflare
A domain can be registered at one company, use DNS at another company, and host the website at a third company.
Before changing nameservers
Before changing nameservers, copy or recreate these records in the new DNS zone:
- A and AAAA records for the root domain
- CNAME or A records for www
- MX records for incoming email
- SPF TXT record
- DKIM TXT records
- DMARC TXT record
- CAA records if used
- verification TXT/CNAME records
- important subdomains such as mail, app, panel, shop, docs or client portals
- custom records used by SaaS platforms
- DNSSEC/DS settings if enabled
Do not switch nameservers until the new DNS zone contains the records needed by your website, email and connected services.
Nameserver change checklist
Website
A, AAAA, CNAME, www
Why it matters: Controls where the website and subdomains load.
Email routing
MX records
Why it matters: Controls where incoming email is delivered.
Email authentication
SPF, DKIM, DMARC TXT records
Why it matters: Helps mail servers authenticate outgoing email.
SSL issuance
CAA and validation TXT records
Why it matters: Can affect certificate issuance and renewal.
Domain verification
TXT/CNAME verification records
Why it matters: Used by Google, Microsoft, SaaS tools and website platforms.
Subdomains
app, mail, panel, shop, docs, client portals
Why it matters: Important subdomains may have separate DNS records.
Security/advanced
DNSSEC, DS records, custom nameservers
Why it matters: Can break DNS validation if not moved correctly.
Why this matters
Changing nameservers matters because the new nameserver provider must already contain the correct DNS records. If important records are missing, the domain may point nowhere, email may stop routing, SSL validation may fail, or connected services may lose verification.
The most common mistake is changing nameservers before copying the old DNS zone.
How to check current nameservers
Use DNS Lookup or WHOIS Lookup to check which nameservers are currently active for the domain.
When checking a nameserver change, compare
These five areas help confirm the migration is ready and complete.
Current nameservers
The nameservers currently returned publicly.
New nameservers
The nameservers provided by the new DNS provider.
Old DNS zone
The records currently used by the domain.
New DNS zone
The records prepared at the new provider.
Important records
Website, email, SSL and verification records that must exist in the new zone.
Check nameservers now
Use DNS Lookup to see which nameservers currently control your domain.
Common nameserver change problems
Website stops working after nameserver change
HighThe new DNS zone is missing the correct A, AAAA or CNAME records.
Next step: Compare the old DNS zone with the new DNS zone and restore website records.
Email stops working after nameserver change
HighMX, SPF, DKIM or DMARC records were not copied to the new DNS provider.
Next step: Restore mail records from the old DNS zone or email provider documentation.
Nameservers were changed at the wrong account
MediumThe change may have been made for the wrong domain or at the wrong registrar account.
Next step: Confirm the domain and registrar before saving nameserver changes.
Old and new nameservers are mixed
HighThe domain may use nameservers from two different providers, causing inconsistent DNS answers.
Next step: Use the complete nameserver set from one DNS provider.
New DNS zone is empty
HighThe new DNS provider is delegated, but no DNS records were created there.
Next step: Create the DNS zone and add required records before or immediately after switching.
SSL issuance fails
MediumCAA records or DNS validation records may be missing from the new zone.
Next step: Check CAA records and SSL validation records.
Domain verification fails
MediumGoogle, Microsoft, SaaS or website-builder verification records were not copied.
Next step: Re-add the required TXT or CNAME verification records.
DNSSEC mismatch
HighOld DS records at the registrar may not match the new DNS provider’s DNSSEC keys.
Next step: Update or remove DS records according to the new DNS provider’s instructions.
Some users still see old DNS
LowResolvers may cache old nameserver or DNS answers for a while.
Next step: Wait for cache expiry and check from multiple resolvers.
How to change nameservers safely
-
Check current nameservers
Find which nameservers are active now. This tells you where the current live DNS zone is located.
-
Export or copy the current DNS zone
Save all existing DNS records before making changes. This is your reference if anything breaks.
-
Create the new DNS zone
At the new DNS provider, create the domain zone and add all required records before changing nameservers.
-
Copy website records
Add A, AAAA and CNAME records for the root domain, www and important subdomains.
-
Copy email records
Add MX, SPF, DKIM and DMARC records. These are often forgotten during nameserver changes.
-
Copy SSL and verification records
Add CAA records, DNS validation records and verification TXT/CNAME records used by Google, Microsoft, SaaS platforms or SSL providers.
-
Update nameservers at the registrar
Log in to the registrar and replace the old nameservers with the exact nameservers provided by the new DNS provider.
ns1.newprovider.com ns2.newprovider.com -
Verify after propagation
Check nameservers, website loading, email delivery, SPF/DKIM/DMARC, SSL and important subdomains.
-
Keep the old DNS zone temporarily
Do not delete the old DNS zone immediately. Keep it until the new setup is confirmed stable.
Nameserver change examples
Old nameservers:
ns1.oldprovider.com
ns2.oldprovider.com
New nameservers:
ns1.newprovider.com
ns2.newprovider.com
dig example.com NS
dig +short example.com NS
dig @8.8.8.8 example.com NS
dig @1.1.1.1 example.com NS
dig example.com A
dig www.example.com A
dig example.com MX
dig example.com TXT
dig _dmarc.example.com TXT
dig example.com CAA
These examples are for checking only. Replace example.com and nameservers with your actual domain and provider values.
What to verify after changing nameservers
Website
Root domain loads, www loads, important subdomains load, and redirects work correctly.
MX records are correct, incoming email works, SPF exists, DKIM selectors exist, and DMARC exists if used.
SSL
SSL certificate is valid, certificate matches root and www, and CAA records do not block issuance.
Services
Google/Microsoft verification records exist, SaaS verification records exist, and CDN or website platform recognizes the domain.
Rollback plan
Before changing nameservers, keep a rollback plan in case website or email breaks.
A simple rollback plan includes:
- old nameserver values
- copy of the old DNS zone
- registrar login access
- list of critical DNS records
- hosting/email provider access
- support contacts if needed
Rollback may still be affected by DNS cache, so prevention is better than emergency reversal.
Frequently asked questions
Where do I change nameservers?
Nameservers are changed at the domain registrar, where the domain is registered and renewed.
Will changing nameservers break my website?
It can if the new DNS zone does not contain the correct A, AAAA, CNAME or subdomain records.
Will changing nameservers break email?
It can if MX, SPF, DKIM or DMARC records are missing from the new DNS zone.
Do I need to change nameservers when moving hosting?
Not always. Sometimes you only need to update A or CNAME records at the current DNS provider.
How long does a nameserver change take?
Some resolvers update quickly, while others may continue using cached data for several hours.
Should I delete the old DNS zone after switching?
No. Keep the old zone temporarily until website, email, SSL and verification records are confirmed working.
What if email stopped working after changing nameservers?
Check MX, SPF, DKIM and DMARC records in the new DNS zone. They are often missing after nameserver changes.
What is the safest way to change nameservers?
Prepare the new DNS zone first, copy all critical records, update nameservers at the registrar, then verify website, email and SSL.
Related tools
Use these free tools to verify your configuration after applying changes.
Related guides
Browse all DNS & Domain guides →Need help applying this fix?
Send us your domain, report link or issue details. CheckDomainHealth will review the request and route it to the right technical team if hands-on support is needed.
Was this guide helpful?
Your feedback helps us improve our guides for everyone.
Thanks for your feedback!