DNS Tools

MX Lookup

Find the mail servers that receive email for a domain.

An MX record names a server that accepts email for a domain. MX stands for mail exchanger. When someone sends a message to anna@example.com, the sending server asks DNS for the MX records of example.com and delivers the message to one of the servers listed there.

This tool looks up the MX records of a domain and lists each mail server with its priority. The result shows where email for that domain is delivered, according to public DNS.

How to check the MX records of a domain

  1. Type the domain into the field. Use the part of the email address after the @ sign, for example example.com. If you paste a full web address, the tool takes the hostname out of it.
  2. Click Lookup. There is no record type to choose, because this tool always asks for MX records.
  3. Check the three rows at the top: Domain, Record type and Records found.
  4. Read the DNS records table. Each row is one mail server, with its hostname in the Value column and its priority in the Details column.

The example on the page is google.com. For your own mail, enter the domain exactly as it appears in your addresses. Mail for anna@mail.example.com follows the MX records of mail.example.com, not those of example.com.

Under the table, "View as JSON" shows the same result as data, and the Copy JSON and Download JSON buttons save it.

How to read the result

Part of the resultWhat it tells you
DomainThe name the tool asked about
Record typeAlways MX for this tool
Records foundHow many mail servers the domain lists
TypeMX on every row of the table
ValueThe hostname of a mail server, such as mx1.example.net
DetailsThe priority of that server, shown as "Priority 10"

The Value column shows names, not addresses. A sending server looks up the address of the name in a second step. You can do the same with Hostname to IP to see which IP addresses a mail server uses.

The hostnames usually reveal who handles the mail. Servers named after the domain itself suggest that the owner runs a mail server or uses the mail service of the web host. Names that end in the domain of an email company mean that company receives the mail. Reading the names is often enough to find out which provider a domain uses when nobody in the office remembers.

If the domain has no MX records, the table is empty and the page says "No records were returned."

How email finds a mail server

Email travels between servers with a protocol called SMTP. The sending server starts with a message and a recipient address. It splits the address at the @ sign and keeps the part after it, the domain.

Next it asks DNS for the MX records of that domain. The answer is a list of hostnames, each with a number. The server sorts the list by number, looks up the address of the first hostname and connects to it on port 25. Once that server accepts the message, the sender's work is finished.

If the first server does not respond, the sender moves down the list. When none of them respond, it keeps the message in a queue and tries again later. Most servers keep trying for several days before they give up and return a failure notice to the author.

MX records affect incoming mail only. They have no say over which servers may send mail in the name of the domain. SPF and DMARC cover that, and both are TXT records. Use TXT Lookup to read them.

Priority and backup mail servers

The number in the Details column is the priority, also called the preference. Senders try lower numbers first. Only the order matters, so the values 1, 5 and 10 behave exactly like 10, 50 and 100.

Mail serverPriorityWhat senders do
mx1.example.net10Deliver here or to mx2, chosen at random
mx2.example.net10Deliver here or to mx1, chosen at random
backup.example.net20Deliver here only when both servers above fail

When two servers have the same priority, a sender picks one of them at random for each message. Over many messages the mail spreads across both, so each must be able to accept mail for every mailbox in the domain. Large providers publish several servers this way so that no single machine carries everything.

A server with a higher number is a backup. It receives mail only when every server with a lower number is unreachable. A backup normally stores the messages and passes them on when the main server returns.

A backup with weaker spam filtering than the main server gives junk mail a way around the filter, since nothing stops a sender from connecting to the backup directly.

Rules an MX record has to follow

  • The target must be a hostname. An MX record cannot hold an IP address. A Value such as 203.0.113.25 means the record was entered wrongly, and many senders cannot deliver to it.
  • That hostname needs an A or AAAA record of its own. An MX record that points to a name without an address leads nowhere.
  • The hostname must not be an alias. The mail standards do not allow an MX record to point to a name that has a CNAME record. Some senders tolerate it and others do not, which makes the failures hard to trace. CNAME Lookup shows whether a mail server name is an alias.
  • Every name that receives mail needs its own MX records. A subdomain does not inherit the mail servers of the main domain.

