What MX records are
MX (mail exchanger) records tell other mail servers where to deliver email for your domain. Each one has a preference number and a hostname, for example example.com. MX 10 mx1.example.com. and example.com. MX 20 mx2.example.com..
Senders try the lowest number first and fall back to higher numbers when it is unreachable. Records with the same number share the load.
The target must be a hostname with its own A or AAAA record. It cannot be an IP address, and RFC 2181 says it must not be a CNAME.
How to read your MX lookup results
This tool lists every MX record in priority order, preference first. When a hostname matches a known provider, it names it: aspmx.l.google.com is Google Workspace and hosts under mail.protection.outlook.com are Microsoft 365.
Findings note records that share a preference (load balancing, not an error), a null MX and a missing MX. If a security gateway filters your inbound mail, its hostnames appear here instead of your mailbox provider’s.
The inbound provider is often, though not always, the one that sends your mail. That tells you which SPF include and DKIM selector to expect. Check them with the SPF checker and DKIM checker.
Common MX record problems and how to fix them
No MX records. Under RFC 5321, senders then try the domain’s A or AAAA record as an implicit MX. That address is rarely a mail server, so mail is retried and then bounces. Publish MX records if the domain receives mail, or a null MX if it does not.
MX points to an IP address or a CNAME. Point it at a hostname that has an A or AAAA record directly.
Old records left after a migration. A leftover MX from your previous provider sends part of your mail to a mailbox nobody reads, or it bounces. Remove every old record once the cutover is done, and lower the TTL a day before you switch so the change takes effect quickly.
Doubled domain name. Many DNS panels append the domain to the value, so mx1.example.com without a trailing dot can become mx1.example.com.example.com. Add the trailing dot or follow your panel’s format.
Null MX for domains that do not receive mail
A domain that never receives email should publish a null MX (RFC 7505): a single record MX 0 .. Senders then fail immediately instead of retrying for days.
Pair it with v=spf1 -all and a DMARC record of v=DMARC1; p=reject so the domain cannot be used to send spoofed mail either. The DMARC generator builds that record.
How MX relates to DMARC, SPF and MTA-STS
MX records control mail you receive, while SPF, DKIM and DMARC authenticate mail you send. They still connect in a few places. The domain in your DMARC rua address needs working MX records, or the reports have nowhere to go.
The SPF mx mechanism authorizes your MX hosts to send mail. It only helps if those hosts actually send outbound mail, and it costs DNS lookups toward the limit of 10.
An MTA-STS policy lists your MX hosts in mx lines. Every host must match, or senders that enforce the policy refuse to deliver. Check yours with the MTA-STS checker, or run the full email security report.
Frequently asked questions
How do I check the MX records for a domain?
Enter the domain in this MX lookup tool. It lists each mail server with its priority and names the provider when it recognizes the hostname. From a terminal, dig MX example.com or nslookup -type=MX example.com returns the same records.
What does MX priority mean?
The priority (preference) number sets the order in which senders try your mail servers. The lowest number is tried first, and higher numbers are fallbacks. Servers with the same number share incoming mail.
Can an MX record point to an IP address?
No. An MX record must point to a hostname, and that hostname needs its own A or AAAA record. It also must not be a CNAME.
What happens if a domain has no MX record?
Senders fall back to the domain’s A or AAAA record and try to deliver there, as RFC 5321 describes. If that address does not run a mail server, mail is retried and eventually bounces. Domains that never receive mail should publish a null MX instead.
What is a null MX record?
A null MX (RFC 7505) is a single MX record with priority 0 and a target of .. It states that the domain accepts no email, so senders fail right away instead of retrying.
How long do MX record changes take?
Resolvers keep the old record until its TTL expires, which can be minutes or a day depending on the value. Lower the TTL a day before a migration, make the change, then raise it again once mail flows to the new servers.