Knowledgebase: Domains
What is MX Records?
Posted by Daniel Naval on 16 May 2019 07:17 PM

What is MX Records?

 

Mail Exchanger Record or MX Record is a resource record in the Domain Name System 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.

 

To check for the MX records of a domain. (See below.)

 

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.)
  2. Once initiated, the command prompt window will appear. Next is to below instructions.
    1. Type in "nslookup" and hit enter to go to the nslookup interface.
    2. Next is to type "set q=MX" (this is to set query that is Mail Exchange Records) then hit enter.
    3. 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 "ukhost4u.com". See below.

 

ukhost4u.com

MX preference = 20, mail exchanger = fallback.ukhost4u.com

ukhost4u.com

MX preference = 10, mail exchanger = mx.ukhost4u.com

 

 

 

 

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.

 

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

Note: For our query, we are checking ukhost4u.com's Mail Exchange Records.


 

 

On the image above, it shows that the MX Records for the domain "ukhost4u.com". See below.

 

Domain Name

TTL (Time To Live)

Class

DNS Record Type

Priority

MX Destination

ukhost4u.com

899

IN

MX

20

fallback.ukhost4u.com

ukhost4u.com

899

IN

MX

10

mx.ukhost4u.com

 

Multiple MX Records

There are also some domains that are using multiple Mail Exchange Records. This is to ensure that if one email server goes down, there will be other mail servers to handle the emails. Basically, the others can act as a backup. 

Note: For this query we used gmail.com for our domain.

 

 

Domain

TTL (Time To Live)

Class

DNS Record Type

Priority

MX Destination

gmail.com

3599

IN

MX

30

alt3.gmail-smtp-in.1.google.com

gmail.com

3599

IN

MX

40

alt4.gmail-smtp-in.1.google.com

gmail.com

3599

IN

MX

5

gmail-smtp-in.1.google.com

gmail.com

3599

IN

MX

20

alt2.gmail-smtp-in.1.google.com

gmail.com

3599

IN

MX

10

alt1.gmail-smtp-in.1.google.com

 

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 gmail.com and unable to reach the 1st priority, then it will try to reach for the 2nd Priority with the lowest number.