MX record
An MX record is a DNS record that tells sending mail systems which server accepts email for a domain. “MX” means mail exchanger. If a domain's MX records are missing or point to the wrong service, incoming email may not reach the intended provider even while the website works.
How does an MX record route mail?
When a sender has a message for alex@example.com, its mail system looks up the MX records for example.com. Each record names a mail server and includes a preference number. The sender connects to an appropriate listed server using SMTP, the protocol used to transfer email. The MX record routes mail for the domain; it does not create Alex's mailbox or guarantee delivery.
An MX record has a preference value and a destination host name, such as 10 mail.example.net. The host name is not an IP address. DNS must look up an address for that host name so the sending system can connect.
What does MX priority mean?
When a domain publishes multiple mail exchangers, the preference number helps senders choose among them. Lower values are preferred over higher values. For example, a record with preference 10 is tried before one with preference 20. A higher-numbered server can provide an alternate route, but only if it is configured to accept and handle that domain's mail.
MX records are separate from the website's A or AAAA records. A website can use one host while incoming mail uses another. Some domains explicitly publish a Null MX to say they do not accept email.
Related terms
- DNS record — the general record type
- Mail server — the named host handles email
- MX priority — explains the preference number
- Null MX — explicitly indicates no mail service