MX records explained: priority and null MX
Updated 2026-10-08
MX (mail exchanger) records tell sending servers where to deliver mail for a domain. The delivery rules are in RFC 5321, section 5, and RFC 7505 adds a way to state that a domain accepts no mail.
What an MX record is
An MX record has a 16-bit preference number and an exchange, which is a host name: 10 mail1.example.net.. A domain can have several. The sender looks up the MX records of the recipient's domain, sorts them by preference, and tries the hosts in that order. Lower numbers are tried first. If hosts share the same preference, the sender picks between them in random order, which spreads the load.
The preference numbers have no meaning outside this one domain. Whether you use 10 and 20, or 1 and 2, makes no difference.
Targets must be hosts with addresses
The exchange has to be a host name with an A or AAAA record. Two things do not work:
- An IP address in place of a name. The record syntax carries a domain name only (
MX_TARGET_IS_IP). - A name that has no address records (
MX_TARGET_UNRESOLVABLE). Senders skip such a host, and if all hosts are unusable, mail is delayed or bounced.
The host should also not be an alias (CNAME), which RFC 2181 section 10.3 forbids for MX targets. The MX lookup has no separate finding for that case; it resolves the targets and shows the addresses it found. The tool resolves at most ten hosts per domain.
No MX record: the implicit MX
If a domain has no MX records at all, RFC 5321 section 5.1 tells the sender to treat the domain itself as the mail exchanger, using its A or AAAA records, as if there were an MX with preference 0. This is a compatibility rule from before MX records existed. It is rarely what you want. A web server at the same name would start receiving mail connections. MX_NOT_FOUND is reported when the domain has no MX records.
Null MX
RFC 7505 defines the null MX, a single record with preference 0 and the root as exchange: 0 .. It states that the domain accepts no mail. Servers that follow the RFC stop at once and return an error, instead of falling back to the implicit MX or retrying for days. A domain with a null MX must not have other MX records. The check reports the null MX as information (MX_NULL) and a null MX next to other records as an error (MX_NULL_WITH_OTHERS).
RFC 7505 section 4.2 says a null MX is meant for domains that neither send nor receive mail, and should not be published for a domain that is used in MAIL FROM or From addresses. To declare that a domain sends no mail, the RFC points to an SPF record of v=spf1 -all. See SPF explained and DMARC explained.
Backup exchangers
A record with a higher preference number is a fallback that is used when the primary is not reachable. A backup host has to accept and filter mail with the same rules as the primary. Some senders, spam sources among them, deliver to the backup on purpose to avoid the primary's filtering. If you cannot keep the backup as strict as the primary, you are better off without it, because senders already queue and retry for a number of days when the primary is down.
Common mistakes
- MX records that point to a name that was removed or never existed.
- A target in a zone that is slow or unreliable, so the lookup times out.
- Changing providers and leaving the old records in place, so mail is split between two systems.
- A null MX combined with other records.
Use the MX lookup to see the records, preferences and resolved addresses of a domain, or the mail check for MX with SPF, DMARC and DKIM in one report.
MX findings
- Warning
MX_NOT_FOUNDThe domain has no MX records. - Info
MX_NULLThe domain publishes a null MX and does not accept mail. - Error
MX_NULL_WITH_OTHERSA null MX is published together with other MX records. - Error
MX_TARGET_IS_IPAn MX record points to an IP address instead of a host name. - Error
MX_TARGET_UNRESOLVABLEAn MX host has no A or AAAA records.
Frequently asked questions
What happens if a domain has no MX record?
A sending server falls back to the domain's own A or AAAA record and tries to deliver there, as an implicit MX with preference 0 (RFC 5321 section 5.1). If that also does not exist, delivery fails. When a domain has no MX records, the MX lookup notes that mail would fall back to the domain's own address records. It does not check whether those address records exist.
Which MX record is used first?
The one with the lowest preference number. Hosts with the same number are equally preferred and the sender chooses between them in random order. Higher numbers are only tried when the lower ones cannot be reached.
How do I say that a domain does not receive email?
Publish a single null MX record, 0 ., as described in RFC 7505. Senders then fail immediately instead of retrying for days. It must not be combined with other MX records.
Can an MX record point to an IP address?
No. The target must be a host name that has address records. The MX lookup reports a target that is an IP address as MX_TARGET_IS_IP.