MX Record Email
The MX record (Mail Exchange record) specifies which mail servers are responsible for receiving email on behalf of a domain. When someone sends an email to [email protected], MX records tell the sending server where to deliver that message.
Look Up MX Records
Check MX records for any domain using our free DNS lookup tool.
Look Up MX Records →What Is an MX Record?
An MX record tells the internet which mail servers handle email for your domain. Unlike A records which point directly to an IP address, MX records point to a mail server's hostname, and include a priority value to determine the order mail servers should be tried.
Without MX records, your domain cannot receive email. The sending mail server would have nowhere to deliver messages.
MX Record Format
An MX record consists of these components:
| Component | Description | Example |
|---|---|---|
| Name | The domain receiving email | example.com |
| Type | Record type identifier | MX |
| TTL | Time to live (cache duration in seconds) | 3600 |
| Priority | Preference value (lower = higher priority) | 10 |
| Value | Mail server hostname (not IP address) | mail.example.com |
Example MX Record
example.com. 3600 IN MX 10 mail.example.com.
This record tells mail servers to deliver email for example.com to mail.example.com with priority 10.
Understanding MX Priority
The priority value determines which server to try first. Lower numbers = higher priority. If the highest-priority server is unavailable, the sender tries the next one.
example.com. 3600 IN MX 10 mail1.example.com.
example.com. 3600 IN MX 20 mail2.example.com.
example.com. 3600 IN MX 30 mail3.example.com.
In this configuration:
- Priority 10:
mail1.example.com— Tried first (primary) - Priority 20:
mail2.example.com— Tried if primary fails (backup) - Priority 30:
mail3.example.com— Tried if both fail (tertiary)
Common priority schemes include 10/20/30 or 1/5/10. The actual numbers don't matter — only their relative order.
Common MX Record Configurations
1. Single Mail Server
Simple setup with one mail server:
example.com. 3600 IN MX 10 mail.example.com.
2. Primary and Backup Servers
Redundant setup for high availability:
example.com. 3600 IN MX 10 mail.example.com.
example.com. 3600 IN MX 20 backup-mail.example.com.
3. Google Workspace (Gmail)
Standard configuration for Google Workspace:
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 5 ALT2.ASPMX.L.GOOGLE.COM.
example.com. 3600 IN MX 10 ALT3.ASPMX.L.GOOGLE.COM.
example.com. 3600 IN MX 10 ALT4.ASPMX.L.GOOGLE.COM.
4. Microsoft 365 (Exchange Online)
Configuration for Microsoft 365:
example.com. 3600 IN MX 0 example-com.mail.protection.outlook.com.
5. Load Balancing (Equal Priority)
Same priority distributes load across servers:
example.com. 3600 IN MX 10 mail1.example.com.
example.com. 3600 IN MX 10 mail2.example.com.
MX Records and Email Authentication
MX records work alongside other DNS records for email:
- SPF Records — Specify which servers can send email for your domain
- DKIM Records — Add cryptographic signatures to verify email authenticity
- DMARC Records — Define policy for handling authentication failures
While MX records handle incoming email routing, SPF/DKIM/DMARC handle outgoing email authentication.
MX Record Best Practices
- Always have backup MX records — Multiple MX records with different priorities ensure email delivery even if your primary server is down.
- Point to hostnames, not IPs — MX records must point to a domain name that has an A or AAAA record, not directly to an IP address.
- Don't use CNAMEs — The MX target should have an A/AAAA record, not a CNAME (this can cause issues with some mail servers).
- Use reasonable TTLs — 3600 seconds (1 hour) is common. Lower TTLs allow faster changes but increase DNS queries.
- Test with multiple tools — Verify your MX records work correctly before relying on them for production email.
Null MX Record
If a domain should not receive email, you can create a "null MX" record (RFC 7505):
example.com. 3600 IN MX 0 .
This explicitly tells sending servers that the domain doesn't accept email, which is faster and cleaner than having no MX record at all.
Troubleshooting MX Records
Common issues and solutions:
- Not receiving email — Verify MX records exist and point to the correct mail server hostname.
- MX host not found — The mail server hostname needs its own A or AAAA record.
- Emails going to wrong server — Check priority values; lower numbers are tried first.
- Delayed email delivery — May indicate DNS propagation is in progress, or the primary server is down and backups are being tried.
- Bounce messages — Check that your mail server is properly configured to accept email for your domain.
Monitor Email DNS Records
DNS Explorer — Track MX records and all email-related DNS records across your domain portfolio. Built for IT teams managing email infrastructure.
Start free DNS Explorer trial14-day full-feature trial
Check Your MX Records
Use our DNS Record Finder to look up MX records for any domain.
Look Up MX Records →