MX (Mail Exchanger) records specify which mail servers handle email for your domain. Without correct MX records, you cannot receive email.
How MX Records Work
- Someone sends email to [email protected]
- Sender's mail server looks up MX records for example.com
- MX record says: "Send mail to mail.example.com with priority 10"
- Sender delivers email to that mail server
MX Record Structure
example.com. MX 10 mail.example.com.
- example.com: The domain
- MX: Record type
- 10: Priority (lower = higher priority)
- mail.example.com: Mail server hostname
MX Priority
Multiple MX records with different priorities provide backup:
example.com. MX 10 mail.example.com. example.com. MX 20 backup.example.com.
- Priority 10 is tried first (primary)
- If unavailable, priority 20 is used (backup)
- Lower number = higher priority
Adding MX Records in cPanel
- Go to Zone Editor
- Click Manage for your domain
- Click + MX Record
- Enter:
- Priority: Number (e.g., 10)
- Destination: Mail server hostname
- TTL: Time to live
- Click Add Record
Ahosting Default MX Record
For email hosted with Ahosting:
Priority: 0 Destination: mail.yourdomain.com
Common Third-Party MX Records
Google Workspace
1 ASPMX.L.GOOGLE.COM 5 ALT1.ASPMX.L.GOOGLE.COM 5 ALT2.ASPMX.L.GOOGLE.COM 10 ALT3.ASPMX.L.GOOGLE.COM 10 ALT4.ASPMX.L.GOOGLE.COM
Microsoft 365
0 yourdomain-com.mail.protection.outlook.com
Zoho Mail
10 mx.zoho.com 20 mx2.zoho.com 50 mx3.zoho.com
Email Routing in cPanel
When using external email (Google, Microsoft):
- Go to Email > Email Routing
- Select your domain
- Choose Remote Mail Exchanger
- Click Change
This tells cPanel not to handle email locally.
MX Record Requirements
- MX target must be a hostname, not an IP address
- The hostname must have an A record
- Cannot use CNAME as MX target
- MX records are always for the root domain (not subdomains)
Troubleshooting MX Records
Not receiving email
- Check MX records are correct
- Verify mail server hostname has A record
- Check email routing in cPanel
- Wait for DNS propagation
Check MX records
nslookup -type=MX example.com dig example.com MX