MX record lookup
Enter a domain to see the mail servers that accept its email and the priority of each. The result compares four public resolvers with the domain's own nameserver, which helps when you are moving email to a new provider.
What an MX record is
An MX (mail exchange) record tells other mail servers where to deliver email for your domain. Each record has two parts: a preference number and the hostname of a mail server. A sending server collects all the MX records, sorts them by number, and tries the lowest first. Higher numbers are fallbacks for when the preferred server does not answer, and records with the same number share the load (RFC 5321).
The target of an MX record must be a hostname that has its own A or AAAA record. It cannot be an IP address, and RFC 2181 says it must not be a CNAME alias. If a domain has no MX records at all, senders fall back to delivering to the domain's own address. A domain that should never receive mail can publish a null MX, a single record of 0 with the target "." (RFC 7505). MX only covers incoming mail. Which servers may send as your domain is controlled separately by SPF, in a TXT record.
Example MX records
example.com. 3600 IN MX 1 smtp.google.com.All mail goes to one Google Workspace hostname, the single-record setup Google gives to newer accounts.
example.com. 3600 IN MX 10 mx1.mail-provider.net. example.com. 3600 IN MX 20 mx2.mail-provider.net.Senders try mx1 first and only use mx2 when mx1 does not answer.
example.com. 3600 IN MX 0 .A null MX: the domain states that it accepts no email, so senders reject messages right away instead of retrying.
How to read your result
- Priority, then hostname
- Each record appears as a number followed by a mail server, such as 10 mx1.mail-provider.net. The lowest number is tried first. Only the order matters, so 1 and 5 behave exactly like 10 and 50.
- Old and new providers mixed
- During an email migration, some resolvers may still show the old provider's hosts while others show the new ones. Until those caches expire, senders may deliver to either provider, so keep the old mailboxes working and check them until every row matches the source of truth.
- No MX records
- If the source of truth also has no MX, the domain has no mail routing set up, and senders will try the domain's A record instead, which usually fails. Make sure you entered the bare domain (example.com), not a mail hostname such as mail.example.com.
- Check every hostname, not just the count
- A typo in a hostname still produces a valid-looking MX record, but mail sent to it bounces. Compare each host, letter for letter, with your email provider's setup page.
Common MX record problems
- Leftover MX records from the old provider
- If you add the new provider's records without deleting the old ones, senders treat them as a single list. Mail goes to whichever server has the lowest number and answers, so some messages end up at the old provider. Delete every MX record that is not in your new provider's instructions.
- MX pointing to an IP address
- A value like 10 192.0.2.25 is invalid, because the target must be a hostname. Create an A record such as mail.example.com for that IP and point the MX at mail.example.com.
- MX pointing to a CNAME
- The standards say an MX target must not be an alias. Many senders follow it anyway, but some do not, so mail fails unpredictably. Point the MX at the real hostname of the mail server, the one that has A or AAAA records.
- Target hostname with no address
- An MX pointing to mail.example.com does nothing if mail.example.com has no A or AAAA record. Senders queue the mail and retry, and it bounces once they give up. Run an A lookup on each MX hostname to confirm it resolves.
- Record added at the wrong name
- Control panels often add your domain to whatever you type in the host field, so entering example.com creates the record at example.com.example.com. For the bare domain, use @ or leave the field empty, as your panel's help page describes.
Other record lookups
Frequently asked questions
How do I check the MX records for a domain?
Enter the domain above with MX selected. You will see each mail server and its priority as four public resolvers and the domain's own nameserver report them, plus the TTL that controls how long changes take to spread.
What does MX priority mean?
It is a preference number, and lower means more preferred. Senders try the lowest-numbered server first and move to higher numbers only if it fails. Servers with equal numbers receive mail in roughly equal shares.
Will I lose email while MX records are changing?
Usually not. Mail that reaches the old provider is delivered there, so keep that account open until the change is complete. When a server cannot be reached, senders queue the message and retry, and RFC 5321 suggests they keep trying for at least four to five days.
Can an MX record point to an IP address?
No. The target must be a hostname that has its own A or AAAA record. Create a hostname for the mail server's IP and point the MX record at that name.
Do I need MX records if my domain does not use email?
You can publish a null MX (priority 0, target ".") to state clearly that the domain receives no mail. Pair it with an SPF record of v=spf1 -all so receivers also reject mail that claims to come from your domain.