Lesson 6 of 9 · 26m
Safe DNS Migrations: Cutovers, Delegation Moves, and Email Without Casualties
A field-tested sequence for moving websites, providers, nameservers, and mail while caches, certificates, and human assumptions are against you.
The worst DNS migration I have seen took three days because the team changed nameservers, hosting provider, MX records, and TLS automation in the same hour. Every failure had a different cache lifetime. Since then my rule has been simple: one migration means one kind of change, and every change has a pre-verified destination.
Build the destination before touching DNS
curl -I --resolve www.sudosecurity.org:443:203.0.113.25 https://www.sudosecurity.org/
curl -I --resolve www.sudosecurity.org:443:2001:db8:10::25 https://www.sudosecurity.org/--resolve bypasses DNS while preserving SNI and Host. If TLS, redirects, application headers, and IPv6 are wrong here, DNS cannot fix them.
The low-TTL ritual, with dates
- At least one full old-TTL period before change, lower target TTLs to 300.
- Verify several resolvers count down from below 300.
- Confirm old and new service are both healthy.
- Change DNS and watch real traffic, errors, certificates, and resolver answers.
- Restore normal TTL only after the rollback window closes.
Do not lower only the A record and forget AAAA. A migration can be perfect for IPv4 and broken for a third of users because IPv6 still points at the old host.
Nameserver changes are two operations
Moving providers means loading the complete zone at the new provider, comparing answers directly against its authoritative servers, updating zone NS records if needed, changing registrar delegation, and keeping the old provider serving until parent TTLs expire.
dig @new-ns1.provider.net www.sudosecurity.org +noall +answer
dig @new-ns1.provider.net sudosecurity.org SOA +noall +answerDeleting the old zone the moment registrar paperwork succeeds strands every resolver holding the old delegation in cache.
Mail migrations are reputation migrations
Before changing MX, create accounts and routing at the destination, lower TTLs, align SPF, publish DKIM selectors, understand DMARC policy, and decide what happens to overlap mail.
@ 300 IN MX 10 mail.protection.outlook.com.
@ 300 IN TXT "v=spf1 include:spf.protection.outlook.com -all"Lower MX preference numbers win. Changing priority on the same hostname can be a smaller rollback surface than swapping to an untested hostname, but both forms cache.
Certificates move too
If DNS moves to a provider API, ACME DNS-01 credentials, CAA policy, and renewal automation move with it. The post-migration outage often appears weeks later when renewal fails.
dig CAA sudosecurity.org +short
certbot certificatesEven if certificates are not due, prove the renewal path with a dry run.
Field notes
- Write rollback DNS values in the change ticket before starting; panic is a bad editor.
- Keep old infrastructure alive through the maximum old TTL, not just until dashboards look quiet.
- Registrar locks, DNSSEC DS records, and transfer approvals add human latency. Treat them as dependencies, not paperwork.
- Query corporate, mobile, and public resolvers; they see different cache states and sometimes different intentional answers.
Was this lesson helpful?