checkmx

Check MX Priority Range for All Domains

Syntax

checkmx

Examples

$ /go/checkmx

Best Practices for MX Record Priorities

Setting proper MX (Mail Exchange) priorities ensures reliable email delivery by defining the order in which mail servers should be contacted. Here's how to optimize your MX records for the best performance and redundancy.

1. Recommended MX Priority Values

Priority (Preference) Server Role Description
0 or 10 Primary MX The main mail server that should receive emails first. Some providers (like Google Workspace) use 1.
20 Secondary MX A backup server if the primary fails. Should be a different IP/host for redundancy.
30 or higher Tertiary MX Additional backup (optional). Only needed for high-availability setups.
100+ Emergency Backup Rarely used; only if you have a distant or less reliable fallback.

Example Configuration:

example.com. IN MX 10 mail1.example.com.
example.com. IN MX 20 mail2.example.com.
example.com. IN MX 30 mail-backup.provider.com. (Optional)

2. Best Practices for MX Records

✅ Do:

  • Use small, logical numbers (e.g., 10, 20, 30) for clarity.
  • Have at least two MX records (primary + backup) for redundancy.
  • Use geographically separate servers (if possible) to avoid single points of failure.
  • Ensure backup servers can queue emails if the primary is down.

❌ Avoid:

  • Setting the same priority for multiple MX records (can cause unpredictable load balancing).
  • Using extremely high values (like 100) for primary servers (may confuse some mail systems).
  • Relying on a single MX record (if it fails, emails will bounce).

3. Common MX Record Mistakes & Fixes

Issue Why It's Bad Fix
Only one MX record No failover; emails bounce if server is down. Add at least one backup MX (priority 20).
Primary MX set to 100 Remote servers may deprioritize it. Change to 0 or 10.
Multiple MXs with same priority Unpredictable delivery behavior. Assign different priorities (e.g., 10, 20).
Backup server not accepting mail Emails get lost if primary fails. Test backup server's SMTP acceptance.

4. Real-World Examples

For Google Workspace / Gmail:

example.com. IN MX 1 aspmx.l.google.com.
example.com. IN MX 5 alt1.aspmx.l.google.com.
example.com. IN MX 5 alt2.aspmx.l.google.com.
example.com. IN MX 10 alt3.aspmx.l.google.com.
example.com. IN MX 10 alt4.aspmx.l.google.com.

(Google uses multiple equal-priority backups for load balancing.)

For Self-Hosted (Postfix/Exchange):

example.com. IN MX 10 mail.example.com. (Primary)
example.com. IN MX 20 backup-mail.example.com. (Secondary)
example.com. IN MX 50 mail-relay.aws.com. (Emergency)

5. Testing & Verification

  • Check your MX records:
    dig MX example.com +short
    nslookup -type=MX example.com
  • Test email delivery: Use tools like MXToolbox or Google Admin Toolbox.
  • Verify backup SMTP: Temporarily block the primary server and test if emails still arrive.

Final Recommendation

  • For most setups: Use 10 (Primary) and 20 (Backup).
  • For critical services: Add a third MX (30 or higher) from a different provider.
  • Avoid priority 100 unless it's a last-resort backup.

Related GoPanel commands

blacklist - Block Blacklist IPs (Bad Bots and SSH Brute Force Attacks)
block - Block an IP address in GoPanel Server
checkfirewall - Verify and ensure that important required ports are open on your GoPanel server
checkimap - Check the IMAP port and SSL certificate
checkmail - Check if your server provider supports mail port 25 (SMTP)
checksmtp - Check the SMTP port and SSL certificate
firewall - Install a firewall on a GoPanel Server
mailssl - Installi SSL Certificates for SMTP and IMAP in GoPanel
reversedns - Check Reverse DNS (rDNS) in GoPanel
smtp - Managing SMTP Port: Block, Unblock, and Change SMTP Port
smtplimit - Limiting Outgoing SMTP Emails per Email Address
unblock - Unblock an IP address in GoPanel Server
waf - Block IPs via Cloudflare WAF


At Your Service

Our team is on hand 24/7 to not only solve technical issues, but to offer the guidance and technical support you need to succeed online. Give us a ring.

+2 01006931666 Chat
© 2020 - 2025 GoPanel Inc., all rights reserved.