What an MX Priority Number Is
MX (Mail Exchange) records tell the world which mail servers handle email for a domain.
Each MX record has a priority number (technically called the preference value).
The rule: the lower the number, the higher the priority.
Example:
10 mail1.example.com → first choice
20 mail2.example.com → backup
30 mail3.example.com → last resort
So if a mail server wants to deliver mail to @example.com, it asks DNS for MX records, sorts them by priority number, and tries the lowest value first.
Where the Priority System Came From
The system was defined in the early 1980s with RFC 974 (1986), later refined by RFC 2821 (2001) and now RFC 5321 (SMTP).
At the time, networks were flaky and servers unreliable. Engineers needed a way to tell senders: “Here’s the main server, and if that’s down, here’s where to go next.”
Instead of a single MX record, domains could list multiple, with numbers encoding the order.
Why We Need It
- Failover: If the primary mail server is unreachable, mail gets retried against the next priority.
- Load distribution: By giving multiple records the same priority number, servers randomly spread the load.
- Redundancy: Allows backup servers to hold or relay mail when the primary is offline.
- Control: Admins can influence which servers get hit first without DNS hacks.
How It Really Works (and Misconceptions)
Not “try all at once.” Mail servers don’t shotgun mail to every MX host. They:
- Sort MX records by priority (lowest number first).
- Attempt delivery to the first.
- If it fails (e.g., connection refused, timeout), they move to the next.
- They wait and retry according to SMTP rules.
Equal numbers = round robin. If two MX records share the same number, the sender chooses randomly.
It only goes “down the list” if higher-priority hosts fail.
Odd Things That Have Happened
Misconfigured MX traps: Some admins set a backup MX at a remote ISP, thinking it was safe but spam often piles up there, bypassing spam filters on the main server.
MX with no A record: Sometimes domains publish MX pointing to hosts that don’t exist (typo or misconfiguration). Mail gets stuck retrying until it fails.
Priority confusion: Some admins mistakenly think “higher number = higher priority” and reverse their setup. Result: their “backup” ends up handling all mail.
Spam farms exploiting MX failover: Attackers sometimes hit the backup MX directly, knowing they’re often less protected.
Failover and Redundancy in Action
- Normal path: Mail goes to the MX with the lowest number.
- Failure mode: If that host is down or unreachable, the sending server waits a bit, then retries the next priority host.
- Persistence: SMTP is patient. It will queue and retry mail for days (default up to 5 days) before bouncing.
- Redundancy with backup MXs: Backup servers don’t usually deliver the mail they queue and forward to the primary once it comes back online.
The Subtlety of “1” vs. Other Numbers
Numbers don’t have to start at 1 you can use 0, 5, 10, 100, etc.
Convention: leave gaps (10, 20, 30) so you can “slot in” new servers later.
A record with priority 1 doesn’t mean “faster” than 10 in practice — just “preferred.”
Key Takeaways
MX priority numbers are the order of preference, not speed boosters.
Lowest number = first choice.
They enable failover, redundancy, and load sharing in email delivery.
Misconfigurations and assumptions have caused weird behaviors (and spam headaches).
The system is simple but critical one mis-set number can reroute an entire organization’s email.
You can use DNSRedo.com To manage all your MX Records across all your public domains, Try it today!
Top comments (0)