Skip to content
inetGeek

MX record

MX

An MX record tells other mail servers where to deliver email for your domain, and in what order to try.

Check this on a domain with MX Lookup →

01.

What an MX record does

An MX record pairs a hostname with a priority number. A sending server looks up the MX records for the recipient domain and connects to the hosts it finds, lowest priority number first.

MX records must point at hostnames, not at IP addresses. The named host then needs its own A or AAAA record for delivery to work.

02.

How priority works

Lower numbers are tried first. A domain publishing priority 10 and priority 20 hosts will receive mail at the 10 while it is reachable, and only fall back to the 20 when it is not.

Records may share a priority. Sending servers distribute across equal-priority hosts, which is how providers spread inbound mail across several servers.

The numbers themselves have no meaning beyond their relative order. Using 10 and 20 rather than 1 and 2 is only a convention that leaves room to insert a host between them later.

Which server gets tried first3 MX records

Records

mx1.example.com
mx2.example.com
backup.example.net

A sending server tries, in order

    Illustrative zone. Lower priority is tried first; equal priorities share the load; a host is only skipped when it does not answer.
    03.

    What goes wrong

    No MX records at all means the domain is not configured to receive mail. Some senders fall back to the domain's A record, but this behaviour should not be relied on.

    An MX pointing at a hostname with no address record causes delivery failures, as does an MX pointing at an IP address rather than a name.

    Publishing MX records does not authorise anything to send mail as your domain. That is what SPF, DKIM and DMARC do.

    Related records