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.
After a DNS migration, an MX record can fail silently. The domain resolves and the website loads, but email keeps routing to a server nobody is checking.
This is common. 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 | mail1.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 MX records should be verified 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.
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.
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 | mail1.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 mail1.justemails.app. with a trailing dot, good. If your provider shows the value as mail1.justemails.app.yourdomain.com after saving, you entered it wrong. The value should be the mail server hostname, not a subdomain of your domain.
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, and they can 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: invoice payments, job offers and support requests can all be missed in this gap. That's why 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 mail1.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.
While inbound is settling, line up the outbound side too. A daily send allowance counts from the moment a domain is verified rather than from the day the account was opened, so a freshly migrated domain begins at 20/day, moves to 200/day in its second week and reaches 500/day from day 15 — per account, with mailbox and API sends drawing on the same total. If the domain you just moved was pushing a few hundred messages a day at the old host, plan the first fortnight around that ramp rather than discovering it mid-week.
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.
A pre-migration checklist helps. 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. Several MX records at the same priority from different providers make delivery unpredictable.
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.