webmail or shop stops resolving. In most of these cases the mail server and the new DNS host are fine. The new zone just doesn't contain every record the old one had.
Why the website survives and everything else breaks
www. Those are exactly the records that make the website work, so the first test after the switch passes and everyone moves on.
The records that get left behind are the ones nobody looks at day to day. MX records. The SPF TXT record. DKIM public keys under _domainkey. The _dmarc record. Verification tokens added years ago for a search console or an email suite. autodiscover and SRV records that mail clients use for automatic setup. CAA records. Subdomains someone created once and forgot about.
Some providers offer an import that scans for common names. That helps, but a scan can only find names it guesses. A DNS zone usually can't be listed from the outside: zone transfers (AXFR, the mechanism that copies a whole zone between servers) are normally restricted to approved secondary servers. So anything the import didn't guess, it didn't copy.
This is why a support desk can get two tickets that sound unrelated, mail broke and a domain is suddenly unverified, for the same domain on the same day.
Rule out the red herrings first
BASH
# Which nameservers the domain is delegated to now (via your normal resolver)
dig NS example.com +short
# Ask the new and old authoritative servers directly, bypassing caches
dig @ns1.new-dns.example example.com MX +norecurse
dig @ns1.old-dns.example example.com MX +norecurseaa flag means the server answered authoritatively. A status of NOERROR with an empty answer section means the name exists but has no record of that type. NXDOMAIN means the name doesn't exist in that zone at all. REFUSED from the old server usually means it no longer hosts the zone.
That last case matters. If the old provider has already dropped the zone, your source of truth becomes a zone file export, a backup, or the record list in the old control panel. If the old server still answers, export or save what it has before anything else changes.
Diff the two zones name by name
DKIM-Signature header has an s= tag with the selector, and the record lives at selector._domainkey.yourdomain.
Then query every name and type on both servers and print only the differences:
BASH
#!/usr/bin/env bash
# Compare records on the old and new authoritative servers.
# Replace these placeholders with your real nameservers and domain.
OLD='ns1.old-dns.example'
NEW='ns1.new-dns.example'
DOMAIN='example.com'
# '@' means the zone apex. Add your own subdomains and DKIM selectors.
NAMES='@ www mail webmail autodiscover autoconfig _dmarc default._domainkey _autodiscover._tcp'
TYPES='A AAAA CNAME MX TXT CAA SRV'
for name in $NAMES; do
if [ "name" = '@' ]; then fqdn="DOMAIN"; else fqdn="name.DOMAIN"; fi
for type in $TYPES; do
# Sort so that answer order doesn't create false differences
old=(dig @"OLD" "fqdn" "type" +short +norecurse | sort | paste -sd ' ' -)
new=(dig @"NEW" "fqdn" "type" +short +norecurse | sort | paste -sd ' ' -)
if [ "old" != "new" ]; then
echo "fqdntype | old: {old:-<none>} | new:{new:-<none>}"
fi
done
done<none> for the old server, check that it still answers for the zone before trusting the comparison.
Any line where the old server has a value and the new one shows <none> is a missing record. That's your fix list.
What each missing record does to mail
mail.example.com that wasn't copied. The MX then leads nowhere.
Without the SPF TXT record, receivers can't confirm which servers are allowed to send for the domain. Without the DKIM key, signatures on outgoing mail can't be verified. Either one tends to push mail into spam or into rejection when the domain has a strict DMARC policy. A missing _dmarc record removes the policy and stops aggregate reports, so the problem can go unnoticed longer.
Missing autodiscover, autoconfig, or SRV records mostly hurt new mail client setups. Existing accounts configured with a fixed hostname keep working as long as that hostname still resolves.
Verification TXT records are the quiet ones. Many services re-check them periodically, so a domain can show as verified for a while and then flip to unverified later.
Fix, then verify in the right order
- Re-run the diff against the authoritative servers until only expected differences remain.
- Check the same names through a public resolver, and keep negative caching in mind.
- Send a test message from an outside mailbox and read the
Authentication-Resultsheader forspf=pass,dkim=pass, anddmarc=pass. - Trigger the verification check again in each service that uses a TXT token.
BASH
# The last number in the SOA answer is the negative caching value, in seconds
dig @ns1.new-dns.example example.com SOA +noall +answer