MX record
An MX record is a DNS entry that tells the rest of the internet which servers are responsible for receiving email on behalf of a domain.
- MX (Mail Exchange)
- RFC 5321 / RFC 1035
- Receive email at the domain
- Lower number = higher priority
What it is
Every domain that receives mail must publish at least one MX record in DNS. The record tells sending servers where to deliver email addressed to anything@example.com. It is the most fundamental piece of mail routing on the internet: without an MX, a domain simply cannot receive mail.
Each MX record consists of two parts: a priority number and a hostname. The hostname must point to an A or AAAA record (an IP address) — it cannot be a CNAME. The priority is a 16-bit integer where lower means more preferred.
How it works
When a sender wants to deliver mail to alice@example.com, its outgoing server queries DNS for the MX records of example.com. The DNS resolver returns the list, sorted by priority. The sender tries the lowest-priority host first. If that connection fails, it falls back to the next.
; Example MX records for Google Workspace
example.com. IN MX 1 smtp.google.com.
; Example multi-server setup with fallback
example.com. IN MX 10 mx1.mailprovider.com.
example.com. IN MX 20 mx2.mailprovider.com.
example.com. IN MX 30 mx-backup.mailprovider.com.When two MX records share a priority, senders are required by RFC to pick between them at random — that's how mail providers spread inbound load across multiple servers. The priority numbers themselves are arbitrary; 10/20/30 is a common convention, but 1, 5, and 12 work equally well.
Common misconfigurations
The single most common MX mistake is pointing the record at a CNAME. RFC 2181 forbids it, and most resolvers will refuse to use the record. The fix is to point the MX directly at the hostname's A record.
Other frequent issues: forgetting to remove old MX records when migrating mail providers (resulting in some mail being delivered to a dead server), publishing an MX that points at a hostname which itself resolves to your sending IP (which fails reverse-DNS checks at many receivers), and forgetting the trailing dot in zone-file syntax — turnmx.google.com into mx.google.com.example.com and mail stops working entirely.
Why it matters for senders
MX records are read more often than you might think. Mailbox providers and anti-abuse services look at the MX of a sender's domain as a coarse trust signal. A domain whose MX is Google Workspace or Microsoft 365 carries different connotations than a domain with no MX at all or an MX pointing at obscure infrastructure.
For cold-email senders, MX configuration also determines whether your replies actually reach you. If you spin up a fresh sending domain and forget to add an MX, every prospect who hits reply gets a bounce. Always ensure inbound routing is working before you run a single warmup cycle.
Related
- SPF — the DNS record for outbound, not inbound
- DKIM — also published in DNS
- Email deliverability — what MX is one ingredient of
- Email warmup guide for 2026
- How NeverSpam verifies your DNS before warmup starts