Skip to content

MX records and how email finds its way

Updated

When someone sends an email to you@example.com, their mail server asks DNS for the MX (mail exchanger) records of example.com. Each record names a server that accepts mail for the domain, so the domain's web address and its mail can live in completely different places.

Priority

Every MX record has a priority number. The sender tries the lowest number first and moves on to the next only if that server cannot be reached. Records with the same number share the load. Having a second, higher-numbered server gives you a fallback when the first is down.

example.com.   MX   10   mail1.example.net.
example.com.   MX   20   mail2.example.net.

Rules worth knowing

  • An MX record points to a host name, never directly to an IP address
  • That host name should have its own A or AAAA record, and should not be an alias (CNAME)
  • If a domain has no MX records at all, senders fall back to the domain's own address record, which is rarely what you want
  • A single MX record with priority 0 and the target . (a dot) is a null MX: it says the domain accepts no email, and senders stop at once instead of retrying

What goes wrong

Common faults are an MX pointing at a name that does not resolve, a mail server whose address is on a blocklist, and a server with no matching reverse DNS name. The mail server check looks at each of these for you.

Check a domain's mail servers