Facebook tracking pixel

MailGenius

Domain Name MX Records: How to Check and Fix Them

An MX record tells other mail servers which host accepts email addressed to your domain, and each one carries a priority number that decides which host gets tried first. One example: 10 mx1.example.com and 20 mx2.example.com. Senders go to mx1, and only fall back to mx2 when mx1 can't take the message.

If you've ever watched a contact say "my email to you bounced" while your own outbox looks perfectly healthy, you already know the frustrating part of this topic. Your sending is fine. Your inbound routing is broken. Those are two separate systems, and almost every guide on the internet blurs them together.

That's the gap I want to close here. Most explanations stop at "MX records tell mail servers where to deliver email" and call it a day. But the failures that cause the most damage happen outside the DNS record itself: a hosting panel still treating a migrated domain as locally hosted, a backup host nobody has patched in years, a priority list that points at a server with no certificate. I'll cover how an MX record works, how to check yours in about two minutes, and what to do when mail isn't arriving.

One clarification that saves people a lot of wasted searching: an MX record here means mail routing for your domain. It has nothing to do with Mexico's .mx country domain. Same two letters, completely different jobs.

Table of Contents

What an MX Record Does and How Priority Orders Delivery

Think of your domain as a street address and the MX record as the sorting office that receives the letters before they reach the right desk. The address gets the mail into the system; the sorting office decides which internal route it takes. Change the sorting office and the address stays the same, which is exactly why an MX change can go wrong without anyone touching your domain name.

The RFC specification for mail routing defines the record precisely: an MX record maps a domain's email namespace to one or more mail-transfer hosts, and each record holds a 16-bit unsigned preference value plus a destination hostname. Senders attempt the lowest preference value first, then work upward as failover routes. That's the whole mechanism.

A mail carrier sorting letters into mailboxes labeled with MX records to illustrate email routing concepts.

Priority is a queue position, not a percentage

This trips up more people than any other part of domain name MX configuration. A priority number is an ordering rule, not a traffic split. Publishing 10 mx1.example.com and 20 mx2.example.com directs normal delivery toward mx1, while mx2 is generally attempted only after a connection or delivery failure. Priorities are not a load-balancing percentage.

If you set two records, both at 10, senders treat them as equal and spread traffic between them. That's the closest MX gets to load balancing, and it's useful when two hosts are interchangeable. What you don't want is a backup host at priority 10 that was never sized to handle half your inbound mail.

Priority Mail server Role in delivery
10 mx1.example.com Primary, tried first by every sender
20 mx2.example.com Backup, tried only after the primary fails
10 and 10 mx1.example.com and mx2.example.com Equal priority, traffic shared between both hosts

The actual numbers don't matter. You could use 1, 2 and 3 or 10, 20 and 30. What matters is that the host you want receiving mail first has the lowest number. Gaps of 10 make it easy to slot a new host in later without renumbering everything.

The relay distinction most guides skip

An MX target is usually not your mailbox server. RFC 5321 separates the MX host from the final mailbox system, because an MX commonly identifies an intermediate relay that accepts SMTP traffic and forwards mail internally. That matters when you're debugging: a clean handoff at the MX doesn't prove the message reached the right inbox.

An MX record answers one question: where should mail for this domain be delivered? Nothing else.

For production mail, every MX hostname should resolve to reachable A and/or AAAA records, accept SMTP on port 25, and be able to handle the domain's envelope recipients. A syntactically valid MX that points to an unavailable host causes retries, delayed delivery and eventual bounces, even when SPF, DKIM and DMARC are all configured correctly.

What MX records don't do

They don't authorize you to send. They don't authenticate you. They don't encrypt anything. An MX record governs inbound delivery only, so if your messages are landing in spam, your MX records aren't the suspect.

Open your DNS panel and find the MX section. You should see hostnames and numbers. If you see a hostname you don't recognize, or one belonging to a provider you left two years ago, you've just found the first thing to fix.

How to Look Up Your Domain's MX Records

