Mail

MX record

The DNS record that names the servers which accept mail for a domain, in order of preference.


When a server has mail for someone@example.lu, it asks DNS for the MX records of example.lu. Each record names a host and a priority number; the sender tries the lowest number first and moves to the next if that host does not answer.

The host in an MX record must be a name with an A or AAAA record, not an IP address and not a CNAME. A domain with no MX record falls back to its own A record, which rarely does what you want. A domain that should receive no mail at all can say so with a single record pointing at . (the "null MX").

Changing MX records moves inbound mail to another provider; it does not change where your outgoing mail comes from, which is what SPF and DKIM describe. Keep the old server running for a day or two after a change, because other servers cache the old record until its TTL expires.

Mail DNS check