example.com. 3600 IN MX 10 mx1.example.com.
An MX record (mail exchanger) tells sending mail servers which hosts accept email for a domain. Each record has a preference number and a hostname; lower numbers are tried first.
Priorities
10 mx1.example.com and 20 mx2.example.com mean “use mx1, fall back to mx2”. Records with equal preference share the load.
Requirements
- The target must be a hostname with A/AAAA records — never an IP address and never a CNAME.
- If a domain has no MX record, senders fall back to its A/AAAA record. To declare that a domain never receives mail, publish a null MX:
0 .(RFC 7505).
Related records
Email deliverability also depends on TXT records for SPF, DKIM and DMARC, and on a matching PTR record for the sending server’s IP address.
Frequently asked questions
- Can an MX record point to an IP address?
- No. It must point to a hostname, which in turn has A or AAAA records.
- What does an MX record of '0 .' mean?
- It's a null MX (RFC 7505): the domain explicitly does not accept email, so senders fail fast instead of retrying.