Glossary Web & HTTP

MX record

An MX (mail exchanger) record is a DNS record that names the servers that accept email for a domain, with a priority number.

Last reviewed:

AdSense Placeholder
Slot: header_reference_page

In more detail

A sending server looks up the MX records of the recipient's domain and tries the server with the lowest priority number first, falling back to the others if it is down; servers with equal numbers share the load. MX records must point to a hostname, not directly to an IP address, and that hostname must not be a CNAME. If a domain has no MX record at all, senders fall back to its A/AAAA address; a domain that never receives mail can say so with a "null MX", MX 0 . (RFC 7505).

Why it matters

When switching email providers, a wrong or forgotten MX record means mail keeps going to the old provider or bounces. Lowering the TTL a day before the switch shortens the overlap. MX records only route incoming mail; whether outgoing mail is trusted depends on SPF, DKIM and DMARC.

Example

example.com.  3600  IN  MX  10 mx1.example.com.
example.com.  3600  IN  MX  20 mx2.example.com.

Senders deliver to mx1.example.com (priority 10) and use mx2.example.com (priority 20) only when the first cannot be reached. See How DNS Works.

AdSense Placeholder
Slot: footer_leaderboard