MX lookups read public DNS, so they work from any computer, any network, and any registrar. You don't need to log in anywhere to check what the internet currently sees. That's the fastest way to separate a config problem from a propagation problem.

Here's the sequence I'd run, in order.

A five-step infographic guide explaining the process for looking up and verifying domain MX records.

  1. Open the DNS settings where the records live. Not necessarily your registrar. If you moved nameservers to a hosting provider or a third-party DNS host, the registrar's panel may show nothing useful. Common slip: editing records at the registrar while the domain's nameservers point elsewhere, then wondering why nothing changed.
  2. Write down every hostname and its priority. All of them, in a note. You'll want the baseline when something breaks later.
  3. Confirm each hostname resolves. An MX pointing to a name with no A or AAAA record is a bounce waiting to happen. Check the hostname itself, not just the record.
  4. Run an independent lookup. Compare the public answer against your panel. If they disagree, you're either editing the wrong zone or looking at cached data. The DNS record articles from F1Group walk through record types and how resolvers return them, which helps when you're deciding whether an answer is stale or wrong.
  5. Wait out the TTL before judging a change. Resolvers keep cached answers until the TTL expires. Reading a result two minutes after an edit tells you what the cache thinks, not what you published.
Tool Example command What you should see
Registrar or hosting DNS panel Open the MX or mail section Hostnames and priority numbers
dig dig MX example.com +short 10 mx1.example.com.
nslookup nslookup -type=MX example.com mail exchanger = mx1.example.com

A healthy result looks boring: one or more hostnames, each with a priority number, none of them a placeholder, none of them belonging to a service you cancelled. If the list includes a host you can't identify, treat it as a routing risk until proven otherwise.

If you'd rather not run lookups by hand, we built an MX checker that does the record verification for you, alongside tools for SPF, DKIM, DMARC, TXT, BIMI, blacklists and a full DNS audit. Sometimes a second pair of eyes on the public answer is faster than arguing with a control panel.

Common MX Problems and How to Fix Them

The most common symptom is a bounce that says the host wasn't found. Nine times out of ten it's a misspelled MX target, or a target that exists in name only because nobody created the A record behind it. The record looks present in the panel, so people assume it's fine, and then they spend an afternoon checking spam filters that were never the problem.

Here's how the symptoms map to causes.

Symptom Likely cause Fix
Bounce says host not found or no such host MX points to a misspelled name or a name with no A or AAAA record Correct the hostname and confirm it resolves
Mail delayed for hours, then bounced Primary MX does not accept SMTP on port 25 Test port 25 from outside your network, then fix the firewall or move the host
Mail still goes to the old provider after a move Old MX record still published or cached Remove the old MX and wait for the TTL to expire
Mail lands in the wrong mailbox or loops Hosting panel treats the domain as local while the MX points elsewhere Match the hosting routing mode to the MX target
Mail delivers but fails authentication The problem is SPF, DKIM or DMARC, not MX Check those records separately

Fixes that land in minutes: a corrected hostname, a missing A record, a removed stale entry once propagation clears. The edit itself is instant; the visible effect depends entirely on TTL.

Fixes that need a wait: anything where the old answer is cached somewhere. A low TTL of 300 seconds clears fast. A long TTL means some resolvers hold the wrong answer for the better part of a day.

The port 25 test people skip

If mail is delayed for hours and then bounces, suspect port 25 before you touch DNS. Many hosts and ISPs block inbound SMTP by default, so the record is correct and the server never answers. Test from outside your own network, because a test from inside will succeed through a path real senders can't use.

And keep this boundary straight: mail that arrives but fails authentication is an SPF, DKIM or DMARC problem. You can confirm which by running a pass that will check SPF and DKIM records and tell you whether alignment holds. Fixing MX records will never resolve an authentication failure, and rewriting authentication records won't fix a bounce.

When the record is right and mail still fails

That's the case worth flagging because it's the one basic guides miss. The DNS answer is correct, the host resolves, port 25 is open, and messages still vanish. In those situations the receiving server's own configuration is the suspect, which is where the next section starts.

