What is an MX Record?

  • September 12, 2017
  • 0 Comments

A mail exchanger (MX) record specifies how mail should be routed for email addresses at a specific domain name. It tells a host name which should point to a mail server responsible for accepting mail at the domain, and a preference number. If multiple MX records are configured, the sending mail server will try to deliver mail to the record with the lowest preference number first. If delivery fails, the sending server will then move on to the record with the next higher numbered preference.

Can I have more than one MX record?

Yes, you can have multiple MX records as long as every host name listed will accept mail for the domain and deliver it to the same place. Most mail servers will attempt delivery to the hosts with lower preference numbers first, but this isn’t guaranteed. Records with identical preference numbers will have load split fairly evenly between them.

Can I use multiple MX records to deliver mail to some addresses to one mail system and other addresses to another?

No, you cannot divide mail delivery on a per-user basis for a single domain name. If you configure multiple MX records pointing to separate independent mail servers then mail delivery will be split between the two servers, with each server always receiving some of the mail addressed to all users at the domain. This will result in each server bouncing mail addressed to users that are only configured on the other server.

Can I use MX records to direct mail to different servers based on host name (for example, user@mail2.example.com)?

Yes, you can use third level names to direct email to separate distinct servers. For example, if you wanted all mail addressed to users @user.example.com to be handled by one mail server and mail addressed to users @corp.example.com to be handled by another mail server, you could use the following records:

user   MX   10   server1.example.com

corp   MX   10   server2.example.com


How helpful was this article to you?