
What Is an MX Record? Mail Exchange DNS Explained
Every email sent to a domain has to be routed somewhere, and DNS is what makes that routing possible. An MX record is the piece of DNS that answers the question "where does this domain's mail actually go?"
What Is an MX Record?
An MX (Mail Exchange) record tells other mail servers which server is responsible for receiving email for a domain. When a mail server needs to deliver a message to someone@example.com, it looks up example.com's MX records first — not its A record — to find the right destination.
An MX record's value has two parts: a priority number and a mail server hostname:
example.com. 3600 IN MX 10 mail.example.com.
Here, 10 is the priority and mail.example.com is the hostname actually running the mail server — which needs its own A or AAAA record, since an MX record points to a hostname, not an IP address directly.
How MX Priority Works
Priority (also called preference) decides the order servers are tried in, and the rule is simple: lower numbers are tried first. A record with priority 10 is attempted before one with priority 20.
example.com. MX 10 mail1.example.com.
example.com. MX 20 mail2.example.com.
A sending server tries mail1.example.com first. If that server is unreachable, it falls back to mail2.example.com. If both are unreachable, most sending servers will queue the message and retry later rather than giving up immediately.
If two MX records share the same priority, they're treated as equally preferred — a sending server can pick between them arbitrarily, which is sometimes used deliberately to spread load across servers of equal capability.
Why Domains Use Multiple MX Records
A single MX record works, but it means a single point of failure: if that one mail server goes down, incoming mail has nowhere to go until it comes back. Adding a second MX record at a higher priority number gives sending servers a fallback destination, so mail delivery is more resilient to any one server being temporarily unreachable. This is standard practice for anything beyond the smallest, lowest-stakes setup.
Example MX Setup
Priority Mail Server
10 mail1.example.com
20 mail2.example.com
This says: try mail1.example.com first; if it's unreachable, try mail2.example.com instead.
Common MX Record Mistakes
- Pointing MX at a hostname with no A/AAAA record. The MX record only names a hostname — if that hostname doesn't resolve to an address, mail delivery fails even though the MX record itself looks correct.
- Leaving stale MX records after switching email providers. Old records left in place (or new ones added incorrectly) can cause mail to route to the wrong place, sometimes silently.
- Confusing MX priority with importance rather than order. A lower number isn't "more important" in some abstract sense — it's simply tried first.
How to Check MX Records
ProURLMonitor's free DNS Records Checker looks up a domain's MX records — along with A, AAAA, TXT, NS, CNAME, and SOA — and parses out the priority and mail server hostname into separate, readable fields rather than showing the raw combined string. This makes it straightforward to confirm mail is routed exactly where you expect, especially after switching email providers. For the rest of the common record types, see our DNS record types overview.
Frequently Asked Questions
What is an MX record?
An MX (Mail Exchange) record tells the internet which mail server(s) are responsible for receiving email on behalf of a domain. When another mail server wants to deliver a message to someone@example.com, it looks up example.com's MX records to find out where to actually send it.
How does MX record priority work?
Each MX record has a numeric priority (sometimes called preference), and lower numbers are tried first. A record with priority 10 is attempted before one with priority 20. If the lowest-priority server is unreachable, the sending mail server falls back to the next one in order.
Why would a domain have multiple MX records?
For redundancy. If a domain has only one mail server and it goes down, incoming mail can be delayed or bounced. A second MX record at a higher priority number acts as a backup, so mail can still be received (or queued) if the primary server is temporarily unreachable.
What happens if two MX records have the same priority?
Sending mail servers are free to pick between them, typically at random or in a round-robin fashion, treating them as equally preferred. This is sometimes used deliberately to spread incoming mail load across more than one server of equal capability.
Does an MX record point to an IP address?
No — an MX record points to a hostname (like mail.example.com), not an IP address directly. That hostname then needs its own A or AAAA record so the sending server can find an actual address to connect to.
What's a common MX record misconfiguration?
Pointing an MX record at a hostname that has no A/AAAA record of its own, or forgetting to update MX records when switching email providers, which can cause mail to silently keep routing to a decommissioned server until the change is noticed.
How do I check a domain's MX records?
Query the domain for its MX records to see every configured mail server and its priority. ProURLMonitor's free DNS Records Checker looks up MX records (along with A, AAAA, TXT, NS, CNAME, and SOA) for any domain, parsing out priority and mail server separately so you don't have to read the raw value yourself.
Try Our Free SEO Tools
Put what you learned into action with our free SEO analysis tools.