MX record priority explained: lower numbers, failover, and equal values

The number in an MX record is formally a preference value and commonly called priority. Sending servers try the lowest value first. A record with 10 is therefore more preferred than one with 20; the word priority can feel backward, but the routing rule is not.

Updated July 14, 2026

How preference ordering works

example.com. MX 10 mx-primary.example.net.
example.com. MX 20 mx-secondary.example.net.
example.com. MX 30 mx-last-resort.example.net.
The sender starts with 10, then tries 20 or 30 when a more-preferred destination is unavailable.

Values do not need to be consecutive. 1, 5, 100 behaves the same as 10, 20, 30 because only ordering matters. Leaving gaps is convenient when a provider later asks you to insert a destination between existing levels.

What equal MX values mean

Hosts with the same preference are equally preferred. A sending server should randomize or otherwise spread attempts among them rather than always using the first DNS answer. Providers use equal values for distribution across multiple inbound clusters.

example.com. MX 10 mx1.provider.net.
example.com. MX 10 mx2.provider.net.
Both hosts are equally preferred; DNS answer order is not a guaranteed primary/secondary control.

Failover is not instant or identical everywhere

When the most-preferred destination is unreachable, a sender can try a less-preferred host. Temporary SMTP errors may instead cause queueing and later retries, depending on the failure and the sender's implementation. MX preference is destination selection, not a promise that every sender changes hosts immediately.

A secondary host also needs the correct recipient directory, anti-spam policy, TLS, and relay behavior. An outdated backup that accepts messages for nonexistent users or forwards without equivalent controls can create backscatter and security problems.

Why a backup MX can attract spam

Attackers may deliberately target the less-preferred server, hoping it has weaker filtering than the primary. If the backup accepts mail broadly and later relays it, it becomes an easier path into the same mailboxes. Modern hosted providers usually supply all required MX destinations as one managed system; adding an unrelated backup is rarely helpful.

  • Use only provider-approved destinations.
  • Apply the same recipient validation and anti-abuse controls everywhere.
  • Do not configure an open relay.
  • Monitor all MX hosts for reachability and certificate problems.

How to change and verify MX priority

  1. Record the current public MX set and its TTL.
  2. Obtain the complete new record set from the receiving provider.
  3. Publish its hostnames and values exactly, removing old-provider entries when instructed.
  4. Run the MX lookup and verify the lowest values belong to the intended preferred destinations.
  5. Send mail from an unrelated external provider and confirm real delivery.
  6. Continue checking during the old TTL window and watch both old and new systems during a migration.

If you are new to inbound routing, start with what is an MX record. Remember to review SPF, DKIM, and DMARC separately whenever an email-provider migration also changes outbound sending.

Sources and further reading

Common questions

Is MX priority ascending or descending?+

Ascending: the lowest preference number is tried first. A value of 10 is preferred over 20.

Can two MX records have the same priority?+

Yes. They are equally preferred, and sending servers distribute attempts between them.

Do I need a backup MX record?+

Use the full set your provider supplies. Do not add an unrelated backup unless it is fully configured and maintained for your recipients; senders already queue and retry temporary failures.

Does changing priority require changing SPF?+

Not because of priority itself. MX controls inbound delivery. Update SPF/DKIM when the migration also changes systems that send mail for your domain.