Definition

A mail exchange (MX) record is a type of Domain Name System (DNS) record that specifies the mail servers that handle incoming email messages.

Essentially, an MX record indicates the IP addresses of a specific mail server’s domain to enable emails to reach their intended mail server.

Moreover, an MX record can differentiate emails and web servers, making it ideal for people who host or lease their emails. It is based on the simple mail transfer protocol (STMP), a standard email protocol that almost all emails use.

Mail Exchange Record Examples

Assume you want to send an email to [email protected]. Your mail server would search for the MX records for instance.com, which would appear like:

This instructs your email server to send the email to either mail1.instance.com or mail2.instance.com, but it should prioritize mail1.instance.com because it has a higher preference value.

The domain administrator manages these records via a control panel offered by the DNS provider or domain registrar. Additionally, the MX record must be correct and up-to-date to ensure emails are correctly delivered.

How Do MX Records Work?

When an email is transmitted from one email server to another, the sending server checks the DNS system to identify the MX record for the recipient’s domain.

Then, the MX record presents the IP address of the mail server that receives the email. The sending email server then links with the IP addresses to deliver the email message.

How to Find Your MX Record

You can use a command-line tool (like nslookup) or a DNS lookup tool to find your MX record. Just input your domain name and ask for the MX record. The result shows the hostname of the email server that receives email for your domain and their priority values.

Advantages of using MX record