Email stopped working after DNS change: how to fix it
Email stops after a DNS change when the MX records are missing, point to the wrong mail host, or were left mixed with old ones. Run an MX lookup first, compare it with your mail provider's required values, then check SPF, DKIM and DMARC.
- No MX or wrong MX means inbound mail has nowhere to go.
- Lost SPF, DKIM or DMARC records cause rejected or spam-foldered outbound mail.
- Nameserver moves often drop records that were not copied to the new zone.
How do you find what broke, in order?
- 01
Look up the MX records
Run
dig example.com MX +shortor use the MX lookup. Nothing returned means the records were never created or were deleted. - 02
Compare them with your provider's values
Use the mail provider's own documentation. Google Workspace, for example, documents
smtp.google.comwith priority 1 and says to delete other old MX records. - 03
Remove stale MX records
Google warns that email might not work correctly if old or incorrect MX records remain.
- 04
Check SPF, DKIM and DMARC
Without these, receiving servers may reject or spam-filter your mail. Use the SPF and DMARC checkers.
- 05
Check the mail hostname is not proxied
Cloudflare notes mail protocols do not work through its HTTP proxy. Set mail hostnames, including MX targets, to DNS only.
- 06
Check flattening and delegations
Cloudflare lists CNAME flattening, which can break providers that need CNAMEs for DKIM or autodiscover, and an MX pointing to a delegated subdomain.
What do the checks look like?
dig example.com MX +short
dig example.com TXT +short
-> look for one "v=spf1 ..." record
dig selector1._domainkey.example.com TXT +short
-> DKIM selector name comes from your mail provider
dig _dmarc.example.com TXT +shortWhich symptom points to which record?
| Symptom | Record to check | Why |
|---|---|---|
| No inbound mail arrives | MX | Senders cannot find your mail host |
| Bounce says domain not found | MX and zone existence | The zone or delegation is missing (NXDOMAIN) |
| Outbound mail goes to spam | SPF, DKIM, DMARC | Authentication records lost in a migration |
| Only some senders fail | Cached old MX, mixed MX set | Stale or duplicate records |
Moved nameservers? Copy every record
A new DNS host starts with an empty or partial zone. Before switching nameservers, export the old zone and confirm MX, SPF, DKIM, DMARC and any verification TXT records exist in the new one. Google states new MX records can take up to 72 hours to be recognized.
Before you change DNS next time
- Export or screenshot the current zone, including MX, TXT and CNAME records.
- Copy every mail record to the new zone before switching nameservers.
- Lower the TTL ahead of time so a rollback is quick.
- Send a test message to and from the domain right after the change.
- Keep only the MX records your current provider lists.
Good to know
Email is more fragile than the website after a DNS change because it depends on several record types at once: MX for delivery, TXT for SPF and DMARC, and CNAME or TXT for DKIM. A website can survive with one address record.
Make the mail records part of any migration checklist. They are small, easy to forget and invisible until messages start bouncing.
Common questions
Why did my email stop working after I changed nameservers?
The new DNS host probably does not have your old MX, SPF and DKIM records, since a nameserver change switches which zone answers. Recreate every mail-related record there, matching your mail provider's documentation.
How long until email works after I fix MX records?
It depends on caching. Google Workspace says it can take up to 72 hours for new MX records to be recognized. Sending servers that cached the old answer keep using it until the TTL expires.
Do I need to delete old MX records?
Yes, when you switch providers. Google warns that email may not work correctly if old or incorrect MX records remain. Mixed sets send some mail to the old host. Keep only the records your new provider lists.
Can proxying a record through a CDN break email?
Yes. Cloudflare says mail protocols do not work through its HTTP proxy, so the mail hostname and any hostname an MX record targets must be set to DNS only in that setup.
Keep reading
Catch DNS changes before mail breaks
Aepto DNS monitoring keeps a history of every DNS record change per domain and can email on every change or only risky ones.