MX Records Explained — How Email Routing Works

MX records are the DNS records that control where email for your domain gets delivered. Get them wrong and email silently fails — no bounce, no error, just messages disappearing into the void. Understanding how they work saves enormous debugging time.

You can look up the MX records for any domain using our WHOIS Lookup tool.

What an MX Record Does

When someone sends an email to user@yourdomain.com, the sending mail server does a DNS lookup for the MX records on yourdomain.com. MX records point to the hostname of the mail server that accepts email for your domain. The sending server connects to that mail server on port 25 (SMTP) and delivers the message.

Without MX records, email delivery to your domain fails completely.

MX Record Structure

An MX record has two fields: priority and mail server hostname.

yourdomain.com. 3600 IN MX 10 mail.yourdomain.com. yourdomain.com. 3600 IN MX 20 mail2.yourdomain.com.

The priority number controls preference — lower number = higher priority. The sending server always tries the lowest priority MX first. If that server is unreachable, it tries the next one. Multiple MX records with different priorities provide redundancy.

Common MX Configurations

Google Workspace

aspmx.l.google.com. (priority 1) alt1.aspmx.l.google.com. (priority 5) alt2.aspmx.l.google.com. (priority 5)

Microsoft 365

yourdomain-com.mail.protection.outlook.com. (priority 0) — Microsoft handles redundancy on their end.

Self-hosted

If you run your own mail server, your MX record points to your server hostname. You also need a PTR record (reverse DNS) on the IP — without it, many receiving servers will reject your mail as spam.

MX Record Mistakes That Break Email

• MX record points to an IP address — must point to a hostname, not an IP. This is a spec violation. • Missing A record for the MX hostname — the mail server hostname needs its own A record. • MX record pointing to a CNAME — also a spec violation. MX targets must be A or AAAA records. • TTL not lowered before migration — when switching email providers, old MX records cached at high TTL continue routing mail to the old server for hours.

Check MX records and DNS configuration for any domain

Try WHOIS Lookup Free →

FAQs

Run: dig MX yourdomain.com +short from terminal. This returns your current MX records as seen by public DNS. If you recently made changes, allow up to your TTL time for them to propagate globally.
Technically yes, but practically it causes problems. Most email providers expect to be the sole MX. Splitting delivery means some email goes to one provider and some to another — your team sees fragmented inboxes. Use one provider and configure forwarding if needed.
Sending servers queue the message and retry periodically — typically for 4-5 days before generating a bounce. Brief outages often go unnoticed because senders experience delayed delivery rather than immediate failure.
Scroll to Top
Checker Tools