MX record

An MX record tells sending mail servers which hosts accept email for a domain, with a priority number for each one.

What an MX record is

A mail exchanger record is the DNS entry that answers "where do I deliver email for this domain?" When a server has a message for someone@example.com, it asks DNS for the MX records of example.com and receives one or more hostnames, each with a preference number. Lower numbers are tried first; equal numbers are used in rotation. A typical set looks like:

example.com.  3600  IN  MX  10 mail1.example.com.
example.com.  3600  IN  MX  20 mail2.example.com.

The sending server then resolves mail1.example.com to an address and connects on port 25. If that fails, it tries mail2. If a domain has no MX records at all, senders fall back to the domain's own A or AAAA record, which is rarely what the owner intends.

Why it matters

MX records are the first thing to check when email to a domain is bouncing, when a migration to a new mail provider seems incomplete, or when a domain's setup is being audited. A record that points to a hostname with no address, a priority order that sends mail to a backup first, or a stale entry for a provider the domain no longer uses are all common and all visible in a single lookup.

MX records also matter for deliverability in the other direction. Receivers expect a sending domain to be capable of receiving replies, and some check that an MX exists before accepting mail from it. The companion records, SPF, DKIM, and DMARC, control whether mail from the domain is trusted; MX controls where mail to it goes.

How to check

Use the DNS lookup tool with the record type set to MX. The result shows each exchanger, its priority, and the TTL. Follow up by looking up the A record of each exchanger and checking its reverse DNS, and run the blacklist check on the exchanger's address if the domain's outgoing mail is being rejected. The email header analyzer shows which servers actually handled a message, which is the fastest way to confirm that the MX records are being used as intended.

Common misconceptions

An MX record must point to a hostname, never directly to an IP address; a record written with an address is invalid even though some resolvers tolerate it. And the priority values have no absolute meaning; 0 and 10 behave exactly like 10 and 20.

Sponsored · advertise here