Moving a Domain Without Losing Mail

A domain can have apparently correct MX records while its hosting control plane is internally misconfigured. That's the failure mode nobody writes about, and it's the one that costs the most.

When you move a domain between providers, two settings have to agree: DNS, which says where mail should go, and the receiving server, which decides whether it will accept mail for that domain at all. A documented 2026 cPanel migration incident found that transferred domains lost their remote-mail-routing policy when DNS updates were disabled, preventing the destination server from handling mail correctly. The MX records looked fine. The control plane underneath them wasn't.

The result is silent: bounces, mail loops, or messages delivered to the wrong mailbox. Nobody gets an alert. Customers just stop hearing back.

A cutover runbook that doesn't drop mail

  1. Lower the MX TTL a day before the change. Set it short well ahead of time so propagation is fast when you need it to be. Doing this at the last minute defeats the purpose.
  2. Confirm the authoritative DNS host. Verify which nameservers answer for the zone, and edit there. Editing a zone nobody queries is the most common wasted hour in a migration.
  3. Verify every MX target resolves and accepts SMTP. Each host, not just the primary. Priority targets are easy to forget because they're rarely exercised.
  4. Check local versus remote routing in the hosting panel. This is the control-plane step, and it should happen before you change a single DNS record. If the panel thinks the domain is local while the MX points to an external provider, you've built a loop.
  5. Send test messages from at least two different providers. Gmail and Outlook follow slightly different delivery logic. One passing doesn't prove the other will.
  6. Keep the old MX records until tests pass and a rollback plan exists. Rollback means the old records are still documented and the old mailbox still holds its data.
  7. Remove old records only after the new route is confirmed. Then watch for stragglers: senders that cached the old answer, and internal systems with hardcoded relay addresses.

If you're running this across several domains, domain monitoring for email teams makes the post-cutover window less nerve-wracking, because problems surface while you still remember what you changed.

One more separation worth making explicit: MX records don't authorize a domain to send. Inbound routing and outbound authentication are independent systems. A perfect migration can still land you in spam folders if SPF, DKIM and DMARC were pinned to the old provider's servers. Evaluate those separately, on their own timeline.

Backup MX Servers and Their Hidden Risks

More MX records does not mean more safety. That assumption is the single most expensive one in this whole area, because a backup host that nobody watches is a liability wearing a redundancy badge.

Security guidance on MX records notes that each MX server is a potential target and that backup servers often receive less security attention than primary servers. Read that again in practice: the host you added for resilience is the host with the oldest patches, the loosest filtering and the least monitoring. A backup MX with a higher number doesn't automatically create safe failover. It can accept mail without the same filtering policy, or become an unintended collection point for sensitive messages nobody meant to route there.

Three designs, three different trade-offs

Single-provider redundancy. Two MX hosts from the same mail provider, one primary and one backup. It protects against a single host failing and costs nothing extra. It does nothing against a provider-wide outage, and both hosts share the same filtering policy by definition.

Provider-managed continuity. The provider runs its own failover and queueing. You publish their records and stop thinking about it. It protects against host failures and generally keeps policy consistent across hosts. What it exposes is dependency: your recovery time is their recovery time.

Self-managed secondary MX. You run a backup receiver yourself. It protects against your primary going dark for an extended period. It exposes you to the full security surface of a mail server you now have to patch, monitor, certificate-manage and filter, and it's the design most likely to accept mail your primary would have rejected.

Practical rule: if you can't name who patches the backup host and who reads its logs, don't publish a backup MX pointing at it.

The layered model, in plain terms

MX controls destination. TLS protects the connection. MTA-STS can require sending servers to use TLS for the declared MX hosts. Authentication records verify sender identity, not inbound confidentiality. Each layer answers a different question, and none substitutes for another.

DNSSEC is worth understanding here too: it provides authenticity for DNS responses and underpins DNS-based protections such as DANE, but it doesn't encrypt SMTP or guarantee a mailbox is available. Signed answers to a mailbox that's down still leave mail undelivered.

