Skip to content

Scan your domain with 35 DNS and email security checks at zerohook.org.

What is

What is an MX record

An MX record names the mail exchanger that accepts SMTP mail for the domain. RFC 1035 defines the type. RFC 5321 says the sender looks up the MX set and tries the hosts in preference order.

The record

example.com. IN MX 10 mail.example.com.

The preference field is a 16-bit unsigned integer. Lower numbers are more preferred. A host that is named in an MX record must accept SMTP connections on port 25 unless the operator documents otherwise.

What the lookup returns

RFC 5321 describes the sender-side algorithm: look up the MX records for the recipient domain, sort by preference, and attempt delivery. If no MX records exist, RFC 5321 falls back to an address record for the domain name itself.

An MX record's RDATA is a preference number and a domain name. That domain name must itself resolve to address records before SMTP can connect. The MX target is often a hostname under the same organizational domain, but the protocol does not require it.