
An MX record check tells you which servers accept email for a domain. Run one when mail stops arriving, after you move to a new email provider, or when you want to know who handles a company's email. You can find a domain's MX records in a few seconds with an online tool, dig or nslookup.
Quick Answer: To find the MX records for a domain, enter it in our MX lookup tool or run
dig example.com MX +shortin a terminal. Each record shows a priority number and a mail server hostname. The server with the lowest number gets mail first. The MX lookup also names the email provider behind each mail server.
What are MX records?
MX records (Mail Exchange records) are DNS records that name the mail servers for a domain. When someone sends mail to user@fastmail.com, the sending server looks up the MX records for fastmail.com and delivers the message to one of the servers listed there.
Every MX record has two parts:
- Priority (also called preference): a number that sets the order in which servers are tried. Lower numbers go first.
- Mail server hostname: the fully qualified domain name of a server that accepts mail for the domain.
For how MX fits next to A, CNAME, TXT and the other record types, see the guide to DNS records.
How MX priority works
When a domain has several MX records, the sending server sorts them by priority and tries the lowest number first. Here is the real set for fastmail.com:
fastmail.com. 3600 IN MX 10 in1-smtp.messagingengine.com.
fastmail.com. 3600 IN MX 20 in2-smtp.messagingengine.com.
A sender tries in1-smtp.messagingengine.com first. If that server does not answer, it tries in2-smtp.messagingengine.com.
Two records can share a priority. RFC 5321, section 5.1 says the sender must then pick between them at random. This spreads the load across both servers. wikipedia.org uses this setup: both of its MX records have priority 10.
How to find MX records: 3 methods
Method 1: Use an online MX lookup tool
The quickest MX record check is a web tool. Our MX lookup tool lists a domain's mail servers in priority order and names the provider that runs each one, such as Google Workspace, Microsoft 365 or a mail filter like Mimecast. It also tells you when a domain has no MX records or a null MX. It queries Cloudflare's 1.1.1.1 resolver, with Google's 8.8.8.8 as a fallback. To see the MX records next to every other record type, use the DNS lookup tool.
The hosting check below shows the same DNS records. It also reads the MX record with the lowest priority number and names the email provider, such as Google Workspace or Microsoft 365. The provider appears next to the web host, the content delivery network (CDN) and the registrar.
Try it yourself
Check any website's hosting
Enter a domain or IP to see hosting provider, DNS records, and more.
Method 2: Use dig (macOS and Linux)
dig is the standard DNS query tool on macOS and Linux. Add +short to get only the values:
dig fastmail.com MX +shortOutput:
10 in1-smtp.messagingengine.com.
20 in2-smtp.messagingengine.com.
Drop +short to see the TTL (how long resolvers may cache the answer) and the record class. To skip your resolver's cache, ask the domain's own nameserver:
dig NS fastmail.com +short
dig @fmns1.messagingengine.com fastmail.com MXMethod 3: Use nslookup (Windows, macOS and Linux)
nslookup ships with Windows, macOS and most Linux distributions:
nslookup -type=MX proton.meOutput:
proton.me mail exchanger = 10 mail.protonmail.ch.
proton.me mail exchanger = 20 mailsec.protonmail.ch.
For every way to look up DNS records, including the other record types, see how to find DNS records for any domain.
MX records for common email providers
When you move a domain's email to a hosted provider, you replace its MX records with the provider's servers. The values below come from each provider's setup docs, checked in October 2026. Each provider also gets a real dig lookup on a domain that uses it. For your own domain, use the values in your provider's admin console. For more providers with servers in Europe, see European Google Workspace alternatives.
Google Workspace
Google's MX setup page gives one record for new setups:
| Priority | Mail server |
|---|---|
| 1 | smtp.google.com |
google.com uses it, with its own priority number:
$ dig google.com MX +short
10 smtp.google.com.
Domains that started on Google Workspace before 2023 often still have the older five-record set that begins with aspmx. Google says those values are still supported and need no change if mail works. bitwarden.com still publishes the full legacy set:
$ dig bitwarden.com MX +short
1 aspmx.l.google.com.
5 alt1.aspmx.l.google.com.
5 alt2.aspmx.l.google.com.
10 alt3.aspmx.l.google.com.
10 alt4.aspmx.l.google.com.
Microsoft 365
Microsoft 365 uses one MX record per domain. The admin center gives you the exact value, and Microsoft's DNS setup guide says to give it the highest priority, which is usually 0.
| Priority | Mail server |
|---|---|
| 0 | <MX token>.mail.protection.outlook.com |
The MX token is usually your domain with dots turned into hyphens:
$ dig microsoft.com MX +short
10 microsoft-com.mail.protection.outlook.com.
$ dig github.com MX +short
0 github-com.mail.protection.outlook.com.
Domains that turn on inbound SMTP DANE with DNSSEC in Exchange Online get a newer host in the form <MX token>.<subdomain>.mx.microsoft. Microsoft's DANE documentation uses contosotest-com.o-v1.mx.microsoft as its example. During that switch, the old mail.protection.outlook.com record is moved to a lower priority and then deleted.
Zoho Mail
Zoho's email delivery guide lists three records:
| Priority | Mail server |
|---|---|
| 10 | mx.zoho.com |
| 20 | mx2.zoho.com |
| 50 | mx3.zoho.com |
The top-level domain changes with the data center that holds your account. Accounts in the EU data center use mx.zoho.eu, mx2.zoho.eu and mx3.zoho.eu. Other regions have their own variants, such as mx.zoho.in and mx.zoho.com.au. Zylker, the demo company in Zoho's docs, uses the US set:
$ dig zylker.com MX +short
10 mx.zoho.com.
20 mx2.zoho.com.
50 mx3.zoho.com.
Proton Mail
Proton's custom domain guide lists two records:
| Priority | Mail server |
|---|---|
| 10 | mail.protonmail.ch |
| 20 | mailsec.protonmail.ch |
$ dig proton.me MX +short
10 mail.protonmail.ch.
20 mailsec.protonmail.ch.
Fastmail
Fastmail's manual DNS guide lists two records:
| Priority | Mail server |
|---|---|
| 10 | in1-smtp.messagingengine.com |
| 20 | in2-smtp.messagingengine.com |
$ dig fastmail.com MX +short
10 in1-smtp.messagingengine.com.
20 in2-smtp.messagingengine.com.
Null MX: domains that accept no mail
Some domains publish a single MX record with priority 0 and a lone dot as the host. This record is a null MX, defined in RFC 7505. It tells senders that the domain accepts no email. A message to the domain then fails at once and does not sit in a retry queue for days.
example.com publishes one:
$ dig example.com MX +short
0 .
RFC 7505 says a domain with a null MX must not publish any other MX record. A server that rejects mail because of a null MX should answer with reply code 556 and enhanced status code 5.1.10.
A null MX usually comes with an SPF record that allows no senders and a strict DMARC policy, so nobody can send mail as the domain either. example.com has both:
$ dig example.com TXT +short
"v=spf1 -all"
$ dig _dmarc.example.com TXT +short
"v=DMARC1;p=reject;sp=reject;adkim=s;aspf=s"
Use this setup for parked domains and for domains that only serve a website.
Troubleshooting email delivery with MX records
Email bounces with "no MX record found"
Cause: The domain has no MX records, or its nameservers do not answer.
Fix: Add MX records with your email provider's values. If the records exist but lookups fail, check that each nameserver answers for the domain:
dig example.com NS +short
dig @ns1.your-dns-provider.com example.com MXEmail goes to the old provider after a migration
Cause: The MX records still point to the old provider, or resolvers still cache the old values.
Fix: Replace the old MX records with the new provider's values and delete the old entries. Then wait out the old TTL. If the old records had a TTL of 86400 seconds (24 hours), some resolvers can keep sending mail to the old servers for up to a day.
Email lands in spam even though MX records are correct
Cause: MX records only control where mail arrives. Spam filters judge the mail you send by your email authentication records: SPF, DKIM and DMARC.
Fix: Check those TXT records next to your MX records:
dig fastmail.com TXT +short
dig _dmarc.fastmail.com TXT +shortYou should see:
- SPF: a record such as
v=spf1 include:spf.messagingengine.com ~all(fastmail.com's own), with the include your provider gives you - DMARC: a record at
_dmarc.<your domain>that starts withv=DMARC1; - DKIM: a TXT or CNAME record at
<selector>._domainkey.<your domain>, where your provider sets the selector
Mail is lost now and then
Cause: A backup MX server (one with a higher priority number) is down or does not accept mail for the domain.
Fix: Check that every server in your MX records accepts mail for your domain. To test that a server answers on port 25, run:
nc -v mail2.example.com 25Many home internet providers block outbound port 25. If the test times out, run it from a server. If a backup server cannot accept your mail, remove its MX record. With a hosted provider, publish only the records it gives you.
Frequently Asked Questions
What happens if a domain has no MX records?
The sender falls back to the domain's A or AAAA record. RFC 5321 calls this an implicit MX with priority 0. A domain without MX records but with a website can still get mail delivery attempts at its web server. If the domain should receive mail, publish MX records. If it should not, publish a null MX (0 .), as example.com does.
Can MX records point to an IP address?
No. RFC 5321 says the MX record must contain a domain name, and that name must resolve to at least one A or AAAA record. MX 10 192.0.2.10 is invalid. Use MX 10 mail.example.com and give mail.example.com an A record that points to 192.0.2.10. The MX host should not be a CNAME either (RFC 2181, section 10.3).
How long do MX record changes take to propagate?
Propagation time depends on the TTL of the old record. Resolvers keep the old answer until its TTL runs out, so a 3600-second TTL means up to an hour. Before a planned email migration, lower the TTL to 300 seconds. Lower it at least one old TTL period before the switch, so the short TTL is in place everywhere when you change the records.
Should I use the same priority for all MX records?
Use the values your email provider gives you. Equal priorities split mail at random between the servers, which works when every server can handle any message. Different priorities give you one primary server and ordered fallbacks.
How do I find which email provider a domain uses?
Look up its MX records and match the hostnames to a provider: google.com or googlemail.com means Google Workspace, mail.protection.outlook.com means Microsoft 365, and messagingengine.com means Fastmail. The MX lookup tool does this match for you, and the hosting check shows the email provider next to the web host.
Wrapping up
An MX record check is the first step when email fails. Run dig <domain> MX +short or use the MX lookup tool to see the mail servers and their order. Compare the result with your provider's values, then check SPF, DKIM and DMARC.
For how DNS answers these lookups, read the beginner's guide to DNS or the guide to every DNS record type.
Related articles

Written by
Piotr KulpinskiFounder of HostingChecker.online and a web developer with over a decade of experience in DNS, hosting infrastructure, and domain management. Piotr builds tools that help developers and site owners understand their web stack. Other products: Highseat, OpenAlternative, EuroAlternative, Revinel and Dirstarter.