Mail exchange record (MX)
A mail exchange (MX) record is a DNS record that identifies servers willing to accept email for a domain.
- Format
- Email & Communication
- Updated
- Updated
Definition
A mail exchange (MX) record is a DNS record that identifies servers willing to accept email for a domain.
How it works
Each MX record names a mail server and a preference number; sending servers try the lowest number first and fall back down the list. This is what lets your email live somewhere entirely different from your website — the MX points at your mail provider while the A record points at your web host.
Example: An MX record for example.com can direct mail to mail.example.net with preference 10.
Often confused: An MX target must be a hostname, never a bare IP address — that hostname then resolves through its own A or AAAA records.
Related terms
Sources
- IETF RFC 1035: Domain Names — Implementation and Specification
- IETF RFC 5321: Simple Mail Transfer Protocol
Last reviewed 2026-07-19.