A domain with no MX records at all can still receive mail. The standard tells senders to fall back to the address record of the domain and try to deliver there. The fallback exists for old setups, and it explains why a web server sometimes sees connection attempts on port 25.

A domain that should never receive mail can say so with a null MX. That is a single MX record with priority 0 and a lone dot in place of the hostname. Senders that understand it stop at once and report the address as undeliverable. The author of a mistyped address then hears about it immediately and not after days of retries.

Checking mail after a change of provider

A move from one email provider to another is a common reason to look up MX records. The new provider gives you a list of records. You enter them at the company that runs your DNS, and then you check that public DNS returns them.

  • The result shows servers of both providers. Part of your mail still arrives at the old one. Delete the old records unless the new provider told you to keep them during the move.
  • A hostname differs from the instructions by one character. Compare each Value with the instructions letter by letter, because a misspelled name sends mail to a server that does not exist.
  • The result still shows the old servers hours after you edited the records. Check with NS Lookup which nameservers the domain uses. People often edit a zone at a company that no longer answers for the domain.
  • The priorities are not the ones the provider asked for. Some providers expect one particular server to come first.

Resolvers keep a copy of the old records for a while after a change, so the old provider can still receive some messages during that time. Keep the old mailbox open until mail has stopped arriving there. DNS Propagation compares the MX answers of four public resolvers and shows whether each of them has the new servers yet.

What this tool does not show

An MX lookup reads DNS. It does not connect to the mail servers, so it cannot tell you whether a server is running, whether it accepts mail for a given mailbox, or whether a message was delivered. A domain can have correct MX records and a mail server that is switched off.

The result has no TTL values, so you cannot see how long resolvers will keep the records. The tool does not validate DNSSEC signatures, does not look up the addresses of the mail servers, and does not check SPF, DKIM or DMARC.

The lookup runs on the IP Tracker server and goes to public resolvers run by Cloudflare, Google and Quad9. The first answer is used. Mail domains that exist only inside a company network cannot be checked, and names ending in .local, .internal, .test or localhost are refused. Each visitor can run 15 lookups a minute, and IP Tracker keeps no history of the domains you enter.

Frequently asked questions

What is an MX record?

An MX record is a DNS record that names a mail server for a domain and gives it a priority number. Sending servers read it to decide where to deliver a message.

A domain can have one MX record or several. Without any, senders fall back to the address record of the domain, which usually does not lead to a mail server.

Can an MX record point to an IP address?

No. The value has to be a hostname, and that hostname needs an A or AAAA record with the address. Create a name such as mail.example.com, point it at the address of the server, and use that name in the MX record.

I changed my MX records. Why does mail still arrive at the old provider?

Resolvers store DNS answers for the time set in the TTL of the record. Until that time has passed, some senders still see the old servers and deliver there.

If old mail servers still appear in this lookup after a day, check that you removed the old records and that you edited the zone at the DNS provider the domain uses.

Do I need a backup MX server?

Usually not. When your mail server is down, sending servers hold the message and retry for days. A backup helps mainly when you expect long outages or want to hold the waiting mail on a machine you control.

Why does the lookup return no records for my domain?

Either the domain has no MX records, or you entered a name that has none of its own, such as www.example.com. Enter the domain as it appears after the @ in your addresses.

If the domain has no MX records at all, incoming mail depends on the fallback to the address record. Add MX records if the domain is meant to receive mail.

Do MX records affect the email I send?

Not directly. MX records tell other servers where to deliver mail for your domain. Whether your outgoing mail is trusted depends mostly on SPF, DKIM and DMARC records, which you can read with TXT Lookup.

Some receiving servers do reject mail from a sender domain that has neither MX records nor an address record, because nobody could reply to it.

How do I stop a domain from receiving email?

Publish a null MX: one MX record with priority 0 and a single dot as the target. Senders that support it reject mail for the domain right away.

This is common for parked domains and for domains used only for a website. Such domains often also publish the SPF record v=spf1 -all, which tells receivers that no server is allowed to send in the name of the domain.