DNS MX Record

DNS MX Record

DNS MX Record Definition

A DNS MX (Mail Exchange) record tells email servers where to deliver messages for a domain. When you email someone, your mail server uses DNS to look up the recipient’s MX record. The MX record tells your mail server where to send your message via SMTP (Simple Mail Transfer Protocol), which is the standard protocol for sending emails over the internet. MX records are important, whether you host your email or lease it from a hosted provider like Zoho or Google Workspace—without them, the server may not always deliver your message to the right place.

A simple way to understand MX records is to use the mailroom analogy. Think of your domain as an office building and of your mail server as the building’s mailroom. An MX record acts like a note at the entrance, telling mail carriers where the mailroom is so they know where to deliver incoming mail.

DNS MX Record Example

The easiest way to understand how MX records work is to look at a common MX record example and see what each record component does.

Domain NameRecord TypePriorityMail ServerTTL
example.comMX10mail1.example.com86400
example.comMX20mail2.example.com86400

Here’s what each record component means:

How Do DNS MX Records Work?

This is what happens in the background when you send an email:

  1. The MTA (Message Transfer Agent) responsible for transferring emails sends a DNS query to the MX record for the receiver’s domain.
  2. The MX record tells the MTA which mail servers handle incoming emails for the domain.
  3. The MTA then establishes an SMTP connection to the domain’s mail servers, prioritizing the server with the lowest value.
  4. Finally, your email reaches the recipient.

What Is a Backup DNS MX Record?

An MX record backup is a mail server with a higher priority value, which means MTAs don’t prioritize it. The backup server automatically handles email delivery if the primary server stops running.

In our example, mail1.example.com, with a priority of 10, is the primary mail server. mail2.example.com, with a priority of 20, is the backup.

DNS MX Record vs Other DNS Records

MX records are part of DNS, alongside other records:

DNS Record TypeDNS Record Purpose
MX recordSends mail to the right mail servers.
A recordContains the IPv4 address for a domain.
AAAA recordHolds the IPv6 address for a domain.
CNAME recordMaps one domain name to another.
TXT recordLets domain administrators store text notes in the record, usually for email security.
NS recordIncludes the name server associated with a DNS entry.
SOA recordStores important information about a domain, like admin email addresses.
SRV recordSpecifies a host and port for specific services, like instant messaging.
PTRProvides the domain name associated with an IP address.

Common DNS MX Record Issues

Here are various MX record issues that could cause delays or emails to bounce:

Read More

FAQ

An MX record tells email servers where to send emails for a domain using SMTP (Simple Mail Transfer Protocol). Basically, when you send an email, your mail server queries the recipient’s MX record to learn which mail servers receive incoming messages.

An MX record’s priority order determines which mail server receives your emails first. The lowest number represents the highest priority. So, a mail server with a value of 10 has higher priority than a server with a value of 20.

If an MX record is missing, your email won’t reach the recipient. The MX record tells your mail server’s MTA (Message Transfer Agent) which mail server receives emails for the recipient’s domain.

You should assign the lowest priority value to your main mail server to make sure it receives all emails first. If you have two mail servers, the main one should have a priority value of 0. The second server acts as the backup, so it should have a value of 10.

No, an MX record won’t store an IP address. Instead, it stores a domain name that points to a hostname, which is the readable name for a server or device. The hostname then resolves to an IP address via an A or AAAA record. If an MX record contains an IP address, most mail servers will ignore or reject it because they don’t see it as a valid hostname.

×

Time to Step up Your Digital Protection

The 2-Year Plan Is Now
Available for only /mo

undefined 45-Day Money-Back Guarantee