Quick Answer
Email typically stops working after domain changes because MX (Mail Exchanger) records weren't migrated to the new DNS provider or are pointing to the wrong mail server. When you change nameservers, all DNS records—including MX records—must be recreated at the new DNS provider. Fix this by adding MX records pointing to your email provider's mail servers, along with any A records the MX records reference. Email should resume within 1-4 hours after correct MX configuration.
Table of Contents
- Understanding Why Email Breaks During Domain Changes
- Common Domain Changes That Affect Email
- Quick Diagnosis: Can You Send, Receive, or Neither?
- Solution 1: Configure MX Records
- Solution 2: Add Supporting DNS Records
- Solution 3: Handle DNS Propagation
- Email Provider-Specific Configurations
- Avoiding Email Disruption During Migrations
- Advanced Troubleshooting
- Prevention Checklist
- Frequently Asked Questions
- Key Takeaways
- Next Steps
Understanding Why Email Breaks During Domain Changes
Email delivery relies on specific DNS records that tell mail servers where to send email for your domain. When you change DNS configuration, these critical records can be lost or misconfigured.
How Email Delivery Works
When someone sends email to [email protected], this happens:
- Sender's mail server looks up MX records for yourdomain.com
- DNS returns your MX record (e.g., mail.provider.com with priority 10)
- If MX points to hostname, sender looks up A record for that hostname
- Sender connects to the IP address from the A record
- Email is delivered to your mail server
If any DNS record in this chain is missing or wrong, email delivery fails.
The Critical DNS Records for Email
MX (Mail Exchanger) Records:
- Tell the internet where to deliver email for your domain
- Format: Priority and mail server hostname
- Example:
10 mail.provider.com - Most critical record for email
A Records (for mail server):
- Translate mail server hostname to IP address
- Example:
mail.provider.com → 192.0.2.1 - Required if MX record points to hostname
SPF Records (TXT record):
- Authorize which servers can send email on your behalf
- Prevents spam/spoofing
- Format:
v=spf1 include:_spf.provider.com ~all
DKIM Records (TXT record):
- Digital signature for email authentication
- Proves email hasn't been modified
- Format: Long cryptographic key in TXT record
DMARC Records (TXT record):
- Policy for handling failed SPF/DKIM
- Format:
v=DMARC1; p=quarantine; rua=mailto:[email protected]
What Happens During Domain Changes
Scenario 1: Nameserver Change
- You change nameservers from Provider A to Provider B
- Result: All DNS records at Provider A become inactive
- Impact: MX records disappear unless recreated at Provider B
- Email breaks: Because mail servers can't find where to deliver email
Scenario 2: DNS Record Update
- You update A record to point to new hosting server
- MX record points to your old server (mail.yourdomain.com)
- Result: MX now points to new server that has no mail service
- Email breaks: Because new server doesn't handle email
Scenario 3: Hosting Migration
- You move website to new hosting provider
- New host provides different DNS zone
- Result: Old DNS zone with MX records is replaced
- Email breaks: Unless email-specific records are preserved
Common Domain Changes That Affect Email
Understanding what type of change you made helps identify the problem.
1. Changed Nameservers
What you did:
- Updated nameservers at your domain registrar
- Old: ns1.oldhost.com, ns2.oldhost.com
- New: ns1.newhost.com, ns2.newhost.com
Why email broke:
- DNS queries now go to new nameservers
- New nameservers don't have your MX records
- Email providers can't find where to deliver mail
Fix required:
- Add MX records at new DNS provider
- Add any A records MX records reference
- Add SPF/DKIM/DMARC records
2. Changed Hosting Provider
What you did:
- Migrated website to new hosting company
- Updated A record to point to new server
Why email broke:
- If old hosting provided email AND hosting on same server
- MX record pointed to old server
- New server doesn't have email configured
Fix required:
- Configure email on new server, OR
- Point MX records to third-party email provider, OR
- Keep MX pointing to old host specifically for email
3. Updated A Record
What you did:
- Changed A record for @ or www
- Old: @ IN A 192.0.2.1
- New: @ IN A 198.51.100.1
Why email broke:
- MX record pointed to yourdomain.com (apex)
- Now resolves to new server without email service
Fix required:
- Create separate A record for mail server (mail.yourdomain.com)
- Point MX to that A record instead of apex
- Or point MX to email provider's servers
4. Enabled CDN or Proxy
What you did:
- Enabled Cloudflare, Sucuri, or similar CDN/proxy service
- Changed nameservers to CDN provider
Why email broke:
- CDN nameservers don't have your email records by default
- You must manually add them in CDN control panel
Fix required:
- Add MX records in CDN dashboard
- Add SPF/DKIM/DMARC records
- Set email records to DNS-only (not proxied)
5. Transferred Domain to New Registrar
What you did:
- Transferred domain registration to different registrar
Why email broke:
- If nameservers changed during transfer
- Or if DNS zone wasn't exported/imported
- Email records lost in transition
Fix required:
- Verify nameservers are correct
- Recreate MX records if lost
- Restore email-related DNS records
Quick Diagnosis: Can You Send, Receive, or Neither?
Identify your specific email issue to apply the right fix.
Symptom 1: Cannot Receive Email
What you see:
- Senders get bounce messages
- "User unknown" or "Mailbox not found"
- "Cannot find MX record for domain"
- Email sent to you never arrives
Likely cause:
- MX records missing or incorrect
- MX records point to wrong server
- DNS propagation in progress
Fix priority: MX record configuration
Symptom 2: Cannot Send Email
What you see:
- Outgoing mail fails
- "SMTP server not found"
- "Authentication failed"
- "Relay access denied"
Likely cause:
- SMTP server settings wrong in email client
- Email provider's IP changed
- SPF record issues
- Email client still configured for old server
Fix priority: Update email client SMTP settings
Symptom 3: Can Send But Not Receive
What you see:
- You successfully send emails
- But incoming email bounces or disappears
Likely cause:
- MX records missing or wrong
- MX records haven't propagated yet
- MX priority issues (pointing to non-existent server)
Fix priority: MX record configuration and propagation
Symptom 4: Can Receive But Not Send
What you see:
- Email arrives normally
- Cannot send from email client
Likely cause:
- SMTP settings in email client need updating
- SMTP authentication credentials wrong
- Firewall blocking outgoing mail port
Fix priority: Email client configuration
Symptom 5: Email Works Sometimes
What you see:
- Some emails arrive, others bounce
- Intermittent delivery
Likely cause:
- DNS propagation in progress
- Multiple MX records with conflicting priorities
- Some DNS servers cached old records, others have new
Fix priority: Wait for propagation, verify MX configuration
Solution 1: Configure MX Records
The primary fix for most post-change email issues.
Step 1: Identify Your Email Provider
Determine where email is hosted:
Same as old hosting:
- If email was part of hosting package
- Check old hosting control panel for email section
- Note: Keep old hosting active if email is there
Third-party email provider:
- Google Workspace (Gmail)
- Microsoft 365 (Outlook)
- Zoho Mail
- ProtonMail
- FastMail
- Other specialized email host
New hosting provider:
- If you want to set up email at new host
Step 2: Get Correct MX Record Values
For Google Workspace:
Priority Mail Server
1 ASPMX.L.GOOGLE.COM
5 ALT1.ASPMX.L.GOOGLE.COM
5 ALT2.ASPMX.L.GOOGLE.COM
10 ALT3.ASPMX.L.GOOGLE.COM
10 ALT4.ASPMX.L.GOOGLE.COM
For Microsoft 365:
Priority Mail Server
0 yourdomain-com.mail.protection.outlook.com
(Replace yourdomain-com with your domain)
For cPanel hosting:
Priority Mail Server
0 mail.yourdomain.com
For Zoho Mail:
Priority Mail Server
10 mx.zoho.com
20 mx2.zoho.com
50 mx3.zoho.com
For ProtonMail:
Priority Mail Server
10 mail.protonmail.ch
20 mailsec.protonmail.ch
Where to find values:
- Email provider's setup guide or documentation
- Hosting provider's help center
- Contact email provider support
- Check old DNS zone for existing records
Step 3: Add MX Records at Current DNS Provider
Locate DNS management:
If using hosting provider's nameservers:
- Log into hosting control panel
- Find "DNS Zone Editor" or "DNS Management"
- Select your domain
If using registrar's nameservers:
- Log into domain registrar
- Go to DNS management for your domain
If using Cloudflare:
- Log into Cloudflare dashboard
- Select your domain
- Click DNS tab
Add the MX records:
For each MX record:
- Select record type: MX
- Name/Host: @ (or leave blank for root domain)
- Priority: Enter priority number (0, 5, 10, etc.)
- Value/Points to: Mail server hostname
- TTL: 3600 (1 hour) or Auto
- Save record
Example in common interfaces:
cPanel:
- Zone Editor → MX → Priority: 10, Destination: mail.provider.com
Cloudflare:
- Type: MX, Name: @, Mail server: mail.provider.com, Priority: 10, TTL: Auto
GoDaddy:
- Type: MX, Host: @, Points to: mail.provider.com, Priority: 10, TTL: 1 Hour
Step 4: Remove Old/Conflicting MX Records
Critical: Delete any old MX records pointing to previous email servers
Look for:
- MX records from old hosting provider
- MX records with different mail server hostnames
- Duplicate MX records
Why this matters: Multiple MX records can cause delivery issues. Email might be delivered to old server (where it's lost) instead of new server.
Step 5: Verify MX Records
Use online MX lookup tools:
MXToolbox.com:
- Visit MXToolbox.com/SuperTool
- Select MX Lookup
- Enter your domain
- Click "Check"
Expected results:
- Shows all your MX records
- Lists priority and mail server
- Should match what you configured
What's Green DNS:
- Visit WhatsmyDNS.net
- Enter your domain
- Select MX from dropdown
- Shows MX from different global locations
Step 6: Test Email Delivery
Send test email to yourself:
- From external email account (Gmail, etc.)
- Send to your domain email address
- Wait 5-10 minutes
- Check if email arrives
If still not working:
- Wait longer (DNS propagation)
- Check spam/junk folder
- Verify mail server is actually running
- Check email client settings
Solution 2: Add Supporting DNS Records
MX records sometimes require supporting A records and authentication records.
Add A Record for Mail Server
When needed:
- If MX record points to mail.yourdomain.com
- If email is hosted on same server as website
- If email provider requires it
Example scenario:
Your MX record: 10 mail.yourdomain.com
This requires an A record for: mail.yourdomain.com
How to add:
- DNS management interface
- Add new record
- Type: A
- Name/Host: mail
- Value/Points to: IP address of mail server
- TTL: 3600
- Save
Get the IP address:
- From email/hosting provider
- From old DNS zone
- Using
nslookup mail.yourdomain.comif it was working before
Add SPF Record
What it is: Authorizes servers to send email on your behalf
Format:
Type: TXT
Name: @
Value: v=spf1 include:_spf.google.com ~all
(Adjust based on email provider)
Common SPF values:
Google Workspace:
v=spf1 include:_spf.google.com ~all
Microsoft 365:
v=spf1 include:spf.protection.outlook.com ~all
Multiple providers (email + marketing tool):
v=spf1 include:_spf.google.com include:servers.mcsv.net ~all
Add DKIM Record
What it is: Digital signature to verify email authenticity
How to get it:
- Email provider generates DKIM key
- Google Workspace: Admin console → Apps → Google Workspace → Gmail → Authenticate email
- Microsoft 365: Security & Compliance → Threat management → Policy → DKIM
- Other providers: Check documentation
Format:
Type: TXT
Name: selector._domainkey (e.g., google._domainkey)
Value: v=DKIM1; k=rsa; p=[long public key string]
Add DMARC Record
What it is: Policy for handling SPF/DKIM failures
Basic DMARC:
Type: TXT
Name: _dmarc
Value: v=DMARC1; p=none; rua=mailto:[email protected]
Stricter policy:
v=DMARC1; p=quarantine; rua=mailto:[email protected]
Solution 3: Handle DNS Propagation
Even with correct records, email may not work immediately due to propagation.
Typical Email DNS Propagation Time
MX records:
- Minimum: 1-2 hours
- Typical: 4-8 hours
- Maximum: 24-48 hours
Faster than website DNS because:
- Email is critical infrastructure
- MX TTL values often lower
- Less aggressive caching by email servers
Monitor MX Propagation
Check from multiple locations:
- Visit WhatsMyDNS.net
- Select MX record type
- Enter your domain
- View global results
Interpreting results:
- Some show old MX, some show new: Propagation in progress (normal)
- All show old MX after 12 hours: Records not configured correctly
- All show new MX: Fully propagated
What to Do During Propagation
Email behavior during propagation:
- Some senders deliver to old server
- Some senders deliver to new server
- This creates split delivery
To prevent email loss:
Option 1: Keep old mail server active
- Leave old hosting/email account active during transition
- Forward email from old server to new
- Ensures no email is lost during propagation
Option 2: Use email forwarding
- Configure old email to forward to new
- Temporary during propagation period
- Remove after full propagation
Timeline:
- Day 0: Add new MX records
- Days 1-2: Monitor propagation, keep both email servers active
- Day 3: Most propagation complete
- Day 5: Safe to deactivate old email server
Email Provider-Specific Configurations
Each major email provider has specific requirements.
Google Workspace (Gmail)
Required MX records (all 5):
1 ASPMX.L.GOOGLE.COM
5 ALT1.ASPMX.L.GOOGLE.COM
5 ALT2.ASPMX.L.GOOGLE.COM
10 ALT3.ASPMX.L.GOOGLE.COM
10 ALT4.ASPMX.L.GOOGLE.COM
Additional records needed:
- SPF:
v=spf1 include:_spf.google.com ~all - DKIM: Get from Google Workspace admin console
- DMARC:
v=DMARC1; p=none; rua=mailto:[email protected]
Verification:
- Must verify domain ownership in Google Workspace admin
- Add TXT verification record
- Then add MX records
Common mistakes:
- Only adding one MX record instead of all five
- Wrong capitalization (use ALL CAPS)
- Forgetting domain verification step
Documentation: support.google.com/a/answer/140038
Microsoft 365 (Outlook/Exchange)
Required MX record:
0 yourdomain-com.mail.protection.outlook.com
(Replace yourdomain-com with your domain, hyphens instead of dots)
Additional records:
- SPF:
v=spf1 include:spf.protection.outlook.com ~all - DKIM: Configure in Microsoft 365 admin center
- DMARC:
v=DMARC1; p=quarantine; rua=mailto:[email protected] - Autodiscover CNAME:
autodiscover.outlook.com
Common mistakes:
- Wrong format for MX hostname (dots vs hyphens)
- Not enabling DKIM in Microsoft 365 admin
- Missing Autodiscover record (email clients won't auto-configure)
Documentation: learn.microsoft.com/en-us/microsoft-365/admin/setup/domains
cPanel/WHM Hosting
MX record:
0 mail.yourdomain.com
Required A record:
mail.yourdomain.com → [server IP address]
Email routing:
- In cPanel, set email routing to "Local Mail Exchanger"
- Or use "Remote Mail Exchanger" if email is elsewhere
Common mistakes:
- Email routing set to wrong mode
- A record for mail subdomain missing
- Firewall blocking port 25 (SMTP)
Zoho Mail
Required MX records (all 3):
10 mx.zoho.com
20 mx2.zoho.com
50 mx3.zoho.com
Additional records:
- SPF:
v=spf1 include:zoho.com ~all - DKIM: Get from Zoho Mail control panel
- Domain verification TXT record (during setup)
Common mistakes:
- Not verifying domain first in Zoho control panel
- Conflicting MX records from previous email provider
Avoiding Email Disruption During Migrations
Best practices to prevent email from breaking.
Pre-Migration Checklist
1-2 weeks before migration:
-
Document current email configuration
- Screenshot DNS records (especially MX)
- Note email provider
- Export zone file if possible
- Record all email addresses
-
Lower email DNS record TTL
- Change MX record TTL to 300-600 seconds
- Change related A records TTL
- Wait for old TTL to expire before migrating
-
Test email on new server (if applicable)
- Create test email account
- Send and receive test messages
- Verify email works before DNS change
Day of migration:
-
Add MX records FIRST before changing website DNS
- Add new MX records at new DNS provider
- Keep old MX records active initially
- Have both servers receiving email
-
Update website DNS
- Change A record for website
- Leave MX records as-is
- Email continues working on old server
-
Set up email forwarding (optional)
- Old email server forwards to new
- Catches any email during propagation
- Temporary safety net
Days 1-3 after migration:
-
Monitor email delivery
- Test sending/receiving
- Check both old and new email servers
- Watch for bounce messages
-
Keep old email server active
- Don't cancel old hosting immediately
- Wait 3-5 days for full propagation
- Verify email stable on new server
Migration Strategies
Strategy 1: Keep Email Separate (Recommended)
- Migrate website to new host
- Keep email at current provider
- Point website A record to new host
- Keep MX records pointing to current email provider
- Email never disrupted
Strategy 2: Staged Migration
- Set up email on new server fully
- Add new MX records alongside old ones (different priorities)
- Test email on new server
- Update MX priorities to favor new server
- Monitor for 48 hours
- Remove old MX records
- Deactivate old email server
Strategy 3: Dual Operation
- Run email on both old and new servers simultaneously
- Forward old → new automatically
- Wait for full DNS propagation
- Shut down old email server
Advanced Troubleshooting
When standard fixes don't resolve email issues.
Check Email Server Connectivity
Test if mail server responds:
telnet mail.yourdomain.com 25
Expected response:
220 mail.yourdomain.com ESMTP Postfix
If connection refused:
- Mail server not running
- Firewall blocking port 25
- Wrong hostname or IP
Verify MX Record Resolution Chain
Step 1: Check MX record:
nslookup -type=MX yourdomain.com
Step 2: Check A record for mail server:
nslookup mail.yourdomain.com
Both must resolve correctly for email to work.
Check Email Logs
Server-side logs (if you have access):
- /var/log/mail.log (Linux)
- Mail logs in cPanel
- Email logs in hosting control panel
Look for:
- Connection attempts
- Delivery failures
- Authentication errors
- Rejected messages
Test Email Authentication
MXToolbox Email Health Check:
- Visit MXToolbox.com/SuperTool
- Select "Email Health"
- Enter your domain
- Reviews MX, SPF, DKIM, DMARC, blacklist status
Mail-Tester.com:
- Send email to address provided
- Receives score out of 10
- Shows SPF, DKIM, DMARC status
- Identifies deliverability issues
Check for Email Server Blacklisting
If email is rejected:
- Your server's IP might be blacklisted
- Check MXToolbox.com/blacklists
- Submit delisting requests if blacklisted
Prevention Checklist
Avoid email disruption on future domain changes.
Before any DNS change:
- Document current email DNS records
- Identify email provider and server details
- Lower TTL values 24-48 hours in advance
- Test email independently before changing DNS
When changing nameservers:
- Export DNS zone from old provider
- Import or manually recreate MX records at new provider
- Add MX records BEFORE changing nameservers
- Keep old nameservers until new ones have all records
When migrating hosting:
- Decide: migrate email or keep separate?
- If keeping separate: Don't change MX records
- If migrating: Set up and test email at new host first
- Run dual email servers during transition
After any change:
- Test sending and receiving email immediately
- Monitor for 48-72 hours
- Check bounce reports
- Keep old infrastructure active during propagation
Frequently Asked Questions
How long does it take for email to start working after adding MX records?
Email typically resumes within 1-4 hours after correctly configuring MX records, though full global propagation can take up to 24-48 hours. If you have a low TTL (300-600 seconds), most email servers will update within 1-2 hours. During propagation, some senders will deliver successfully while others may still have cached old records.
Can I keep email at my old hosting provider while moving my website to a new host?
Yes, this is actually the recommended approach to avoid email disruption. Keep your MX records pointing to your old hosting provider's mail servers while updating your A and CNAME records to point to the new website host. This separates email from web hosting, ensuring email continues working without interruption during your website migration.
Why can I send email but not receive after changing DNS?
This indicates outgoing SMTP works (you can send) but incoming MX records have a problem (can't receive). Your email client's outgoing server settings are correct, but the MX records for your domain are either missing, incorrect, or haven't propagated yet. Check your DNS zone for MX records using MXToolbox.com, and verify they point to the correct mail server.
Do I need to add SPF, DKIM, and DMARC records for email to work?
For basic email delivery, only MX records are strictly required. However, SPF, DKIM, and DMARC records are highly recommended (almost essential) to prevent your emails from being marked as spam and to protect against email spoofing. Most modern email providers (Gmail, Outlook) treat missing authentication records as suspicious, and your emails may be delivered to recipients' spam folders without them.
I changed nameservers yesterday and email stopped working. How do I fix it?
When you change nameservers, all DNS records must be recreated at the new DNS provider, including MX records for email. Log into your new DNS provider's control panel, access DNS management, and add the MX records pointing to your email provider's mail servers. You may also need to add A records, SPF, DKIM, and DMARC records. Email should resume within 1-4 hours after adding correct MX records.
My website is working but email isn't after migration. Why?
This is the most common migration issue. Website DNS (A records) was updated successfully, but email DNS (MX records) was not. Website and email use completely different DNS record types, so updating one doesn't affect the other. You need to separately configure MX records pointing to your email server. Check your DNS zone and add the missing MX records.
Should I delete old MX records before adding new ones?
No, it's safer to add new MX records first, verify email works, then delete old ones. Having both temporarily won't break anything—email will go to the server with the lowest priority number. However, once you confirm email is working with new records, you should delete old MX records to avoid confusion and ensure all email goes to the correct server.
Email was working fine, then stopped after enabling Cloudflare. Why?
When you enable Cloudflare (or any CDN), you change your nameservers to theirs, which means DNS queries now go to Cloudflare instead of your previous DNS provider. You must recreate your MX records (and all other DNS records) in the Cloudflare dashboard. Important: Ensure email-related records (MX, TXT for SPF/DKIM) are set to "DNS only" (gray cloud), not "Proxied" (orange cloud).
Key Takeaways
- MX records must be recreated when changing nameservers - Changing nameservers makes ALL previous DNS records inactive, including email MX records which must be manually added at the new DNS provider
- Email and website use different DNS records - Website uses A/CNAME records, email uses MX records; you can migrate your website without touching email by leaving MX records unchanged
- Supporting DNS records are required - Beyond MX records, you typically need A records for mail servers, SPF, DKIM, and DMARC TXT records for proper email delivery and authentication
- DNS propagation affects email for 4-24 hours - Even with correct MX records, email may be inconsistent during DNS propagation; some senders deliver successfully while others still use cached old records
- Keep old email server active during transitions - Maintain old hosting/email service for 48-72 hours after DNS changes to catch emails delivered to the old server during propagation
- Email works in either direction can have different causes - Can't receive (MX issue), can't send (SMTP client settings), or intermittent (propagation in progress) each require different fixes
- Plan email separately from website migration - The safest approach is keeping email at current provider while migrating website to new host, avoiding email disruption entirely
Next Steps
Now that you understand email issues after domain changes, take these actions:
- Add MX Records: Log into your DNS provider, add MX records pointing to your email provider's mail servers (get correct values from email provider documentation)
- Verify DNS Configuration: Use MXToolbox.com to check your MX records and ensure they're correctly configured and propagating globally
- Test Email Delivery: Send test emails to and from your domain to verify both sending and receiving work correctly
Need help finding your email MX record values? Check your email provider's documentation or contact their support for the specific MX records, priorities, and authentication records you need.
Helpful Tools and Resources
Email DNS Testing Tools
- MXToolbox.com - Comprehensive email DNS diagnostics and MX record lookup
- Mail-Tester.com - Score email deliverability and test SPF/DKIM/DMARC
- DNSChecker.org - Check MX record propagation from global locations
- Google Admin Toolbox MX - Google's MX record checker and email troubleshooter
- WhatsmyDNS.net - Global DNS propagation checker including MX records
Email Provider Documentation
DomainDetails.com Tools
- RDAP Lookup - Check domain configuration and nameservers
- WHOIS History - View when DNS changes were made
- DNS Health Check - Verify all DNS records including email
Was this article helpful? Let us know if you successfully restored your email or need additional assistance.
Article References: