MX Record Priority Explained: What the Numbers Mean (0, 10, 20…)
MX Record Priority Explained: What the Numbers Mean (0, 10, 20…)
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.
Quick Answers
What is the significance of the priority value in MX records? The priority (also called preference) is the order in which sending mail servers try your mail servers. They sort your MX records from the lowest number to the highest and attempt delivery to the lowest first; higher numbers are only used if a lower one is unreachable. It has nothing to do with quality or speed—it is purely delivery order.
What does MX priority 0 mean?
Zero is simply the lowest possible priority number, so a record with priority 0 is tried first. Microsoft 365, for example, publishes its single MX record with priority 0. It is not a special "disabled" or "wildcard" value. (The only special MX is a null MX: priority 0 with a . as the mail server, which declares that the domain accepts no email at all.)
MX priority 0 or 10—which is better? Neither is "better"; only the ordering between your own records matters. A single record with priority 0 and a single record with priority 10 behave identically. Use whatever your email provider specifies, and leave gaps (10, 20, 30) when you run several servers so you can insert one later without renumbering.
Can two MX records have the same priority? Yes. Equal priorities mean load balancing, not failover: sending servers pick one of the equal-priority hosts at random and spread mail across them. Google Workspace deliberately publishes pairs of servers with the same priority for this reason. If you want a backup that only receives mail when the primary is down, give it a higher number.
What are typical MX priority levels? Any whole number from 0 to 65535 is valid. In practice you'll see 0, 1, 5 and 10 from the big providers, and 10/20/30 when administrators run their own primary and backup servers. Backup MX services are usually placed at 50 or 100 so they never receive mail while the primary is healthy.
Want to see your own values? Run an MX record lookup for your domain—it lists every mail server with its priority and whether it resolves.
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:
- Priority (also called preference) - A number that determines the order servers are tried
- 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:
- Looks up your MX records
- Sorts them by priority (lowest first)
- Attempts delivery to the lowest priority server
- If that fails, tries the next priority
- 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:
- Sending server attempts connection to mail1.example.com
- Connection times out or is refused
- Sending server moves to next priority (20)
- Mail2.example.com accepts the message
- 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
- ✅ Primary server gets the lowest number - Typically 10 or lower
- ✅ Leave gaps between priorities - Use 10, 20, 30 not 1, 2, 3
- ✅ Match your provider's recommendations - Don't improvise with Microsoft 365 or Google Workspace
- ✅ Remove old records after migrations - Audit MX records after any email provider change
- ✅ Document your configuration - Note why each server exists and its intended role
- ✅ 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
Key Takeaways
- ✅ Lower MX priority numbers are preferred - 10 beats 20, always
- ✅ Priority 0 is just "first" - not a special value (unless the server is
., which is a null MX) - ✅ 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.