How MX records work

MX records were defined in RFC 1035. Each record contains a preference number (usually called priority) and the hostname of a mail server:

example.com.  MX  10 mx1.example.com.
example.com.  MX  20 mx2.example.com.

When a server needs to deliver to user@example.com, it follows the process in RFC 5321, Section 5:

  1. Look up the MX records for example.com.
  2. Sort them by priority, lowest first.
  3. Resolve each hostname to its A (IPv4) or AAAA (IPv6) addresses.
  4. Connect on port 25 and attempt delivery, moving to the next host if a connection fails or the server returns a temporary error.

You can see a domain’s MX records with a command such as dig MX example.com or nslookup -type=mx example.com.

Priority, failover, and load balancing

Lower numbers win. In the example above, mail goes to mx1 unless it’s unreachable, in which case senders fall back to mx2. The numbers themselves are arbitrary; only the order matters, so 10 and 20 behave the same as 1 and 2.

Records that share the same priority are treated as equals, and senders choose among them randomly to spread load. Large mailbox providers achieve redundancy either by publishing several MX hosts or by using a single MX hostname that resolves to many servers behind the scenes.

When there is no MX record

A domain without MX records isn’t automatically unable to receive mail. RFC 5321 says that if no MX records exist, the sender should treat the domain’s own A or AAAA record as an “implicit MX” with priority 0. Small or self-hosted domains sometimes rely on this.

If a domain has neither MX nor address records, there is nowhere to deliver and the mail bounces. To state outright that a domain never accepts email, the owner can publish a null MX record as defined in RFC 7505: a single MX with priority 0 and a target of .. Senders that see it should fail delivery immediately instead of attempting a connection. Null MX is common on parked domains and on domains used only for websites.

Why MX records matter for email verification

Checking MX records is the first network step in SMTP email verification. It answers basic questions cheaply, before any SMTP connection is opened:

  • Does the domain exist at all? A domain that returns NXDOMAIN can’t receive mail.
  • Can it receive mail? MX records, an implicit MX, or a null MX answer this.
  • Who hosts it? MX hostnames reveal the provider (Google, Microsoft, a security gateway, or a self-hosted server), which affects how the mailbox check behaves. Some providers and security gateways accept every address, producing catch-all results.

What an MX lookup can’t tell you is whether a specific mailbox exists. A domain with healthy MX records can still reject jane.doe@ because there’s no such user. That’s the job of the SMTP RCPT TO check that follows.

Common MX misconfigurations

  • Pointing MX at an IP address instead of a hostname.
  • Pointing MX at a CNAME, which RFC 2181 disallows and some senders reject.
  • Leftover records from a previous provider after a migration, which send part of your mail to a server that no longer hosts your mailboxes.
  • A backup MX that accepts everything without knowing which users exist. It accepts mail and bounces it later, which creates backscatter.
  • Missing records after a DNS move, which leaves inbound mail with nowhere to go.

Where RocketVerifier helps

The free MX lookup tool shows any domain’s mail servers and priorities. During verification, RocketVerifier handles every case described here: domains with no MX but a valid A or AAAA record are checked through the implicit MX, and domains that publish a null MX are reported as undeliverable with the sub-status does_not_accept_mail. You can run single addresses through the free email verifier or whole lists through bulk email verification.