MX records or mail exchange records maps a domain name to a list of mail exchange servers for that domain.

Example with MX Record Syntax – Single mail servers

mydomain.com. 14400 IN MX 0 mydomain.com.

The MX record shows that all emails @ mydomain.com should be routed to the mail server at mydomain.com.

The DNS record shows that mydomain.com is located at 26.34.9.14. This means that email meant for [email protected] will be routed to the email server at 26.34.9.14.

This finishes the task of the MX record. The email server on that server then takes over, collects the email and then proceeds to distribute it to the user “test”.

It is important that there be a dot(“.”) after the domain name in the MX record.

If the dot is absent, it routes to “mydomain.com.mydomain.com”. The number 0, indicates Preference number.

Mail is always routed to the server which has the lowest Preference number. If there is only one mail server, it is safe to mark it 0.

Example with MX Record Syntax – Multiple mail servers

mydomain.com. 14400 IN MX 0 mydomain.com.

mydomain.com. 14400 IN MX 30 server2.mydomain.com

You can have unlimited MX entries for Fallback or backup purpose.

If all the MX records are equal Preference numbers, the client simply attempts all equal Preference servers in random order, and then goes to MX record with the next highest Preference number.

in M

Leave A Comment