Site icon

The Complete Guide to MX Records

This is the fourth installment In the of a ten-part series outlining the ten most common Domain Name System (DNS) Records.  In this article I will examine Mail Exchange Records, or MX Records.  Find links below to the previous articles:

MX Records Overview

MX Records specifies the mail server responsible for accepting email messages on behalf of a domain name.  If your MX Records are not configured or configured improperly you will not be able to send and/or receive email. Setting up MX records can be simple or complex, depending on who manages your website’s DNS and which flavor of email you choose.

Mail Platforms

I’m going to define three types of mail platforms:

Some platforms provide robust services, like Microsoft Office 365 or Gsuite.  There are also less expensive options like Zoho Mail and Fatcow.  Finally there are free options if you want to spend your time setting up email (and then configuring it until you finally get it right, not to mention maintaining it). I’m not going to link anything here because, quite frankly, I’ve yet to find one that has all the information you need to configure it to work properly.

The platform you choose to setup email hosting will likely determine how easy or difficult it will be configuring your MX Records. I have had email on all of these tiers, and each have their benefit – you will either be spending your time or your money, choose wisely.

MX Record Setup

Below is GoDaddy’s template for adding an MX Record – your DNS provider may have a slightly different layout, but the fields will be the same or similar.

Your DNS Provider should have links to help articles to help you setup your MX Records based upon the mail provider you choose. Certain DNS Providers partner with specific platforms and have some automation in place that will do the setup for you.  For example, if your DNS provider is GoDaddy and you purchase Office 365 through them, there’s a fully-automated and seamless setup of email for your domain.  Another DNS provider, DirectNic, is a much more affordable option which encourages you to use open source tooling for your email client and setup for that client is a breeze, though manual.  The lists and combinations are nearly endless – and when all else fails, use Google with good intentions to solve your issues.

MX Records – Digging Deeper

Transport of Email is governed under RFC 5321, which defines Simple Mail Transfer Protocol (SMTP).  MX Records must be used conjunction with A Records. The A record will point to the mail server’s IP Address. When another mail server wants to communicate with your mail server, it will look for an MX record. The MX record must point to the A record which points to the mail server’s IP address.

In 1986 RFC 973 deprecated the previous mail records, replacing them with the MX Record.  RFC 974 specified how MX records should contain the specific information in the record.

The domain servers store information as a series of resource records (RRs), each of which contains a particular piece of information about a given domain name (which is usually, but not always, a host). The simplest way to think of a RR is as a typed air of datum, a domain name matched with relevant data, and stored with some additional type information to help systems determine when the RR is relevant. For the purposes of message routing, the system stores RRs known as MX RRs. Each MX matches a domain name with two pieces of data, a preference value (an unsigned 16-bit integer), and the name of a host. The preference number is used to indicate in what order the mailer should attempt deliver to the MX hosts, with the lowest numbered MX being the one to try first. Multiple MXs with the same preference are permitted and have the same priority.

According to RFC 5321 In the absence of an MX record, email senders will attempt delivery to the address record (or http://www.yourdomainname.com).

Next in the DNS Records Series I will discuss the TXT Record.

Exit mobile version