Routing Mail by Domain
Email addresses end in a domain, but mail does not go to a bare domain. The sending server queries DNS for the domain's MX record (mail exchanger) to learn which host accepts mail for it.
What an MX Record Holds
- A priority number, where a lower value is preferred.
- A hostname that itself resolves to an address through an A or AAAA record.
- Multiple MX records for redundancy across mail servers.
Choosing a Server
When several MX records exist, the sender tries the lowest priority first. If that host is unreachable, it falls back to the next. Equal priorities allow simple load spreading. If no MX record exists, some senders fall back to the domain's A record, but relying on that is fragile.
Key idea
An MX record tells a sending server which host accepts mail for a domain, with priority numbers ordering preference and providing backup paths.