MX Records Explained- Beginners Guide
Last Updated: October 25, 2015
MX records are used to identify email servers on the Internet, they are part of the DNS system (domain name system) .
The DNS system is responsible for translating domain names into IP addresses.
For example, when you connect to a website on the Internet the first thing that your web browser does is to contact a DNS server and request the IP address of the web server. See DNS for Beginners
Once it knows this IP address it can connect to the web server.
When an email server needs to deliver Email to a recipient it first needs to know where the recipients mailbox is located.
It does this by asking the DNS server, for the server name of the server that has the mailbox .
The query process is something like this:
Can you tell me the name of the server that hosts the mailboxes for the domain abc.com
The server responds:
Yes the server is mail1.abc.com
In order to contact the server mai1.abc.com to deliver the message it requests the IP address from the DNS server:
Can you tell me the IP address of mail1.abc.com
And the response would be
Yes IP address is 192.168.1.1
Now the Mail server can contact the email server at mail1.abc.com and deliver the email.
The MX records contain the the names of the email servers in a domain that are capable of receiving email for that domain.
Here is a typical MX record entry taken from a Google example:
Organisations are required to have at least two email servers available, and the priority is the preference order.
The lower the priority the higher he preference.
In the example above mail1 is the preferred destination (priority 10), but the mail2 server (priority 20) will be used if mail1 is not available.
Changing MX records?
Most small businesses use the email services provided by their web hosting provider.
In this case the MX record entries are usually set up when you create your hosting account.
You will only need to change them if you decide to use a different email hosting provider.
If for example you wanted to move to using Gmail then you would need to edit your MX record entries to point to the Gmail email servers.
Changing MX records has no effect on your web hosting.
Here are the MX records for moving to Gmail:
To change them you need to go to your web hosting control panel, and look for an icon for DNS.
On Bluehost it is called MX Entry which opens DNS Zone Editor.
Because providers have different DNS management interfaces it is wise to look for help on your control panel if you are unsure.
DNS MX record changes can take up to 72 hours to take effect. It all depends on the TTL (time to Live setting) in the record entry.
Keep this is mind when testing and troubleshooting.
Checking MX records?
You can check your MX records without logging into your control panel by using the nslookup tool (part of Windows).
The command is:
nslookup -q=mx domainname
Here is a screen shot for my build-your-website.co.uk domain
There are also online tools like this one here that are easier to use and offer more features.
MX records are used for routing email and are part of the DNS system. They make it possible for you to easily move email providers and servers.
However for most small businesses that use a web hosting provider for email they don’t normally need changing.
Related Articles and Resources:
- Understanding SMTP
- Understanding the sending and receiving process video
- MX records Wiki entry
- Google support for Gmail