There was a problem loading the comments.

What is an MX Record?

Support Portal  »  Knowledgebase  »  Viewing Article


Mail Exchanger Record or MX Record is a resource record in the Domain Name System (DNS) that specifies the Mail Server who is accepting email messages from receiver’s domain. It simply tells the whole internet where your emails will be sent.

Use of MX Records

The main use of the Mail Exchange Records of a domain name is to specify how the emails should be routed using the Simple Mail Transfer Protocol (SMTP). Where, the SMTP is the Internet standard of email transmission, which is the most commonly used today.

Setting up Manual MX Record in the DNS Zone (in cPanel)

To setup or add an MX Record manually, you need to login to your cPanel and follow steps below.

1. In the Domains Section, click on “Zone Editor”.


2. Look for the domain name for which you want to Add New MX Record, then click + MX Record.

3. In the Add an MX Record box, you will be asked for the Priority and Destination.

4. The lowest number is the highest priorities. Zero (0) is the highest Priority.

5. On the Destination field,  type in the fully-qualified domain name (FQDN) of the mail server.

6. The FQDN consists of two parts; the hostname and the domain name. For example, 

7. Click on Add an MX Record, the cPanel will then add the mx record.


To edit an existing MX Record 

1. In the Domains Section, click on “Zone Editor”.

2. Select the domain you wish to edit an MX Record and then click on Manage.


To delete an MX Record 

1. In the Domain Section, click on “Zone Editor”.

2. Select the domain you wish to delete an MX Record and then click on Manage. 

3. Locate the MX from the “Type” column and click on Delete. You can also select the MX from the filter on top the list.

Multiple MX Records

There are instances that you may have 2 or more MX Records. The main purpose of the other existing MX records are backup, and it is checked based on the priority or preference (on the domain level,  not on the email account level). This is to ensure that if one email server goes down, there will be other mail servers to handle the emails.

Preference, Distance and Priority

The Preference value is a number between 0 and 65,535 that indicates how preferable a record is relative to other MX records for the same domain. If the domain only has one MX record, the preference does not matter.

When a domain has multiple MX records existing, the lowest Preference is checked to decided which mail server will attempt to deliver the mail first. If the first delivery attempt fails, then the sender will attempt to deliver again using the MX Record that has the next lowest value. The process will continue to repeat until the mail has been delivered successfully or it runs out of MX records to check.


The Preference is also called the Distance or Priority of an MX Record.

How to check for the MX records of a domain.


For Windows Users:


1. Open Command Prompt (cmd.exe). By clicking on Start, and click on Run or just type in “cmd” on Search. (Many versions of windows, cmd is the most commonly used to get on the Command Prompt.) 


Once initiated, the command prompt window will appear. Then follow instructions below.

2. Type in “nslookup” and hit enter to go to the nslookup interface.

3. Next is to type “set q=MX” (this is to set query that is Mail Exchange Records) then hit enter.

4. Lastly, type in the domain name which you wanted to get the MX Records. (See image for your reference.)


On the image above, it shows that the MX Records for the domain “”. See below. MX preference = 20, mail exchanger = MX preference = 10, mail exchanger =


For Mac OS X and Linux Users: 

*Mac OS X users:  Open your Applications folder, then Utilities. Double click on the Terminal application.

*Linux Users: Just open your usual Terminal application.


Type in “dig mx” then hit enter. It will show the MX Records of the domain you are trying to check.

Note: For our query, we are checking’s Mail Exchange Records.

On the image above, it shows that the MX Records for the domain “”. See below. 

Domain Name TTL (Time To Live) Class DNS Record Type Priority MX Destination 899 IN MX 20 899 IN MX 10


Multiple MX Records

For this query we used for our domain.

Domain TTL (Time To Live) Class DNS Record Type Priority MX Destination 3599 IN MX 30 3599 IN MX 40 3599 IN MX 5 3599 IN MX 20 3599 IN MX 10

The numbers in the priority field tells us which server will be the first one to be used. The lowest number is the Highest Priority.

If a mail server is trying to send an email to and unable to reach the 1st priority, then it will try to reach for the 2nd Priority with the lowest number.

Share via
Did you find this article useful?  

Related Articles

Self-Hosted Help Desk Software by SupportPal
© Host4u Limited