DNS MX record explained

The domain name system (DNS) always has something in store for us to learn. From its architecture to its functionality, different components, and records. And exactly today, it is the turn of DNS MX recorded to be explained.

What is the DNS MX record?

MX stands for mail eXchange record. DNS records are vital for giving instructions for different DNS processes to happen. A DNS mail exchange record (MX) is a resource record that the domain name system uses to point correctly to the exact name of the incoming e-mail server where e-mails have to be sent. Yes, you got it! MX record indicates the responsible server that has to get the e-mails sent to a determined domain.

Why do you need MX record?

Have you ever thought about how many e-mails are sent daily through the Internet? It takes different steps from the sending to the proper delivery. But let’s focus on the last part. Once the mailman is in your place (domain), a mailbox is needed for him to put the letter. Without a place to safely concentrate all messages you receive, it could go messy. You could lose some, your neighbor’s dog could bite others, rain could ruin them, etc. 

How does it work?

DNS mail exchange (MX) record holds the machine’s hostname in charge of managing domains’ e-mails and a code for prioritization.

Plenty of electronic messages can be sent to you from different locations and sources. Through MX records, servers that are in charge of receiving your messages will be indicated. All messages sent to you will be routed to those servers. 

When MX records are not well configured for indicating the correct receiving servers, simply you won’t get electronic messages.

MX records work closely to Address (A) records, the ones that map a domain name to the IP address version 4 of the machine that is actually hosting that domain. An A record translates domain names into IP addresses.

The way to route e-mails is using IP addresses, and such are set on host’s A records.

Now think it in the way back. When you create an e-mail, sending it to a recipient address, your device needs a key datum: the server where recipient’s e-mail is hosted. What your device does to get that is to look for the DNS MX record at the nameserver holding information for the domain to which your recipient’s address belongs. Once the device gets the MX record, it reads it and then, it can send the message you typed to the correct server.

DNS MX record content

These are the elements an MX record has.

Type (or record): MX

Host: meaning the domain name.

Priority: through a number, from 0 (zero) to 65535, it is established the e-mail’s priority or importance. Priority is read this way: the lower the number is the higher priority.

Points to: the specific server that is in charge of receiving the domain’s e-mails.

Time to live (TTL): the time the DNS MX record will be valid or saved in the cache memory. 

How does a backup MX record work?

It is common to use MX records for a backup purpose. This means something simple: you have a higher priority e-mail server, so it has been set up a lower priority value. And another with lower importance but higher priority value. When everything is working normally, e-mails must go to the higher priority e-mail server. But if something goes wrong and that server is not available, the backup e-mail server can do the job.

DNS CNAME record explained


DNS records have very specific tasks, and all of them play an important function for the DNS to operate without problems. In this case, without using DNS MX records, you could not receive e-mails efficiently and accurately.

Leave a Reply

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