DNS tools
MX Lookup
Find mail exchange servers and their priorities for a domain.
What is mx lookup?
MX records tell sending mail servers where to deliver mail for a domain.
How to use this tool
- Enter the domain you want to check and review any options.
- Select Look up to submit your request.
- Read the result, inspect its source and copy or download the response if needed.
Understanding the results
- Exchange
- The hostname of a mail server that accepts email for the domain.
- Priority
- Senders try the lowest number first. Servers with the same number share the load.
- No records returned
- Without MX records, senders try the domain’s own A or AAAA address. A single MX record pointing to "." (a null MX) means the domain accepts no email at all.
Supported features and common uses
Lower priority numbers are preferred. A null MX record indicates a domain does not accept email. This query does not send email or test mailbox existence.
Troubleshooting
Check the input format if validation fails. Public data may be missing or redacted, and upstream services can time out or rate limit requests. A failed lookup is not proof that a domain or website is unavailable.
How email finds a domain’s mail server
When someone sends a message to you@example.com, their mail server looks up the MX records for example.com. Each record names a mail server and gives it a preference number. The sender connects to the server with the lowest number first. If that server does not answer, the sender moves to the next one.
An MX record holds a hostname, never an IP address. The sender then looks up that hostname’s A or AAAA record to get an address it can connect to. A working mail setup therefore depends on two lookups succeeding, and a typo in either one stops delivery.
How priority numbers work
The number in front of each mail server is called the preference. Only the order matters, so 10 and 20 behave the same as 1 and 2. Many providers leave gaps so that a server can be added between two others later without renumbering.
Two servers with the same number are treated as equals, and senders pick between them at random. Providers use this to share incoming mail across several machines. A server with a higher number is a backup that receives mail only when the preferred servers cannot be reached.
What typical MX records look like
Hosted email services publish records you can recognize. Google Workspace domains point to smtp.google.com, or to a set of hosts ending in aspmx.l.google.com on older setups. Microsoft 365 domains point to a name ending in mail.protection.outlook.com. Seeing one of these tells you which provider handles the domain’s incoming mail, even when the website is hosted somewhere else.
A domain that runs its own mail usually has one or two records that name its own servers, such as mail.example.com.
Rules an MX record must follow
- The target must be a hostname that has its own A or AAAA record.
- The target must not be a CNAME alias. Some servers tolerate one, but the standard forbids it and delivery becomes unreliable.
- The target must not be an IP address.
- A domain that accepts no email should publish a single record with preference 0 and a target of "." so that senders give up at once.
Breaking one of these rules rarely produces a clear error. Mail arrives from some senders and not from others, which makes the cause hard to spot until you look at the records.
Changing mail providers safely
Before a move, lower the TTL on the existing MX records so the change takes effect quickly. Add the new provider’s records, remove the old ones and run this lookup to confirm the result. Keep the old mailboxes active for a day or two, because senders that cached the old records keep delivering there until their cache expires.
Update the SPF record at the same time. The new provider sends mail from different servers, and messages can fail authentication if SPF still lists only the old ones.
What an MX lookup does not tell you
This tool reads DNS. It does not connect to the mail servers, so it cannot tell you whether they are running, whether they accept mail for a particular address or whether a mailbox is full. A domain can have correct MX records and still reject messages because of spam filtering or failed authentication. For those problems, read the bounce message the sender received and check the domain with the SPF and DMARC checkers.
A worked example
Look up gmail.com. The answer lists five mail servers. The first, gmail-smtp-in.l.google.com, has preference 5, and four alternates follow with preferences 10, 20, 30 and 40. A sending server tries the one with preference 5 first. If it cannot connect, it works through the alternates in order.
A small business domain looks simpler. A single record with one hostname is common when a hosted provider handles the mail, because the provider runs that one name on many machines.
Checks to run alongside an MX lookup
- The SPF checker, to see which servers may send mail for the domain.
- The DMARC checker, to see what receivers are asked to do with mail that fails authentication.
- A DNS lookup of the mail server’s hostname, to confirm that it has an A or AAAA record.
- A reverse DNS lookup of the mail server’s address, since many receivers expect a matching PTR record.
Together these four cover most of what DNS can tell you about a domain’s email setup.
Terms used on this page
- MX record: a DNS record that names a mail server for a domain.
- Preference or priority: the number that sets the order in which servers are tried.
- Null MX: a single record pointing to "." that declares the domain accepts no mail.
- Mail exchanger: the server named in an MX record.
- Bounce: a message returned to the sender because it could not be delivered.
Learn more: DNS record types explained: A, AAAA, MX, TXT, CNAME and more.
Frequently asked questions
Good questions. Clear answers.What does MX priority mean?
Mail delivery normally tries servers with the lowest preference number first.
Does an MX record prove email works?
No. Authentication policies, server availability and mailbox configuration also affect delivery.
Can a domain receive email without an MX record?
Yes. When no MX record exists, senders fall back to the domain’s A or AAAA record and try to deliver there. Relying on this is fragile, so publish MX records for any domain that should receive mail.
How many MX records should a domain have?
One is enough when the provider runs it on redundant infrastructure, as the large hosted services do. If you run your own server, a second record that points to a backup avoids bounced mail during an outage.
Can an MX record point to an IP address?
No. The value must be a hostname. Point the MX record to a name such as mail.example.com and give that name an A or AAAA record.
Why do the records show a different company from my web host?
Email and web hosting are separate services. Many domains keep their website with one company and their mailboxes with another, and the MX records follow the mail.
How long does an MX change take?
Senders pick up the new records as their cached copies expire, which depends on the TTL of the old records. Allow up to the old TTL, often an hour to a day.
What is a backup MX?
A mail server with a higher preference number that accepts mail when the main server is unreachable and passes it on later. Spammers often target backup servers because their filtering tends to be weaker, so run one only if you maintain it properly.
Do MX records affect sending email?
No. MX records control where incoming mail is delivered. Outgoing mail is checked against SPF, DKIM and DMARC records.
Why does the lookup return no records for a domain that receives email?
Check the spelling and try again, since a temporary DNS failure can return an empty answer. If it stays empty, senders are falling back to the domain’s address record, which works but is fragile.
Do subdomains need their own MX records?
Only if they receive mail at addresses like name@sub.example.com. MX records do not pass down from the parent domain to subdomains.