An MX record (Mail Exchange) tells sending mail servers where to deliver email for a domain. When someone sends email to user@example.com, their mail server looks up example.com’s MX records to find the destination.
Format
example.com. 3600 IN MX 1 aspmx.l.google.com.
example.com. 3600 IN MX 5 alt1.aspmx.l.google.com.
example.com. 3600 IN MX 10 alt3.aspmx.l.google.com.
Lower priority number = higher preference. If the priority-1 server is unreachable, the sender tries priority-5, then priority-10.
Rules
- MX records must point to a hostname (A/AAAA record), not an IP address
- MX cannot be a CNAME — RFC 5321 requires direct hostname resolution
- A domain with no MX record causes email to fall back to the domain’s A record IP (rarely intentional)
Common Providers
| Provider | MX Record |
|---|---|
| Google Workspace | aspmx.l.google.com |
| Microsoft 365 | yourdomain.mail.protection.outlook.com |
| Zoho Mail | mx.zoho.com |
| Self-hosted | Your mail server hostname |
Parked domains with no email should have no MX records — this signals to senders that the domain doesn’t accept email, preventing backscatter spam.