How do priority levels in MX records work?

Still have a question, spotted an error, or have a better explanation or a source we should cite?

When you publish an MX record, you give it a number alongside the hostname. That number is the priority, and it controls which server a sending mail system tries first. The lower the number, the higher the priority. So if you have two records, one at priority 10 and one at priority 20, every sender will attempt the priority 10 server first.

If that primary server is unreachable, the sending system moves on to the next lowest number and tries that one. This is the fallback mechanism built into the MX spec. It's not something you need to configure beyond setting the numbers correctly. It just works that way.

A typical three-tier setup looks like this:

  • Primary server at priority 10
  • Backup server at priority 20
  • Emergency backup at priority 30

The specific numbers don't matter much on their own. Priority 10, 20, 30 works just as well as 5, 15, 25. What matters is the relative spacing. Give yourself room between values so you can insert a new record later without renumbering everything. That's why 10, 20, 30 has become the common convention rather than 1, 2, 3.

If two records share the same priority number, sending systems split the traffic between them roughly evenly. This is round-robin load balancing. It's useful when you want two servers to share the load rather than one acting as a backup for the other.

One thing worth knowing: some setups place a spam filtering or email security gateway at a lower priority number so that inbound mail passes through inspection before it ever reaches your actual mail server. If you're using a third-party filter, check its documentation. It'll tell you exactly what priority to set and in what order relative to your mail host. Getting this wrong can mean mail bypasses your filter entirely and lands straight in your mailbox unchecked.

If you want to verify what your MX records actually look like from the outside, you can run a quick check with our free MTA-STS checker or use the email header analyzer to trace where inbound mail is routing. Or if something's not resolving the way you'd expect, our SOS hotline is free.

The most useful email questions, once a month

One email a month. New questions worth reading, real deliverability changes (Gmail and Outlook updates, etc.), and any tool or report that landed since the last issue. No fluff, no upsell.

Contributors

Who worked on this answer

Every name links to their profile. Every company links to their site. Real people, real accountability.

Ask an AI · tailored to your setup

Get a priority plan for your MX setup

I'm setting up MX records for my domain and need help assigning priority numbers. Please give me a ranked list of: (1) the best priority number conventions to use for primary and backup servers, (2) common mistakes people make when assigning MX priorities, (3) scenarios where equal priority numbers make sense versus staggered ones, and (4) gotchas to watch for if I'm routing through a third-party spam filter.

Edit the yellow boxes, then send to the AI of your choice.