Fix MX Record Pointing to Wrong Server After DNS Migration
Wrong MX after migration? Fix stale DNS before more mail disappears.
Wrong MX after migration? Fix stale DNS before more mail disappears.
Three weeks after moving our DNS from GoDaddy to Cloudflare, a client emailed me asking why I never replied to their proposal. I checked my inbox. Nothing. Checked spam. Nothing. Then I logged into the old GoDaddy email dashboard we'd abandoned — and there it was. Their email, plus seven others from the past week, all sitting in a mailbox nobody was monitoring.
The MX record migration had failed silently. Or rather, I'd failed to migrate it at all. The domain was resolving through Cloudflare, the website was live, but email was still routing to a server we'd stopped checking.
This happens constantly. DNS migrations touch dozens of records, and MX entries get missed, copied wrong, or left pointing at a host that no longer handles your mail. Here's how to find a wrong MX, fix it, and verify the fix actually worked.
By the end of this, you'll have:
If your MX record is completely missing rather than pointing to the wrong server, that's a different problem — our missing MX record guide covers that scenario. This one's about stale or wrong MX values after a migration.
First, find out what your MX record actually says. Not what you think it says — what the DNS system returns.
On Mac or Linux:
dig MX yourdomain.com +short
On Windows:
nslookup -type=MX yourdomain.com
You'll see output like:
10 mail.oldemailhost.com.
That number is the priority (lower = higher priority). The hostname after it is where mail gets routed.
Compare this to what your current email provider expects. For example:
| Provider | Expected MX Record |
|---|---|
| JustEmails | mx.justemails.app |
| Google Workspace | ASPMX.L.GOOGLE.COM (plus alternates) |
| Microsoft 365 | yourdomain-com.mail.protection.outlook.com |
| Zoho Mail | mx.zoho.com (or regional variants) |
If dig returns your old provider's hostname instead of your current one? That's the problem. Your domain is telling the world "send my email to Server X" while you're actually reading mail on Server Y.
Here's the thing: this silent failure is why I always verify MX records immediately after any DNS migration. Not a day later. Immediately. One missing email from a customer asking about pricing is all it takes to lose a deal you'll never know you lost.
DNS migrations fail on MX records for a few reasons:
The new provider didn't import mail records. Cloudflare, for instance, attempts to scan and import existing records when you add a domain — but it prioritizes A, AAAA, and CNAME records. MX records sometimes get skipped. Or they import with values from six months ago. Ask me how I know.
You copied records from documentation, not your live zone. If you referenced a setup guide from six months ago instead of your actual DNS dashboard, you might have entered placeholder values or old hostnames.
The old provider had multiple MX records with different priorities. Google Workspace uses five MX records (ASPMX.L.GOOGLE.COM at priority 1, plus four ALT servers at priorities 5/10). If you only copied one, mail delivery becomes unreliable.
You changed email providers but forgot the DNS step. Switched from Zoho to JustEmails or from Google Workspace to Fastmail? The dashboard migration might be done, but DNS doesn't update itself.
TTL caching makes it look like nothing changed. You updated the record, but you're testing from a resolver that cached the old value. More on this in Step 4. (I once spent 40 minutes convinced my DNS change hadn't saved. It had. My ISP's resolver was just being slow.) If you're managing infrastructure across multiple projects, tools like DevOS can help track DNS changes as part of your deployment workflow.
Log into your current DNS provider — the one your domain's nameservers actually point to. If you're unsure, run:
dig NS yourdomain.com +short
This returns your authoritative nameservers. If you see ns1.cloudflare.com and ns2.cloudflare.com, you're managing DNS in Cloudflare.
Navigate to DNS records and find any existing MX entries. You need to either:
For JustEmails, add:
| Type | Name | Priority | Value |
|---|---|---|---|
| MX | @ | 10 | mx.justemails.app |
The @ means the root domain (yourdomain.com). Priority 10 is standard for a single MX server. Lower numbers = higher priority if you have multiple MX records.
Common mistake: Adding the MX record for a subdomain instead of the root. If you're setting up mail.yourdomain.com as the record name, that's wrong — email to user@yourdomain.com won't route correctly. The name field should be @ or left blank (depending on your provider's UI).
Another thing: some providers auto-append the domain. If you enter mx.justemails.app. with a trailing dot, good. If your provider shows the value as mx.justemails.app.yourdomain.com after saving, you entered it wrong. The value should be the mail server hostname, not a subdomain of your domain. I've made this exact mistake more than once — it's embarrassing how long it took me to notice.
DNS changes don't take effect instantly. Every resolver on the internet caches DNS records based on their TTL (time-to-live). If your old MX had a TTL of 86400 seconds (24 hours), some resolvers might serve the stale record for up to a full day.
But here's what actually happens in practice: most major resolvers (Google's 8.8.8.8, Cloudflare's 1.1.1.1) respect TTL strictly, so they'll pick up your change fast. ISP resolvers? Less predictable. Corporate DNS servers with aggressive caching are total wildcards — I've seen them hold onto stale records for 72 hours despite a 1-hour TTL. Infuriating.
Check propagation across multiple resolvers:
# Google's resolver
dig @8.8.8.8 MX yourdomain.com +short
# Cloudflare's resolver
dig @1.1.1.1 MX yourdomain.com +short
# Your ISP's resolver (default)
dig MX yourdomain.com +short
If Google and Cloudflare show the new value but your ISP doesn't, give it time. If none of them show the new value after 30 minutes, double-check you saved the record correctly and that you're editing DNS in the right provider.
Web tools like whatsmydns.net check propagation from dozens of global locations. Useful for confirming worldwide propagation, especially if you have international users. For tracking uptime and domain health alongside your ad campaigns, ClickzProtect monitors your infrastructure while protecting ad spend from click fraud.
During propagation, you might experience split delivery: some senders hit your new MX, others hit the old one. This is the worst-case scenario because it's intermittent and hard to diagnose.
Signs of split delivery:
If you still have access to the old email host, check its inbox. Any mail arriving there after your MX change is split delivery in action.
To minimize split delivery duration:
Split delivery is temporary. But those 24-48 hours? They can lose important messages. I've seen people miss invoice payments, job offers, and support requests because of this gap. One client missed a $12,000 contract renewal email. It's why I always tell people: migration weekend means checking both mailboxes. Annoying? Yes. Cheaper than losing business? Also yes.
DNS looks correct? Great. But email delivery involves more than DNS. Let's confirm end-to-end delivery.
Send a test email from an external account (not from the same domain you're testing) to your migrated domain. Gmail to your-address@yourdomain.com, for example. If you're running outbound campaigns from a VeloCalls sales workflow, this verification ensures your reply-to address actually works.
Check:
Received: headers showing the correct mail server handled delivery.In Gmail, click the three dots → "Show original" and search for lines like:
Received: from mx.justemails.app (...)
If you see your new provider's server in the Received chain, the routing is correct. If you see your old provider's server, something's still wrong — maybe you're looking at a cached page, or propagation isn't complete in your region.
For authentication verification (SPF, DKIM, DMARC), the DMARC enforcement guide covers checking those headers specifically.
"Mail delivery failed: Host not found"
The MX record points to a hostname that doesn't exist anymore. Your old provider decommissioned the server, or you have a typo. Verify the exact hostname from your email provider's documentation.
Emails bouncing with "relay access denied"
The MX is correct, but the receiving server doesn't recognize your domain. This happens when you update DNS but forget to add the domain to your new email provider's dashboard. In JustEmails, make sure the domain is added and verified in your account.
"Connection timed out" in bounce messages
The mail server IP is unreachable. Could be a firewall blocking port 25, or the server is actually down. Check your email provider's status page. If you're self-hosting, verify the server is running and port 25 is open inbound.
MX record shows correct server, but mail still goes to old host
Propagation lag. Some resolver somewhere is still serving the cached old record. Wait it out, or have the sender flush their local DNS cache (ipconfig /flushdns on Windows, sudo dscacheutil -flushcache on Mac).
Multiple MX records with conflicting values
You added the new record but didn't delete the old one. Now you have two MX entries — one pointing to your new host at priority 10, one pointing to your old host at priority 20. Senders will try priority 10 first, but if it's slow or temporarily unreachable, they'll fall back to priority 20 (the old server). Delete the old record.
Look, I'm not the most organized person. But I keep a pre-migration checklist in Notion because I got burned enough times. Before any DNS move:
Total time investment: maybe an hour. Time saved not debugging "where did my email go" at 11 PM on a Sunday: infinite. Worth it every time.
For ongoing monitoring, tools like JustAnalytics can track domain health metrics, though for pure DNS monitoring there are dedicated services like DNSWatch or Updown.io.
Your MX is fixed. Mail is flowing to the right server. Now make sure the rest of your email infrastructure is solid:
If you're managing email across multiple domains — agencies, multi-brand SaaS, portfolio sites — wrong MX records multiply fast. One migration mistake times ten domains equals a lot of lost mail. JustEmails handles unlimited domains under one account for $49/year, which at least keeps the "where is this domain's email hosted" question simple.
Questions about MX records or migration weirdness? Email support@justemails.app. We've seen the edge cases. The one where a domain had three MX records from three different providers, all with priority 10? Mail was basically playing roulette. That was a fun afternoon. (It wasn't.)
When you migrate DNS from one provider to another (GoDaddy to Cloudflare, for example), your existing DNS records don't automatically transfer. The new provider starts with a blank zone or imports only A/CNAME records. MX records often get left behind or imported with outdated values. You need to manually recreate them pointing to your current email host.
Run dig MX yourdomain.com +short on Mac/Linux or nslookup -type=MX yourdomain.com on Windows. The output shows your live MX records with priority numbers. Compare the hostnames to your current email provider's expected MX values. If you see your old provider's servers listed, the record needs updating.
Split delivery occurs when some mail servers have your new MX while others still have the old cached value. During this window, emails get delivered to both hosts depending on which DNS answer the sender's server received. Signs include sporadic missing emails (some arrive, some don't), emails appearing on your old host that should go to the new one, and users reporting "some people can reach me, others can't."
DNS propagation depends on TTL (time-to-live) values. If your old MX had a TTL of 86400 (24 hours), some resolvers may cache that record for up to 24 hours after you make changes. Lower TTLs like 300 (5 minutes) propagate faster. Most changes are visible globally within 1-4 hours, but full propagation can take 24-48 hours for high-TTL records.
Unlimited custom domain email hosting for $49/year flat — unlimited domains, unlimited mailboxes, 10 GB storage, full IMAP/SMTP. Built for agencies, freelancers, and anyone managing email across more than one domain.