What is a DNS MX record?
This is the ‘mail exchange’ record, and it directs email to a mail server. The MX record indicates how email messages should be routed in accordance with Simple Mail Transfer Protocol (SMTP, the standard protocol for all email.) Like CNAME records, an MX record must always point to another domain.
Example of an MX record:
example.com | record type: | value: | TTL |
---|---|---|---|
@ | MX | 10 mailhost.example.com | 45000 |
@ | MX | 20 mailhost2.example.com | 45000 |
The numbers before the domains in the value entries for these MX records indicate preference; the server will always try mailhost1 first because 10 is lower than 20, in the result of a message send failure, the server will default to mailhost2.