What is a DNS MX record?

The DNS MX record is one of the most used DNS records out there. Without it, you simply can’t be sure that you will receive any emails! You need the DNS MX record to signalize to the rest of the servers on the Internet, which exactly is your mail server responsible for receiving emails for the particular domain.

What is a DNS MX record?

The DNS MX record (Mail Exchanger) is a DNS resource record that identifies the host with its hostname and is responsible for receiving incoming emails for the particular domain name. It makes that connection between the domain name and the incoming mail server.

If you have yourdomain.com, you can set the MX record with the following parameters:

  • Host: yourdomain.com – your domain name.
  • Points to: mail.yourdomain.com – hostname of your receiving email server
  • Priority: 10 – the priority value could be from 0 to 100, where a smaller number indicates that it has a higher priority.
  • TTL: Time to live value.

So, why do you need it?

Do you want to receive emails on your email name@yourdomain.com with your domain name? Yes? Then you need a DNS MX record. You need to specify which server you have is responsible for accepting the incoming emails to your email name@yourdomain.com.

If such a server is not defined, the sender won’t know what to do, and the easiest thing it can do is nothing – not even trying to send the email! This is what will happen in most of the cases.

MX record FAQ

Can the DNS MX record point to an IP address?

No! A MX record should always point to a hostname. It can’t point to an IP address v4 or IPv6.

Can you have multiple MX records?

Yes. You can have multiple MX records for various reasons like redundancy or load balancing, for example. You can have multiple emails servers, and the MX records could have the same priority values or different.

What is a backup MX record?

You can have a backup MX record that points to another server, which should handle your emails in case of failure of the primary email server. It could have a different priority (100 for lowers priority possible), which indicates it should be used only if another MX record cannot be found.

Can I have only MX records without A or AAAA records?

No. You need to set up A or AAAA records that can resolve the hostname to its IP address. The MX record will show the server, but a lookup for its A or AAAA record is required after that.

How to check a DNS MX record?

If you want to use a built-in tool and not install any additional software, you can use the Nslookup command that is available on almost any OS – Windows, macOS, Linux, BSD, and more.

Open the Terminal application if you are using macOS, Linux, or BSD or the Command Prompt (alternative of the Terminal on Windows) on Windows.

Inside the software, you will need to use the following command:

nslookup -query=mx yourdomain.com

or

nslookup -type=mx yourdomain.com

Replace yourdomain.com with the one that you have or the one you want to check.

Conclusion

Now you know everything about the DNS MX record. What it is, and answers to many questions that you might had about the MX record. What’s next? Start using MX records and add them to your DNS zone correctly. 

Leave a Reply

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