MX Lookup
Look up the mail server (MX) records for any domain. See which servers handle incoming email, their priority order, and TTL.
What is an MX record?
An MX (Mail Exchanger) record is a DNS record that tells the world which mail servers
are responsible for accepting inbound email for a domain. When someone sends an email
to [email protected],
their mail server performs a DNS lookup for the MX records of example.com
to find out where to deliver the message.
MX records contain two pieces of information: a priority number and a mail server hostname. The priority (also called preference value) tells the sending server which mail server to try first. The hostname identifies the actual mail server that will receive the message.
Without valid MX records, a domain cannot reliably receive email. If you run your own mail server, your MX records must be configured correctly before any email can be delivered to your domain.
How MX priority works
Lower number = higher priority
The priority field is a 16-bit unsigned integer — lower values are tried first. A mail server with priority 1 is always preferred over one with priority 10. This counter-intuitive ordering (lower number = more preferred) is defined in RFC 5321.
If the highest-priority server is unreachable or rejects the connection, the sending server falls back to the next lowest-priority MX record. Mail is not lost as long as at least one MX server is reachable.
Equal priority = load balancing
When two or more MX records share the same priority number, the sending server selects between them randomly. This distributes inbound email load across multiple servers.
Google Workspace uses this pattern extensively — for many Google customers, you will see pairs of MX records with the same priority (e.g., two records both at priority 5, two records both at priority 10). This redundancy means email delivery continues even if individual servers are temporarily unavailable.
Example: If a domain has MX records at priorities 1, 5, 5, 10, and 10, the sending server always tries the priority-1 server first. If that fails, it randomly picks one of the two priority-5 servers. Only if both priority-5 servers fail does it try the priority-10 pair.
Common mail provider MX patterns
Most businesses use a hosted email service. You can identify which provider handles a domain's email by inspecting the MX record hostnames.
| Provider | Typical MX hostname pattern | Example priority |
|---|---|---|
| Google Workspace | aspmx.l.google.com | 1, 5, 5, 10, 10 |
| Microsoft 365 | domain.mail.protection.outlook.com | 0 |
| Zoho Mail | mx.zoho.com, mx2.zoho.com | 10, 20 |
| ProtonMail | mail.protonmail.ch | 10, 20 |
| Fastmail | in1-smtp.messagingengine.com | 10, 20 |
| Cloudflare Email Routing | route1.mx.cloudflare.net | 73, 27, 74 |
| Amazon SES (inbound) | inbound-smtp.us-east-1.amazonaws.com | 10 |
Troubleshooting email delivery with MX records
No MX records found
- Email cannot be delivered to this domain
- Sending servers may attempt delivery to the A record as a fallback, but this is not reliable
- Check your DNS provider — MX records may have been deleted accidentally
- Allow up to the TTL period for new records to propagate after adding them
Email is bouncing or delayed
- Verify the MX hostname resolves to an IP address (it must have an A record)
- Check that port 25 is open on the mail server
- Confirm SPF, DKIM, and DMARC are configured — missing these increases spam filtering
- Check that the TTL is not excessively high (over 86400) — this slows propagation if changes are needed
- Verify the MX record points to a hostname, not an IP address — RFC 5321 requires a hostname
Frequently asked questions
What is an MX record?
An MX (Mail Exchanger) record is a DNS record that specifies which mail server is responsible for receiving email for a domain. When a sender delivers an email to [email protected], their mail server queries DNS for the MX records of example.com to find where to deliver the message.
What does the priority number mean?
The priority (also called preference) is a number where lower values are tried first. A server with priority 1 is always tried before a server with priority 10. If the primary server is unreachable, the next-priority server is tried automatically. Records with equal priority are chosen randomly to distribute load.
Why does my domain have multiple MX records?
Multiple MX records provide redundancy. If the primary mail server is temporarily unavailable, sending servers automatically try the next record in priority order. Google Workspace, Microsoft 365, and most enterprise mail providers configure multiple MX records so email is never lost if one server goes down.
What happens if a domain has no MX records?
Without MX records, most sending servers will bounce inbound email with a delivery failure. Some very old mail server implementations fall back to trying the domain's A record, but this is not standard behaviour and cannot be relied upon. To receive email, you must publish at least one valid MX record.
How long does it take for MX record changes to propagate?
Propagation time depends on the TTL of the existing record. A TTL of 3600 means resolvers that cached it can serve the old value for up to one hour. Lowering your TTL to 300 seconds at least 24 hours before a planned change reduces propagation time to minutes after the change is applied.
Can an MX record point to an IP address?
No. RFC 5321 explicitly prohibits MX records from pointing directly to IP addresses. An MX record must point to a fully qualified domain name (FQDN) that itself resolves to an IP address via an A or AAAA record. Using an IP address in an MX record is a misconfiguration that some mail servers will reject outright.
How do I check MX records from the command line?
On Linux or macOS: dig MX example.com. On Windows: nslookup -type=MX example.com in Command Prompt. You can also use nslookup -q=MX example.com in PowerShell.
Why do MX records point to Google or Microsoft servers even though I own the domain?
When you sign up for Google Workspace or Microsoft 365, the provider instructs you to update your domain's MX records to point to their servers. This delegates incoming email delivery to their infrastructure while you retain full ownership of the domain. You still control the domain — you have simply configured email delivery to go through a third-party provider.
What is the difference between an MX record and an SPF record?
An MX record specifies which servers receive email for your domain — it controls inbound mail routing. An SPF record is a TXT DNS record that specifies which servers are authorised to send email as your domain — it controls outbound mail authentication. Both are important: MX for receiving email, SPF (along with DKIM and DMARC) for protecting against spoofing of your domain in outgoing mail.