MX records are used by mail servers to determine where to deliver email for a domain. If no email is sent or received from a domain, then there is no reason to have MX records configured within the domain. MX records are ordered based on MX priority. The lowest priority MX record is the first destination for email. MX records should only map to A records in a domain (not CNAME records), or other external mail servers to the domain. If email is sent to a domain with no MX records, mail delivery will be attempted to the matching A record. For example, if the domain example.com had no MX records, mail would be delivered to the IP in the A record for example.com (if the A record exists).
MX records do not support DNS Failover, however, they have a sort of failover service built in. You’ll notice that when you create an MX record you have the option to set an MX Level for the record. The MX level determines the order (which mail server) that your mail will be attempted to be delivered. The mail server with the lowest MX level will first be attempted to have the email delivered.
So if you have three MX records with levels 10, 20, 30 the following would occur:
- Mail would always be first tried to be delivered to the MX record with MX Level of 10.
- If that mail server is down then the mail will try to be delivered to the mail server at 20.
- If the mail server at level 20 is down then the mail will be attempted to be delivered at the mail server at level 30.
- If the mail servers at level 20 and 30 are backup mail servers then the mail will be delivered to the mail server at level 10 when it comes back online.
- If you have multiple MX records with the same MX level then it will set up a round robin configuration for your email.
- The sending email server will not send email to both email servers.
1. Select your Domain
A. Select Managed DNS
B. Select Domains from the dropdown
C. Select the domain you want to add an MX record too.
2. Select MX Record
Under the MX records section, click the (+) icon to add a record.
3. Enter Record Values
A. Name: The hostname for the record. To set the record for the root domain (@), leave this field blank.
B. TTL: Time to Live, measured in seconds, determines how long the record is cached in resolvers. For more information on best practices for TTLs, click here.
C. Disable Record: Information on the NX Domain feature can be found in the Disabling a Record tutorial.
D. Server: Enter the destination mail server for the domain. If you point to a value external to the managed domain, then mail for thisisanexample.com will go to mx.otherdomain.com.
E. MX Level: The MX level determines the order (which mail server) that your mail will be attempted to be delivered.
F. Notes: Add a helpful note with keywords so you can search for your records later.
G. Save and Close/Continue: Save and Close to finish entering MX records or Save and Continue to add more records of the same type.