MX lookup: find where a domain's email goes
When someone sends you an email, their server first performs an MX lookup on your domain. The MX (mail exchange) records list the servers that accept mail for the domain and a number that sets the order in which senders try them. This tool shows those records so you can confirm a new mail provider is live or diagnose bounced messages.
Priority: lower numbers win
Each MX record has a preference value, usually called priority. Sending servers try the lowest number first and move to higher numbers only if the preferred servers are unreachable. Records with the same number share the load. The numbers are relative: 10 and 20 behave exactly like 1 and 2.
Output lines are sorted by priority, lowest number first, so the line order is the order senders try the servers. A lookup for gmail.com looks like this (TTLs vary):
TYPE TTL VALUE
MX 515 5 gmail-smtp-in.l.google.com
MX 515 10 alt1.gmail-smtp-in.l.google.com
MX 515 20 alt2.gmail-smtp-in.l.google.com
MX 515 30 alt3.gmail-smtp-in.l.google.com
MX 515 40 alt4.gmail-smtp-in.l.google.com
Here gmail-smtp-in.l.google.com has priority 5, making it the primary server, so it is listed first.
Special cases worth knowing
- No MX records at all. Under RFC 5321, senders then fall back to the domain's A or AAAA address. That is rarely what you want, so domains that receive mail should publish MX records explicitly.
- Null MX. A single record with priority 0 and an empty host (written
0 .in the zone) declares that the domain accepts no email at all (RFC 7505). In the output it appears as the number 0 with no hostname. - MX pointing to an IP. The target must be a hostname with its own A or AAAA record. An IP address in an MX record is invalid, and the target should not be a CNAME either.
Troubleshooting checklist
- Confirm every MX host belongs to your current provider; leftover records from an old host can swallow mail.
- Resolve each target with Hostname to IP to make sure it has an address.
- Check the SPF record in TXT Record Lookup, since receiving servers check it against the sending host.
- If you just changed records, allow the old TTL to expire before judging the result.
For every record type in one place, use the full DNS lookup. On the command line, dig example.com MX +short gives the same data.
Privacy
The query runs on our server, not on your device. If you enter an email address, only the domain part is used for the lookup, and the tool does not store what you enter.