Back to Blog

MX Record Priorities Explained - Why Lower Numbers Win

January 08, 2026 7 min read DNSLens Team
Email DNS Technical Guide Best Practices

MX Record Priorities Explained - Why Lower Numbers Win

If you've ever looked at your domain's MX records, you've probably noticed those numbers next to each mail server. They might seem arbitrary, but these priority values determine exactly where your email goes—and getting them wrong can mean lost messages or mail landing in the wrong inbox.

What Are MX Record Priorities?

MX (Mail Exchanger) records tell the world which servers handle email for your domain. Each MX record has two key components:

  1. Priority (also called preference) - A number that determines the order servers are tried
  2. Mail server - The hostname of the server that handles email

Here's what a typical MX configuration looks like:

example.com.    IN MX   10 mail1.example.com.
example.com.    IN MX   20 mail2.example.com.
example.com.    IN MX   30 mail3.example.com.

The Golden Rule: Lower Numbers Win

The most important thing to remember: lower priority numbers are tried first.

When someone sends an email to your domain, their mail server:

  1. Looks up your MX records
  2. Sorts them by priority (lowest first)
  3. Attempts delivery to the lowest priority server
  4. If that fails, tries the next priority
  5. Continues until delivery succeeds or all servers fail
Priority Server Role
10 mail1.example.com Primary - handles all mail when available
20 mail2.example.com Secondary - receives mail if primary is down
30 mail3.example.com Tertiary - last resort backup

💡 Pro Tip

Use increments of 10 for priorities (10, 20, 30) instead of consecutive numbers. This leaves room to insert new servers without renumbering everything.

How Failover Actually Works

The failover mechanism is elegant in its simplicity. When your primary mail server (priority 10) goes down:

  1. Sending server attempts connection to mail1.example.com
  2. Connection times out or is refused
  3. Sending server moves to next priority (20)
  4. Mail2.example.com accepts the message
  5. Email is delivered successfully

This redundancy is why many organizations run multiple mail servers—to ensure email delivery continues even during outages.

; Microsoft 365 typical MX setup
example.com.    IN MX   0  example-com.mail.protection.outlook.com.

; Google Workspace typical MX setup  
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.

Notice how Google uses multiple servers with the same priority (5 and 10). When priorities are equal, sending servers randomly choose between them—this provides load balancing.

Common MX Priority Misconfigurations

1. Backup Server With Lower Priority

This is the most dangerous misconfiguration:

; ❌ WRONG - Backup has lower priority than primary!
example.com.    IN MX   20 primary-mail.example.com.
example.com.    IN MX   10 backup-mail.example.com.

With this setup, ALL email goes to your backup server first. The "primary" server only receives mail when the backup is down—exactly backwards from what you intended.

2. Legacy Servers Still Listed

After migrating to a new email provider, old MX records often linger:

; ❌ WRONG - Old server still has lowest priority
example.com.    IN MX   5  old-mail-server.example.com.
example.com.    IN MX   10 example-com.mail.protection.outlook.com.

This sends all email to a server that may no longer exist or that you no longer control—a security risk and delivery black hole.

3. Same Priority Without Understanding

; ⚠️ CAUTION - Both servers receive equal traffic
example.com.    IN MX   10 server1.example.com.
example.com.    IN MX   10 server2.example.com.

Equal priorities cause load balancing, not failover. Both servers receive roughly half the mail. This is only correct if both servers are equally capable primary servers.

⚠️ Warning

If you set equal priorities expecting failover, you'll be disappointed. Mail will go to both servers randomly, regardless of whether one is "down."

4. Third-Party Backup Services at Wrong Priority

Some organizations use backup MX services that queue mail during outages:

; ❌ WRONG - Backup service receives all mail
example.com.    IN MX   5  backup.thirdparty.com.
example.com.    IN MX   10 mail.example.com.

The backup service should always have a higher number (lower preference) than your primary:

; ✅ CORRECT - Primary receives mail, backup only during outages
example.com.    IN MX   10 mail.example.com.
example.com.    IN MX   50 backup.thirdparty.com.

Email Provider MX Requirements

Different email providers have specific MX requirements. Here are examples for popular services:

Microsoft 365

example.com.    IN MX   0  example-com.mail.protection.outlook.com.

Microsoft recommends using priority 0 and only their single MX record.

Google Workspace

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 provides multiple servers with tiered priorities for redundancy.

Zoho Mail

example.com.    IN MX   10 mx.zoho.com.
example.com.    IN MX   20 mx2.zoho.com.
example.com.    IN MX   50 mx3.zoho.com.

Best Practices for MX Priority Configuration

  1. ✅ Primary server gets the lowest number - Typically 10 or lower
  2. ✅ Leave gaps between priorities - Use 10, 20, 30 not 1, 2, 3
  3. ✅ Match your provider's recommendations - Don't improvise with Microsoft 365 or Google Workspace
  4. ✅ Remove old records after migrations - Audit MX records after any email provider change
  5. ✅ Document your configuration - Note why each server exists and its intended role
  6. ✅ Test failover periodically - Verify backup servers actually work

How to Check Your MX Configuration

Verifying your MX records is the first step to ensuring proper email delivery. Look for:

  • Correct priority ordering (primary has lowest number)
  • No leftover records from old providers
  • All listed servers are actually operational
  • Priorities match your email provider's recommendations

🚀 Verify Your MX Records

Use our DNS lookup tool to check your current MX records and priorities. For a complete email configuration audit including SPF, DKIM, and DMARC, try our Email Authentication Checker.

Key Takeaways

  • Lower MX priority numbers are preferred - 10 beats 20, always
  • Failover happens automatically - Sending servers try the next priority when one fails
  • Equal priorities mean load balancing - Not failover behavior
  • Audit after migrations - Old MX records are a common source of lost email
  • Follow provider guidelines - Microsoft 365, Google Workspace, etc. have specific requirements

MX record priorities may seem like a small detail, but they're fundamental to reliable email delivery. A single misconfigured priority can route all your email to the wrong server—or into the void. Take a few minutes to audit your configuration today.


Want to ensure your complete email setup is correct? Check your SPF records, DKIM configuration, and DMARC policy alongside your MX records.