An MX (mail exchanger) record tells other mail servers where to deliver email addressed to your domain. Each MX record holds a preference number and the hostname of a mail server. It points at a hostname, never directly at an IP address, and that hostname needs its own A or AAAA DNS record.
How it works
A domain usually has two or more MX records:
example.com. 3600 IN MX 10 mx1.mail.example.net.
example.com. 3600 IN MX 20 mx2.mail.example.net.
A server sending to hello@example.com looks up the MX records for example.com and tries the lowest preference number first. If that server cannot be reached, it moves on to the next. Servers that share a preference number are tried in random order, which spreads the load between them.
A few rules from the mail and DNS specifications:
- The MX target must not be an alias, so it cannot be a name that is itself a CNAME.
- When a domain has no MX record at all, senders fall back to the domain's own A or AAAA record, as if that host were the mail server.
- A domain that accepts no mail can say so with a null MX,
0 ., and senders then give up straight away instead of retrying.
Why it matters
Every message to your addresses depends on these records: replies from customers, invoices, notices from your registrar and your providers. The MX records only cover receiving mail. Whether mail you send is trusted depends on other records, such as SPF, DKIM and DMARC, which affect your email deliverability.
What can go wrong
- After a switch of mail provider, an MX record still points at the old one, and mail lands in a mailbox nobody reads or bounces.
- The MX points at an IP address or a CNAME, which breaks the rules above, and some senders refuse or misroute the mail.
- The MX hostname has no A or AAAA record, so senders cannot connect. They queue the mail and retry, and only after a while does it bounce back, so the outage is noticed late.
Check it
The DNS lookup queries the live DNS of any domain and lists its MX records next to its other records, grouped by type, each with its TTL. Ranetrace's DNS monitoring re-reads your records every hour and tells you when one changes.
Start monitoring today
Websites go down and code throws errors. Ranetrace tells you when it happens to yours, why it matters and what to do next.