MX Record Lookup
Lookup MX records for any domain. See mail server priorities and hosts to verify inbound email routing and provider configuration.
Use MX Record Lookup in 4 Steps
What are MX Records?
MX (Mail Exchange) records are DNS records that specify which mail servers accept inbound email for a domain. When someone sends an email to user@example.com, the sending mail server performs an MX lookup for example.com to discover where to deliver the message.
An MX record contains two values:
- Priority (preference value) — a lower number means higher priority. The sending server tries the lowest-priority mail server first.
- Mail server hostname — the FQDN (fully qualified domain name) of the mail server, such as
aspmx.l.google.com.
Every domain that receives email must have at least one MX record. Without MX records, email cannot be delivered to the domain. Most email providers recommend two or more MX records pointing to different servers for redundancy — if the primary server is unreachable, delivery is attempted to the secondary.
Common Email Provider MX Records
Each email hosting provider uses a distinct MX record format. The table below lists the expected MX records for major providers.
| Provider | Priority | Mail Server Hostname |
|---|---|---|
| Google Workspace | 1 | aspmx.l.google.com |
| Google Workspace | 5 | alt1.aspmx.l.google.com |
| Google Workspace | 5 | alt2.aspmx.l.google.com |
| Google Workspace | 10 | alt3.aspmx.l.google.com |
| Google Workspace | 10 | alt4.aspmx.l.google.com |
| Microsoft 365 | 0 | domain-com.mail.protection.outlook.com |
| Zoho Mail | 10 | mx.zoho.com |
| Zoho Mail | 20 | mx2.zoho.com |
| Zoho Mail | 50 | mx3.zoho.com |
| ProtonMail | 10 | mail.protonmail.ch |
| ProtonMail | 20 | mailsec.protonmail.ch |
| Fastmail | 10 | in1-smtp.messagingengine.com |
| Fastmail | 20 | in2-smtp.messagingengine.com |
| Mailchimp Mandrill | 10 | smtp.mandrillapp.com |
If the MX records you see do not match the list above, your domain is routing email to a different provider than expected — or email is misconfigured.
MX Priority Explained
Priority values (also called preference values) control the order in which mail servers are tried:
- Lower value = tried first. Priority 0 or 1 is the primary server.
- Equal priorities mean the sending server load-balances across them randomly.
- Higher priority values act as fallback servers — tried only if lower-priority servers are unreachable.
- Microsoft 365 uses a single MX record with priority 0, as their infrastructure handles internal failover.
A correct Google Workspace setup has exactly 5 MX records with the priorities shown above. A correct Microsoft 365 setup has a single MX record matching *-com.mail.protection.outlook.com (the * is replaced with your tenant prefix based on your domain).
Common MX Record Problems
| Problem | Symptom | Fix |
|---|---|---|
| No MX records | All inbound email bounces with 550 5.1.2 No MX record | Add provider's MX records at DNS host |
| MX points to old provider | Mail delivered to wrong mailbox | Update MX to current provider; wait for TTL |
| MX hostname does not resolve | Delivery failures; Host unknown errors | Ensure mail hostname has A/AAAA record |
| Duplicate MX records | May deliver to wrong server | Remove any MX records not from current provider |
| Wrong priorities | Fallback server receives all mail | Match priorities exactly to provider documentation |
| SPF does not include MX | Mail flagged as spam | Add mx mechanism: v=spf1 mx ~all |
| Single MX with no redundancy | Downtime during server maintenance | Add secondary MX if provider supports it |
CLI Commands
# Look up MX records for a domain
dig example.com MX +short
# Verbose MX lookup showing priority and TTL
dig example.com MX
# Query from a specific resolver (Cloudflare)
dig @1.1.1.1 example.com MX +short
# Windows equivalent
nslookup -type=MX example.com
# Verify the MX hostname resolves (check for A record)
dig aspmx.l.google.com A +short
# Test SMTP delivery path manually
nslookup -type=MX example.com 8.8.8.8
MX Records and Email Authentication
MX records work together with SPF, DKIM, and DMARC records to authenticate email:
- SPF — uses the
mxmechanism to authorise the servers listed in MX records as senders - DKIM — signing and verification are performed by the mail server the MX record points to
- DMARC — depends on SPF and DKIM alignment; MX must be correctly set before DMARC can function
After verifying MX records, always check SPF, DKIM, and DMARC to ensure end-to-end email authentication is configured correctly.
Frequently Asked Questions
Lower MX priority numbers are tried first. Verify hostnames resolve and match your provider.
Get guides like this by email
DNS, email auth, and security playbooks delivered when they publish. No spam.