Says which servers receive email for the domain.
An MX record names a mail server and a preference number. Sending servers try the lowest preference first and move up the list if it fails, so equal numbers share load and higher numbers act as backups.
- Type
- MX
- Code
- 15
- Defined in
- RFC 1035 (null MX: RFC 7505)
- IANA description
- mail exchange
- Field: Preference
- Lower is tried first
- Field: Exchange
- Host name of the mail server; must have A/AAAA records and must not be a CNAME
How it works
Without any MX, senders fall back to the domain’s A or AAAA record (RFC 5321 §5.1). A domain that never receives mail should say so explicitly with a “null MX”: a single MX with preference 0 and the target “.” (RFC 7505).
Example
example.com. 3600 IN MX 10 mail.example.com.
Example uses reserved documentation names and addresses (RFC 2606, RFC 5737, RFC 3849).
Common mistakes
- Pointing MX at an IP address (it must be a name).
- Pointing MX at a CNAME.
- Leaving the old provider’s MX next to the new one after a migration.
How to check yours
To check it, look up MX for the domain and make sure every host listed resolves to an address and accepts mail. After moving to a new provider, remove the old MX records too, or some senders will keep delivering to the old mailbox.
For email
MX controls receiving, not sending; SPF, DKIM and DMARC are what authenticate the mail you send.
Related record types
Sources
Sources
- IANA: Resource Record (RR) TYPEs registry · checked 5 Oct 2026
- RFC 1035 (null MX: RFC 7505) · checked 5 Oct 2026