Glossary
MX record: where a domain's email goes
An MX record is a DNS entry naming the mail servers that accept email for a domain, with priorities. How resolution works and what a missing MX means.
Updated 2026-11-23
An MX record, for mail exchanger, is a DNS record that names the servers that accept email for a domain. When someone writes to jane@example.com, the sender's server asks DNS for the MX records of example.com and delivers to the server they point to. The record format and its role are set in RFC 1035 and RFC 5321.
How it works
Each MX record has a preference number and a hostname. The sender tries the lowest number first and falls back to higher ones if it cannot connect.
example.com. 3600 IN MX 10 mx1.mailhost.example.
example.com. 3600 IN MX 20 mx2.mailhost.example.
| Field | Meaning |
|---|---|
| Preference | Lower is tried first, equal values share load |
| Exchange | Hostname of the mail server, never an IP address |
| TTL | How long resolvers may cache the answer |
The target must be a hostname with its own address record (A or AAAA). An MX that points to a CNAME is discouraged by RFC 2181 and breaks on some servers.
Special cases:
- No MX record. RFC 5321 says the sender should treat the domain's address record as an implicit MX. Many domains rely on this by accident.
- Null MX. RFC 7505 defines
0 .as an explicit "no mail here". - Hosted mail. Most small domains point MX to a large provider. The hostnames reveal which provider, but they say nothing about whether a mailbox exists.
You can inspect any domain with the MX lookup or the DNS lookup tool.
Why it matters for validation
The MX check is the second step of an email verification, right after syntax. If the domain does not exist or has no usable mail server, no mailbox can exist there, and the address is undeliverable no matter how well it is written.
In the email API, the result is checks.mx: true when MX records exist, false when there are none or a null MX is published, and null when DNS could not be checked. The related reasons are domain_not_found, domain_no_mx, domain_null_mx and dns_error. The last one is not billed and means try again, it does not mean the address is bad.
An MX that exists proves only that the domain takes mail. It does not prove the mailbox exists: that takes an SMTP check. Typos in domains such as gmial.com often have MX records because someone registered them, which is why the API also offers did_you_mean.
Related
Frequently asked questions
What is an MX record?
What does a missing MX record mean?
domain_no_mx. A domain can also publish a null MX to say it accepts nothing.What is a null MX record?
domain_null_mx for these domains.Put this check in your product
Get an API key in under a minute. 100 free credits every month, no card required.
- 100 free credits a month
- No card
- Test keys spend nothing
- Cancel any time