What is the purpose of the MX record?

What is it?

Mail exchange record, or also called just MX record, is a DNS resource record. The Domain Name System (DNS) applies it to point accurately to the proper name of the incoming email server where emails have to be sent. DNS records are the essential part of providing instructions for various DNS processes. In this case, the MX record is giving the instruction that a particular server has to receive the emails sent to a defined domain.

How to create a DNS MX record?

Throughout the Internet, there are a lot of emails sent daily. There are several steps from sending to actual proper delivery, but let’s concentrate on the last part. Imagine the postman. He has to put the letter for you into your mailbox, but you don’t own one. So, as a result, without a safe place for storing all of your mail, some of it is going to be lost. Moreover, it is going to be a huge mess. That is why it is essential to correctly set your MX record and avoid all possible complications with receiving mail.

The MX record structure

  • Type: All DNS records have a specific type. In this case, it is MX.
  • Host: Here is the domain name, such as yoursite.com.
  • Points to: Here, it is the server that is responsible for receiving emails for yoursite.com.
  • TTL: Time to live value shows the amount of time the MX record is valid and has to be stored in the cache memory.
  • Priority: The number shows how important the mail is. As lower the number is here shows the higher priority. 

How to check the MX record?

To check your MX record is so easy and simple! You can do it by using a command on almost every OS, such as Windows, macOS, Linux, or through a website, or even application (Android and iOS). If you want, you can find a website that will ask for your domain and what kind of record you would like to see. The following commands are also easy to use. So, let’s explain how to perform them. 

For Windows (NSlookup command)

The first step is to open the Command Prompt. For that, you have to click on the Windows Start button on your left. In the search bar, write “cmd,” and it will display in the results. Click on it. 

As a second step, inside the Command Prompt type, the next command and just press enter:

nslookup -query=mx yourdomain.com

*Just replace yourdomain.com with the domain you wish to check. 

For Linux and macOS (Dig command)

Here the first step is to open the Terminal application. 

If you are using macOS, open the Finder, and go to Application. Next, open Utilities, and there you will see the Terminal. Open it. 

If you are using Linux (Ubuntu), you just have to press the Ctrl+Alt+T buttons together. Then, it will immediately pop up. 

So once you are inside the Terminal, you have do is to type the following command and start it by pressing enter:

dig yourdomain.com MX

*Just change yourdomain.com with the domain you wish to check.