Mail Exchanger Records (MX Record)

June 18, 2016 / Web Hosting

An MX record (mail exchanger record) specifies the mail server that is responsible for receiving email on behalf of a domain name.

Suppose, If you have your own domain name called “yourdomainname.com” and you want to setup your own email address like [email protected]
Now, when someone sends an email to this particular email address, the sending mail server needs to know where to deliver that mail.  Here, MX Records comes into play.  

For the email services on your domain, an MX record works like an entry in an address book. When an email is addressed to your domain, it tells other mail servers which server they should send the email to.

Mail Exchanger or MX records are part of the DNS information for a domain. An MX record has a preference. Preferences are an unsigned 16bit number and hence, range from 0 to 65535. MX records with a lower preference are preferred. MX records with equal preference are valid and are treated equally. As an example the MX records for the domain webhosting.uk.com are:

The DNS contains the MX entry as

webhosting.uk.com 14400 IN MX 10 mail.webhosting.uk.com

Domain Name

webhosting.uk.com 14400 IN MX 20 mail2.webhosting.uk.com

When a foreign mail server wants to send a message to an address at webhosting.uk.com the foreign server will first attempt to deliver the message to mail.webhosting.uk.com. If this fails then the foreign mail server will attempt to deliver the message to mail2.webhosting.uk.com.

If this fails then the foreign mail server should wait and then retry the process starting with mail.webhosting.uk.com. If the mail is successfully delivered to mail2.webhosting.uk.com then it is up to that server to deliver the mail but typically it will deliver the message to mail.webhosting.uk.com. In this way mail for a domain passes through the lowest preference Mail Exchanger.

Priority Value in MX Record

Each and every MX record has a priority value. When there are multiple MX records for a domain, this priority value is considered.
When there is lowest priority value (for e.g. 0)  then the server has highest priority. and, highest priority value has the lowest priority. 

For proper email delivery, MX records are essential because they provide a way for other mail servers to find the correct server responsible for accepting email on behalf of your domain.

Author

  • Niraj Chhajed

    I'm a SEO and SMM Specialist with a passion for sharing insights on website hosting, development, and technology to help businesses thrive online.

Spread the love