How to Understand and Modify MX Records

Posted on by Jay Allen | Updated:
Reading Time: 2 minutes

MX (Mail eXchanger) records are like an address for your domain’s email. The MX record tells the rest of the internet where to send your email.

For Mac OS X or Linux Users:
Mac OS X Users: Open your Applications folder, then Utilities. Double-click on the Terminal application.

Linux Users: Open your favorite Terminal/Shell application.

Type in the command:

dig mx

(Be sure to substitute your actual domain name for in the above example)

The “ANSWER SECTION” is what we want to know.

The line 14400 IN MX 0

tells us that the same server that is hosting the main domain’s web pages is also hosting the email for that domain.

For Windows Users

Open a command prompt by going to Start, clicking on Run, and in the window that appears type the word command (in many versions of Windows typing in cmd will also work) and press enter.

In the command line window that appears type the following, substituting the domain name you wish to query for

nslookup -type=mx

If the domain has a single MX record (like in the screenshot example above) you will see a result similar to the following example:

Non-authoritative answer: mail exchanger = 0

This will tell you your domain’s MX record (or records). Your MX record is like a pointer, or address, for your domain’s email. It tells other domains what server is responsible for receiving your domain’s email.

Multiple MX Records

Some domains utilize multiple MX records. This is to ensure that if one email server goes down a different server will handle the email and nothing will be lost.

Below is an example of Gmail’s MX records:

Dig MX Results

The numbers between the “MX” and the mail server name represent the priority of each server. Normally these are listed in order with the smallest number at the top. A small number represents a high priority for that server.

For the Gmail MX example above, the priority assignments show that is the first server that should be used (its number being 5). If a mail server is attempting to send email to a account, and it is unable to reach the server with the highest priority, it will move on to the next server in the list. In this example, if a mail server was unable to reach it would attempt to contact the next server in the priority list, which would be (priority 10).


Liquid Web’s Heroic Support is always available to assist customers with this or any other issue. If you need our assistance please contact us:
Toll Free 1.800.580.4985
International 517.322.0434

Avatar for Jay Allen

About the Author: Jay Allen

Latest Articles

How to install Puppet Server on Linux (AlmaLinux)

Read Article

Deploying web applications with NGINX HTTP Server

Read Article

Email security best practices for using SPF, DKIM, and DMARC

Read Article

Linux dos2unix command syntax — removing hidden Windows characters from files

Read Article

Change cPanel password from WebHost Manager (WHM)

Read Article