Black Friday: 60% off yearly plans with code BF2026, until November 30. See the deal

Learn

MX record priority: how the numbers work

MX priority (preference) is a number where lower means more preferred: sending servers try the lowest number first and fall back to higher numbers if it fails. Records with the same number are tried in random order to spread load, as RFC 5321 requires.

The short answer
  • Priority 0 or 1 is tried before 10, which is tried before 20.
  • Equal priorities share load, because senders must randomize them.
  • Absolute numbers do not matter. Only the order does.
Try the mx lookupFree, live, no signup

How does a sender choose between these records?

Example MX set and delivery order
MX recordPriorityUsed
mx1.example.com10Tried first, shares load with mx2
mx2.example.com10Tried first, shares load with mx1
backup.example.net20Only if both priority-10 hosts are unusable

Rules from RFC 5321, section 5.1.

What else do the MX rules say?

Lowest first

Lower numbers are more preferred and the value must be used in sorting.

Randomize equals

Same-preference records must be randomized to spread load.

No MX, implicit MX

With no MX records, senders treat the domain own A or AAAA record as an implicit MX at preference 0.

Null MX

One record, priority 0, target a single dot, declares the domain accepts no mail (RFC 7505).

What do primary, backup and null MX look like?

Zone file
example.com.  IN  MX  10  mx1.example.com.
example.com.  IN  MX  20  backup.example.net.

; domain that never receives mail (RFC 7505)
example.org.  IN  MX  0  .

Leftover MX records catch mail

After moving providers, an old record at a lower priority number still receives mail. Microsoft says to remove old MX records or give them a lower priority (higher number) than the new one.

How do you read and change MX priority safely?

  1. 01

    List the current records

    Use the MX lookup and note every host with its number.

  2. 02

    Decide the order

    Primary gets the lowest number. Backups get higher numbers.

  3. 03

    Edit one record at a time

    Keep at least one working record at all times.

  4. 04

    Lower the TTL beforehand

    A short TTL makes a rollback faster if mail stops arriving.

  5. 05

    Recheck after TTL expires

    Confirm the order from more than one resolver.

Does a backup MX help?

Own server pair

A second host with a higher number covers an outage of the first, if it can store and forward mail.

Cloud mail

Providers such as Google use a single record, so you do not add a backup.

Unprotected backup

A backup MX with weaker filtering can become the easiest path for spam.

What are common MX priority mistakes?

  • Leaving an old provider record at a lower number than the new one
  • Giving all records the same number when you want a primary and a backup
  • Adding a backup host that does not accept mail for the domain
  • Using an IP address instead of a hostname in the MX target
  • Forgetting that the lowest number wins, not the highest, when copying values from another guide

Common questions

Which MX priority is used first?

The lowest number. Priority 0 or 1 is tried before 10, and 10 before 20. RFC 5321 says lower numbers are more preferred and senders must sort by the value.

What does equal MX priority do?

It spreads delivery across the hosts. RFC 5321 says that if several MX records share the lowest preference and nothing favors one, the sender must randomize them.

Does the actual number matter, like 5 versus 10?

Only the relative order matters. 5, 10 and 20 behave the same as 1, 2 and 3. Providers pick numbers such as 1, 10 or 0 by habit, so follow their instructions exactly.

What is a null MX record?

A single MX with priority 0 and target a dot. It says the domain accepts no email, so senders fail immediately instead of retrying. RFC 7505 says it must be the only MX record.

What happens if a domain has no MX record?

RFC 5321 says that when no MX records exist, senders treat the domain as having an implicit MX with preference 0 pointing to the domain itself and use its A or AAAA record. A null MX avoids that.

Watch your domains automatically

Aepto monitors expiry, DNS, SSL and uptime for every domain you own and alerts you when something changes. Free for 3 domains.