Before you rely on a backup, test four things: certificate validity on every host, policy consistency across the list, queue behavior while a host is down, and recovery after the primary returns. The last one catches the most surprises, because a primary coming back online with a stale queue creates duplicates and out-of-order delivery that users notice immediately.

Null MX for Domains That Never Receive Email

Some domains should never accept mail. Website-only domains, tracking domains, link-shortening domains, brand-protection registrations you grabbed before someone else did. For all of those, the question isn't which host receives mail. It's how to say clearly that no host does.

The weakest option is publishing nothing. An absent MX record can trigger legacy SMTP fallback behavior, where senders look up the domain's A or AAAA record and try delivering to the web server instead. That fails slowly, with retries.

The fix is a Null MX. RFC 7505 specifies exactly one MX record with preference 0 and the exchange value ., a pseudo-hostname that can't be mistaken for a real mail server, and it prohibits publishing any additional MX records alongside it. Senders get an authoritative negative signal and can reject the address immediately, commonly with SMTP status 556, instead of attempting delivery.

Setup What sending servers do Best for
No MX record Fall back to an A or AAAA lookup and attempt delivery Not a clear no-mail signal
Standard MX records Connect to the lowest preference host first Any domain that receives mail
Null MX (preference 0, exchange '.') Reject immediately, often with SMTP 556 Website-only, tracking or brand-protection domains that never receive mail

The practical payoff is quieter than it sounds: fewer wasted connection attempts, shorter retry queues, and mistyped addresses that fail at submission rather than retrying for days. When someone types your tracking domain instead of your real one, they find out in seconds.

Never publish a Null MX on a domain that receives replies, password resets, support mail, or any other message the business depends on.

Say a company applies a no-mail policy to a domain that also handles invoice replies. The records are technically correct, and the consequences are entirely predictable in hindsight.

Test Your MX Setup With a Free Spam Test

MX records tell you where mail should go. They can't tell you whether it arrives, whether it's trusted, or whether the content around it survives a spam filter. That's a different test, and it's the one that catches what DNS never will.

Finish with a routing check, then verify the whole picture with an email spam test. MailGenius sends a test email to a unique MailGenius address, runs diagnostics across spam filters, domain authentication and content structure, then returns a detailed report with fixes in priority order.

Tests run in a closed environment using a unique inbox, so they don't affect your actual sending domain or IP reputation. Nothing you test touches live reputation.

When the report flags an authentication problem, treat it as a separate job from your MX work. SPF, DKIM and DMARC misalignments get fixed in their own records, on their own schedule. Routing and authentication fail independently, so they get fixed independently.

Repeat the test after every MX change or migration. That way a routing problem shows up in your report before a customer notices a reply went missing.


A bounced reply costs you a conversation, and often a deal you never knew was in play. MailGenius gives you the full picture around your domain name MX setup: an MX checker that verifies your records resolve to live, responsive mail servers and confirms priority order, plus checks for SPF, DKIM, DMARC, BIMI, blacklists, domain reputation and a full DNS audit. Start with the free spam test, fix what the report ranks first, then rerun it after your next migration to prove the routing still holds. Visit MailGenius to run your first test.

Free Email Spam Test:

Will your Email Land in the Spam Folder?

Send an email to the address below to see your Spam Score:
loading...
MailGenius users test over 1M emails per year! By using our Email Tester, you will agree to our Privacy Policy and Terms of Service. The sending email address will receive emails from MailGenius. All tests are hosted on public links.

Try MailGenius Today

Run a Free Email Deliverability Test - Send an Email to the Address Below, then Click “See Your Score”:

Free Email Spam Test:

Will your Email Land in the Spam Folder?

Send an email to the address below to see your Spam Score:
loading...
MailGenius users test over 1M emails per year! By using our Email Tester, you will agree to our Privacy Policy and Terms of Service. The sending email address will receive emails from MailGenius. All tests are hosted on public links.

Try MailGenius Today