DNS MX record explained 

We just started to chat about DNS records with the DNS A Records, and now we will see a second DNS record – DNS MX record. MX does not mean Mexican. It means Mail Exchanger. We will go into details about why such a DNS record must exist and why can’t we freely send emails the way we want. 

What is a DNS MX record?

Every action that relates to domains needs DNS records for instruction. In the DNS MX record case, it is a text document, mail exchanger record, that shows which server is responsible for receiving the emails that go for a particular domain. 

 If you are sending an email to john@EXAMPLE.com, your computer needs to know where is John’s email hosted. It will check for the DNS MX record at the domain nameserver that has the information for the domain EXAMPLE.com. When you receive the MX record, you (the software you are using) will know which server is responsible for receiving the mail and send it there. 

So to make it easy.

DNS MX record is the text file that people need to send you emails (to the domain you have) and get the information on which server and where the mails should be sent. 

It is like a phonebook that says, “to send email to john@EXAMPLE.com you need to send them to the mailserver.example.com where John’s email box is”. 

DNS MX record contains

  • Type: MX. Each DNS record has a specific type.
  • Host: The domain name like EXAMPLE.com.
  • Points to: Shows which is the server responsible for receiving the emails to EXAMPLE.com.
  • TTL: How much time the DNS MX record is valid and should be kept in the temporary memory.
  • Priority: Number from 0 to 65535 that indicates how important the mail is. A lower number means higher priority.  

Learn more about the DNS MX record!

Why do we need a DNS MX record? 

We need DNS MX records so your outgoing emails arrive at the right place. When you send a mail to john@EXAMPLE.com, you want John to receive it. Not accidentally send it to john@ANOTHERSITE.com or john@EXAMPLE.eu. You need that the right person receives it, and the mail not to be lost on the way.

The same goes the other direction. You need to properly set up your DNS MX records to receive emails at your email you@YOURSITE.com. Otherwise, you won’t get any emails, and the senders will receive an error. 

How to check a DNS MX record?

There are many ways to check DNS MX records, and you can do it through a website or using a different command on almost any OS (Windows, Linux, macOS, FreeBSD, etc.) or application (Android and iOS). 

You can find a site that simply asks for the domain and the type of record you would like to check. 

Windows (nslookup command)

 Start the Command Prompt. Click on the Windows Start icon on your left, then write “cmd” and you will see it in the results. Click on it. 

Inside the Command Prompt type, the following command and press enter:

nslookup -query=mx example.com

*change example.com with the domain you like to check. 

Linux and macOS (dig command)

Open the Terminal application. 

 On macOS, open the Finder, go to Application, open Utilities, and there you will find the Terminal. Open it. 

On Linux (Ubuntu), you simply press Ctrl+Alt+T buttons together, and it will pop-up. 

So inside the Terminal, you will need to type this command and start it by pressing enter:

dig example.com MX

*change example.com with the domain you like to check. 

Conclusion

It is really easy to understand the DNS MX record and how does it work. We hope this knowledge helps you in your work, and you can set up DNS MX records properly so that you can receive emails with problems.  

 

Leave a Reply

Your email address will not be published. Required fields are marked *