One of the most important DNS records to understand and know is the MX record. Any activity you want to perform that involves domains requires DNS records. So, let’s look at what it’s for and why it’s necessary.
What is a DNS MX record?
The DNS MX record (Mail Exchanger) is a DNS resource record that identifies a host by its hostname and accepts incoming emails for a specific domain name. It creates a connection between the domain name and the inbound mail server.
The structure of the MX record
The next point of our article is to look at the structure of this record. For example, if you own the domain name domainexample.com, you can configure the MX record with the following settings:
- TYPE: MX record
- HOST: domainexample.com
- POINTS TO: mail.domainexample.com – hostname of your receiving email server
- TTL: 1m – Time to live value
- PRIORITY: 15 – The number indicates the importance of the mail. The lower the number, the higher the priority.
How does it work?
To understand how it works, we will use the example from above. Let’s get started.
Step one: A user on the outbound email server is trying to send an email to email@example.com. The outgoing mail server will see the domain name, in this case, domain.com, and query it to find out exactly where its name servers are.
Step two: domain.com responds with one or more MX records that indicate which servers can receive an email for domain.com (e.g., contact.domain.com, emailcontact.domain.com, etc.).
Step three: The sender receives the MX records, sees the host or hosts responsible for receiving emails, and requests to obtain the IP address or addresses of the servers. When he gets the IP (e.g., 220.127.116.11), he can send the email to firstname.lastname@example.org.
How to check it?
If you want to check your MX record, it’s simple to do. You can accomplish it in various ways, including through a website. Another option is to use a command.
- On Windows
Open the Command Prompt window. Click on the Windows Start button on your left, then type “cmd” into the search box. Select it by clicking on it.
Type the following command into the Command Prompt and hit Enter:
nslookup -query=mx domainexample.com
*Note that you have to change the domainexample.com with the domain you are looking for.
- On macOS and Linux
Open the Terminal application. Then you’ll need to type the following command within it. It’s crucial to remember that you start it by pressing enter:
dig domainexample.com MX
*Remember that you have to change the domainexample.com with the domain you want to check.
In conclusion, we can say that the MX record is an essential part of the Domain Name System. You can now safely say that you know and understand the MX record well. What comes next? Start using MX records and properly adding them to your DNS zone.