What is an MX Record? A Simple Guide to Mail Exchanger Records

Learn what MX records are, how they direct email to your mail servers, and why they're essential for receiving email at your domain.

When someone sends an email to your domain, how does it know where to go? The answer is MX records. These small but critical DNS entries tell the internet where to deliver email for your domain.

If you've ever set up email for a custom domain or troubleshot delivery issues, you've likely encountered MX records. This guide explains what they are, how they work, and why they matter for your email.

What MX Records Do

MX stands for Mail Exchanger. An MX record is a type of DNS record that specifies which mail servers are responsible for receiving email on behalf of your domain.

Think of it like a forwarding address. When someone sends mail to you@yourdomain.com, email servers look up your domain's MX records to find out where to deliver the message. Without MX records, email sent to your domain would have nowhere to go.

Every domain that receives email needs at least one MX record. Most domains have multiple MX records pointing to different servers for redundancy.

How MX Records Work

When an email is sent to your domain, here's what happens:

  1. The sending mail server extracts the domain from the recipient's email address
  2. It queries DNS for the MX records of that domain
  3. DNS returns a list of mail servers and their priorities
  4. The sending server attempts delivery to the highest priority server first
  5. If that fails, it tries the next server in priority order

This process happens in milliseconds, completely invisible to the sender and recipient. But if your MX records are missing or misconfigured, email simply won't arrive.

MX Record Structure

An MX record has two main parts: a priority value and a hostname.

Priority is a number that indicates preference. Lower numbers mean higher priority. When multiple MX records exist, mail servers try the lowest priority number first.

Hostname is the fully qualified domain name of the mail server. This is where email should be delivered.

Here's what MX records look like in practice:

PriorityMail ServerPurpose
10mail1.example.comPrimary server
20mail2.example.comBackup server
30mail3.example.comTertiary backup

In this example, email would first try mail1.example.com. If that server is unavailable, it would try mail2.example.com, then mail3.example.com.

Why Priority Matters

Priority values create a hierarchy for mail delivery. This is important for several reasons.

Redundancy: If your primary mail server goes down, email doesn't bounce. It gets delivered to your backup servers instead.

Load balancing: Some organizations use equal priorities to distribute email across multiple servers. If two servers have the same priority, sending servers randomly choose between them.

Failover: During maintenance or outages, you can adjust priorities to route mail away from affected servers without changing your entire email infrastructure.

Common priority values

Most organizations use increments of 10 (10, 20, 30) for priorities. This leaves room to insert new servers between existing ones without renumbering everything.

MX Records vs Other DNS Records

MX records are just one type of DNS record. Understanding how they differ from others helps clarify their specific purpose.

A records map a domain name to an IP address. They tell browsers where to find your website.

CNAME records create aliases, pointing one domain name to another.

MX records specifically handle email routing. They point to the hostnames of mail servers, not IP addresses directly. The mail server hostname then has its own A record that resolves to an IP.

SPF, DKIM, and DMARC records are related to email but serve different purposes. These records handle email authentication and security, while MX records handle delivery routing. You can check your SPF configuration at spfrecordcheck.com.

Common MX Record Configurations

Different email providers have different MX record requirements.

Google Workspace uses multiple MX records with specific hostnames like aspmx.l.google.com. Google provides five MX records with varying priorities for redundancy.

Microsoft 365 typically uses a single MX record pointing to your tenant's mail server, something like yourdomain-com.mail.protection.outlook.com.

Self-hosted email servers use MX records pointing to your own mail server's hostname. You're responsible for setting up the appropriate redundancy.

Email forwarding services have their own MX records that receive email and forward it to another address.

Why MX Records Matter for Deliverability

Misconfigured MX records cause real problems:

Missing MX records mean email to your domain bounces immediately. Senders receive an error that the domain doesn't accept email.

Incorrect hostnames point to servers that don't exist or don't accept mail for your domain. Email either bounces or disappears.

Wrong priorities might route all email to a backup server while your primary sits idle, or worse, to an old server that's no longer maintained.

Stale records after switching email providers leave you with MX records pointing to your old provider. Some email might still arrive there instead of your new system.

Checking Your MX Records

You should verify your MX records whenever you:

  • Set up email for a new domain
  • Switch email providers
  • Experience email delivery issues
  • Make changes to your DNS configuration

Our MX lookup tool shows you exactly what MX records exist for any domain. You can see the priority values and mail server hostnames.

Regular monitoring catches problems before they affect email delivery. A server that was working yesterday might be unreachable today.

Monitor Your MX Records

Checking once is good. Monitoring continuously is better. The Email Deliverability Suite watches your SPF, DKIM, DMARC, and MX records daily and alerts you when something breaks.

Never miss an MX issue

Monitor your SPF, DKIM, DMARC and MX records daily. Get alerts when something breaks.

Start Monitoring