MX records are the DNS records responsible for email. Without correct MX records, email sent to your domain will fail to be delivered. Understanding MX records is essential for anyone setting up email on a custom domain.
MX Record Format
example.com. 3600 IN MX 10 mail1.example.com.
example.com. 3600 IN MX 20 mail2.example.com.
In this example, mail is first tried at mail1.example.com (priority 10). If unavailable, mail2.example.com (priority 20) is used as a backup.
MX Priority
The priority number (also called preference) determines which mail server to try first. Lower numbers = higher priority. Having multiple MX records with different priorities provides redundancy — if one mail server is down, email is delivered to the backup.
Common MX Record Setups
- Google Workspace (Gmail) — Uses Google's MX servers (aspmx.l.google.com)
- Microsoft 365 — Uses Microsoft's MX servers (yourdomain-com.mail.protection.outlook.com)
- Self-hosted mail — Points to your own mail server
Why Email Delivery Fails
Common MX-related email delivery issues:
- No MX records configured at all
- MX records pointing to a CNAME instead of an A record
- Wrong mail server hostname
- DNS propagation not yet complete after changing MX records
How to Check MX Records
Use our free DNS Lookup tool — select "MX" as the record type and enter your domain. You'll see all MX records and their priorities.
MX Records and Email Authentication
MX records work together with SPF, DKIM and DMARC records to authenticate your outgoing emails and prevent spoofing.