What Is MX Priority?
MX priority is a numeric value in an MX record that determines the order in which mail servers are tried for email delivery. Lower numbers indicate higher priority. This mechanism enables failover and load balancing for incoming email.
How MX Priority Works
When a sending mail server needs to deliver an email, it queries DNS for the recipient domain's MX records. Each MX record contains a priority value and a mail server hostname. The sender tries the server with the lowest priority number first. If that server is unavailable or rejects the connection, the sender tries the next lowest priority.
For example, with MX records 10 mail1.example.com and 20 mail2.example.com, mail1 is the primary server and mail2 is the backup.
Load Balancing with Equal Priorities
When multiple MX records share the same priority value, sending servers distribute mail randomly among them (round-robin). This provides basic load balancing. Google Workspace uses this approach with multiple servers at priority 5.
Best Practices
Always have at least two MX records with different priorities for redundancy. Use gaps between priority values (10, 20, 30) so you can insert new servers without renumbering. Ensure backup servers can queue and forward mail to your primary server when it recovers.
Frequently Asked Questions
Does a lower MX priority number mean higher priority?
Yes. Lower numbers are tried first. Priority 10 is preferred over priority 20. If priority 10 is unreachable, the sender falls back to 20.
What happens if two MX records have the same priority?
Sending servers distribute mail randomly among equal-priority servers, providing basic round-robin load balancing.
What is a good MX priority configuration?
Use priority 10 for primary, 20 for backup. Leave gaps for future servers. Google Workspace uses 1, 5, 5, 10, 10 across five servers. Microsoft 365 typically uses a single MX at priority 0.