🔧 More free tools: MX Checker·SPF/DKIM/DMARC·Bounce Rate·Disposable Detector

MX Records Explained

MX records are the backbone of email routing. Here's exactly how they work — no fluff.

Mailchimp email marketing platform

What is an MX record?

An MX record (Mail Exchange record) is a DNS entry that tells the internet which server accepts email for your domain. When someone emails you@yourdomain.com, their mail server queries DNS for your domain's MX records to find out where to deliver the message.

Without MX records, your domain simply cannot receive email — full stop.

Check any domain's MX records in seconds with our free MX record checker.

Anatomy of an MX record

Every MX record has two values: a priority (integer, lower = preferred) and a host (a server name that resolves to IPs via A/AAAA records).

Example (gmail.com):

gmail.com. MX 5  gmail-smtp-in.l.google.com.
gmail.com. MX 10 alt1.gmail-smtp-in.l.google.com.
gmail.com. MX 20 alt2.gmail-smtp-in.l.google.com.
gmail.com. MX 30 alt3.gmail-smtp-in.l.google.com.
gmail.com. MX 40 alt4.gmail-smtp-in.l.google.com.

Sending servers try priority 5 first. If it times out or refuses, they fall back to priority 10, then 20, etc. This is how Gmail provides fault tolerance across five mail servers.

Email campaign builder

How email actually routes

When Alice sends email to bob@example.com:

  1. Alice's mail client submits to her outgoing server (SMTP submission, port 587)
  2. Her server looks up example.com's MX records via DNS
  3. It picks the lowest-priority MX host still reachable
  4. It opens an SMTP connection on port 25 and issues MAIL FROM and RCPT TO commands
  5. The receiving server accepts or rejects (after SPF, DKIM, DMARC, and content checks)
  6. On success, the message is queued for Bob's mailbox

Common MX providers

  • Google Workspace: ASPMX.L.GOOGLE.COM (priority 1), plus alt1-5
  • Microsoft 365: yourdomain-com.mail.protection.outlook.com
  • Mailgun / SendGrid — transactional only, often not the primary MX
  • ProtonMail: mail.protonmail.ch, mailsec.protonmail.ch
  • Fastmail: in1-smtp.messagingengine.com, in2-...
  • OVH: mx1.mail.ovh.net, mx2.mail.ovh.net
Freelance web developers

MX vs A record (why you need MX)

Technically, the SMTP RFC allows sending mail to an A record if no MX exists. In practice, this is almost never relied on:

  • A-record fallback is slow and error-prone
  • Many modern mail servers refuse to send without finding an MX
  • You lose priority-based failover

Always publish an MX record if you want to receive email. It can point to the same host as your A record — but it must exist.

Troubleshooting MX issues

Problem: No MX found

Check your DNS provider's interface. You may have set the record on the wrong zone, or the record may have expired. TTL propagation takes up to 24h for changes.

Problem: Email bouncing with "MX not reachable"

Your MX host resolves but doesn't accept connections on port 25. Check firewall rules at the MX host, or that the server is actually running SMTP.

Problem: Low-priority MX receives mail instead of primary

The primary is unreachable. Fix it — a consistent fall-through to secondaries increases spam risk and is a red flag to receiving servers.

Problem: MX points to a CNAME

Against the RFC. Some resolvers accept it, others don't. Always point MX directly to an A/AAAA hostname.

Checking MX records

Using our tool: extract-emails.com/tools/mx-check — no login, instant results

Command line:

# Linux/Mac
dig MX yourdomain.com +short

# Windows
nslookup -type=MX yourdomain.com

Via DNS-over-HTTPS (curl):

curl -H "accept: application/dns-json" \
  "https://cloudflare-dns.com/dns-query?name=yourdomain.com&type=MX"
DD
About the Author

Daniel Dorfer worked for nearly four years in technical support at GMX, one of Germany’s largest email providers, and for almost two years at united domains, a leading domain hoster and registrar. He is a founding member of the KIBC (KI Business Club). This website was built entirely with the help of Claude Code (Opus 4.6) by Anthropic.

Email marketing suite