How to change nameservers without downtime
Moving DNS to a new provider doesn't have to break your site or email. Copy the zone, test it, handle DNSSEC, switch the NS records and keep the old zone alive.
· 8 min read · By the Spot Downtime team
Changing nameservers moves the authority for your whole domain from one DNS provider to another. Done carefully it is invisible to visitors. Done carelessly it takes down your website, your email and every verification record you forgot about, and you cannot undo it quickly, because the old delegation stays cached for a day or two.
The safe approach is simple: build a complete copy of the zone at the new provider, prove it answers correctly, only then switch the delegation, and keep the old zone running until the change has settled everywhere.
Why a nameserver change is different from a record change
When you edit an A record, resolvers keep the old answer for the record's TTL. When you change nameservers you are editing the NS records at the parent zone (for example the .com registry). You don't control the TTL of that delegation; for many top-level domains it is around 48 hours. During that window some resolvers ask the old nameservers and others ask the new ones.
That means both sets of nameservers must return the same correct answers for the whole window. If either one is missing a record, a share of your visitors gets a broken site, and which share changes from minute to minute. For background see DNS propagation explained and DNS TTL explained.
Step 1: export every record from the old provider
Start with a full inventory, not just the records you remember. Ask the old provider for a zone file export if it offers one. If it doesn't, and the provider allows zone transfers, you can try one yourself:
# Find the current nameservers
dig +short NS example.com
# Try a zone transfer (many providers disable this)
dig AXFR example.com @ns1.oldprovider.exampleIf neither works, query each record type for the apex and for the names you know exist. Don't forget the ones that are easy to miss:
- MX records and the mail-related TXT records: SPF, DKIM selectors (
selector._domainkey), DMARC (_dmarc) and MTA-STS. See SPF, DKIM and DMARC explained. - TXT verification records for Google, Microsoft, Apple, Stripe, GitHub and similar services.
- CAA records, which control which certificate authorities may issue for the domain. See DNS CAA records.
- SRV records and subdomain
CNAMEs pointing at SaaS products. - Provider-specific features that have no standard equivalent: ALIAS or ANAME records at the apex, geo or weighted routing, and health-checked failover. These must be rebuilt by hand and may behave differently.
Step 2: recreate the zone at the new provider
Create the zone at the new provider, import or enter the records, and note the nameservers it assigns you. At this point nothing is live, because the registrar still points at the old nameservers. That is what makes it safe to take your time.
Step 3: test the new zone before switching
Query the new nameservers directly and compare their answers to the old ones. The @server syntax in dig skips the delegation and asks that server itself:
NEW=ns1.newprovider.example
OLD=ns1.oldprovider.example
for t in A AAAA MX TXT NS CAA; do
echo "== $t"
diff <(dig +short example.com $t @$OLD | sort) \
<(dig +short example.com $t @$NEW | sort) && echo same
done
# Subdomains that matter
for h in www api mail _dmarc selector1._domainkey; do
echo "== $h"
diff <(dig +short $h.example.com ANY @$OLD | sort) \
<(dig +short $h.example.com ANY @$NEW | sort) && echo same
doneSome servers answer ANY queries minimally, so check the specific types you care about too. Any difference is either an intended change or a missing record. Fix it now.
Step 4: lower TTLs ahead of time (optional but useful)
Lowering record TTLs a day or two before the switch doesn't speed up the NS change itself, but it means that if you have to correct a record in the new zone afterwards, the fix reaches resolvers in minutes instead of hours. Set the TTLs on the old zone and keep them identical in the new zone. After the migration has settled, raise them again.
Step 5: deal with DNSSEC first
DNSSEC is the most common cause of a nameserver move turning into a full outage. If your domain is signed, the registrar holds a DS record that ties the domain to the old provider's signing keys. If you switch nameservers and leave that DS record in place, validating resolvers see signatures that don't match and return SERVFAIL. The site looks completely down for anyone using such a resolver. See DNS SERVFAIL.
Check whether the domain is signed:
dig +short DS example.com @a.gtld-servers.net
# empty output means no DS record at the parent (not signed)If it is signed you have two safe options:
- Turn DNSSEC off first. Remove the
DSrecord at the registrar, wait for its TTL to expire (check it, it can be a day), then change nameservers. Re-enable DNSSEC at the new provider afterwards and publish the newDS. - Use a provider-supported key rollover. Some providers support multi-signer setups or importing the existing keys. Only do this if both providers document the procedure.
Step 6: change the nameservers at the registrar
Replace the old nameserver names with the new ones at your registrar. Use the exact hostnames the new provider gave you, and all of them; most providers assign two to four. If the nameservers are inside the domain itself (glue records), the registrar needs to be told their IP addresses too.
Don't move registrar and DNS on the same day
Step 7: watch the change roll out
Immediately after the change, ask the parent zone what the delegation is now, and check from several places:
# What the registry says (for a .com domain)
dig +norec NS example.com @a.gtld-servers.net
# What public resolvers return
dig +short NS example.com @1.1.1.1
dig +short NS example.com @8.8.8.8Test the things that matter to people, not just DNS answers: load the website, send a test email to and from the domain, and run through any login that depends on a verification record.
Step 8: keep the old zone for at least 48 hours
Don't cancel the old DNS service the moment the registrar shows the new nameservers. Leave the old zone in place, and keep it identical to the new one, for at least the delegation TTL plus a margin. If you change a record during the migration, change it in both places. Only after you are confident that resolvers have moved on should you delete the old zone. Many teams wait a week.
Checklist
- Export or inventory every record, including mail, CAA, SRV and verification TXT records.
- Create the zone at the new provider and rebuild any provider-specific record types.
- Query both sets of nameservers directly and diff the answers.
- Lower record TTLs a day or two before the change.
- If the domain is signed, remove the
DSrecord first and wait out its TTL. - Change the nameservers at the registrar, using every hostname provided.
- Verify the website, email and certificate issuance.
- Keep the old zone running and in sync for 48 hours or more.
Monitoring DNS during and after a migration
A migration is exactly when a record goes missing without anyone noticing, and a missing MX or TXT record usually shows up as a customer complaint days later. A DNS monitor in Spot Downtime resolves a record on a schedule and alerts you if the lookup fails or an expected value is missing. You can set up one for each record that matters (apex A, www, MX, SPF TXT) before you switch, so you are told straight away if the new zone is incomplete. See how to monitor DNS records for the details, and the DNS provider outage playbook for what to prepare in case a provider fails later.
Get new guides by email
Practical posts on monitoring, outages, error fixes and on-call, when they're published. No spam.
Keep reading
- DNS · Troubleshooting · MonitoringSplit-horizon DNS: why internal and public lookups differ, and how to monitor bothSplit-horizon DNS gives different answers inside and outside your network. How it breaks, how to debug it with dig, and how to monitor the public and internal view.November 25, 2026 · 6 min read
- How-to · DNS · MonitoringHow to monitor DNS records (A, MX, TXT and more) in Spot DowntimeA step-by-step guide to DNS monitoring: pick the record, list the values you expect, choose a resolver, and get alerted when a record disappears or changes.November 2, 2026 · 4 min read