SysAdmin Tools

An MX lookup queries the Domain Name System to retrieve the Mail Exchange (MX) records for a domain — the DNS records that tell the internet which mail servers accept email on that domain's behalf. If you are troubleshooting email delivery failures, setting up a new mail provider, or verifying that a domain migration completed successfully, checking MX records is always the first diagnostic step.

Every functioning email domain must have at least one MX record. The record contains two pieces of information: the hostname of the mail server and a priority number. When another mail server wants to deliver email to your domain, it performs an MX lookup, retrieves the list of mail servers, and connects to the one with the lowest priority number first. If that server is unavailable, it tries the next one in the list. This is how redundant email delivery works.

Whether you are configuring Google Workspace, Microsoft 365, Zoho Mail, or a self-hosted mail server, the MX records must be correctly published in your DNS zone before email will flow. Our MX lookup tool queries Cloudflare's global DNS resolver in real time, so you always see the live, propagated MX configuration rather than a cached snapshot.

Beyond delivery troubleshooting, MX records reveal which email provider a domain uses, whether backup mail servers are configured, and whether MX records exist at all — a domain without MX records cannot receive email.

How to Use the MX Lookup Tool

  1. 1

    Enter the domain name

    Type the domain you want to query — for example, gmail.com or yourdomain.com. Enter the root domain, not an email address. The tool queries MX records at the domain level.

  2. 2

    Click Lookup

    The tool sends a DNS query for MX records and displays results within seconds. You will see each mail server hostname and its priority value.

  3. 3

    Read the results

    Results are sorted by priority. The mail server with the lowest priority number is the primary server. Multiple entries indicate a redundant mail setup with failover capability.

  4. 4

    Verify against your mail provider

    Compare the returned MX hostnames against what your email provider requires. If they do not match, your DNS is not yet configured correctly and email will not flow to your provider.

Understanding MX Record Results

MX lookup results show two key fields for each record: the mail server hostname and the priority value. The priority (also called preference) is a number between 0 and 65535 — the lower the number, the higher the preference. Sending mail servers always attempt to deliver to the lowest-priority MX first. If that server is unreachable, they try the next lowest priority, and so on. The mail server hostname is the domain name of the server that will accept incoming email. This is always a hostname, never an IP address — MX records cannot point directly to IPs. The hostname must have its own A record (or AAAA record) resolving to the mail server's IP. The TTL shows how long the record is cached by resolvers. A low TTL means changes to MX records propagate quickly, while a high TTL means other mail servers may continue delivering to old servers for longer after a change.
FieldDescription
PriorityPreference value (0–65535). Mail is delivered to the server with the lowest number first; higher numbers are used as fallback.
Mail ServerThe hostname of the mail server that accepts incoming email for this domain.
TTLTime to Live in seconds — how long other mail servers cache this MX record before re-querying.

Common MX Lookup Use Cases

Diagnose email delivery failures

When email sent to a domain bounces or disappears, check MX records immediately. Missing records mean the domain cannot receive email at all. Wrong hostnames mean delivery is going to the wrong server. Mismatched priorities may be routing email to a backup server rather than the primary.

Verify mail provider setup after migration

After moving from one email provider to another — say from on-premise Exchange to Microsoft 365 — check the MX records to confirm the new provider's mail servers are correctly published and the old entries have been removed.

Confirm redundant mail server configuration

For high-availability email setups, multiple MX records at different priority levels provide automatic failover. Use MX lookup to verify that backup mail servers are correctly registered and will accept mail if the primary becomes unavailable.

Identify what email provider a domain uses

MX record hostnames reveal the email provider at a glance. Google Workspace uses aspmx.l.google.com; Microsoft 365 uses domain-com.mail.protection.outlook.com; self-hosted setups use the organisation's own server hostname.

MX Lookup — Frequently Asked Questions

What is an MX record?
An MX (Mail Exchange) record is a DNS record that specifies which mail server is responsible for accepting email messages on behalf of a domain. When someone sends an email to user@example.com, the sending mail server performs an MX lookup on example.com to find where to deliver the message. Without MX records, a domain cannot receive any email.
How do I check the MX records of a domain?
Enter the domain name in the MX lookup tool above and click Lookup. Results appear within seconds showing each mail server and its priority. Alternatively, use the terminal command: dig example.com MX or nslookup -type=MX example.com. Our online tool is quicker and requires no software installation.
What does MX record priority mean?
Priority (also called preference) is a number that determines the order in which mail servers are tried. The server with the lowest priority number receives mail first. For example, if you have an MX at priority 10 and another at priority 20, all sending servers will try priority 10 first. If it is unavailable, they fall back to priority 20. This enables redundant mail delivery with automatic failover.
Why do domains have multiple MX records?
Multiple MX records provide redundancy. If the primary mail server (lowest priority number) is offline, sending servers automatically try the next MX in priority order. Google Workspace and Microsoft 365 both publish multiple MX records for exactly this reason. Some organisations also use secondary MX records from a different provider as a backup during maintenance windows.
How do I fix "MX record not found"?
If no MX records are returned, the domain either has no MX records configured or they have not propagated yet. Log into your DNS provider and add the MX records required by your email service. If you recently added them, wait for the TTL period to expire — this can take from a few minutes to 24 hours depending on the TTL value set on the records.
What MX records does Google Workspace use?
Google Workspace requires five MX records: ASPMX.L.GOOGLE.COM at priority 1, ALT1.ASPMX.L.GOOGLE.COM at priority 5, ALT2.ASPMX.L.GOOGLE.COM at priority 5, ALT3.ASPMX.L.GOOGLE.COM at priority 10, and ALT4.ASPMX.L.GOOGLE.COM at priority 10. If you see these in an MX lookup, the domain uses Google Workspace for email.
What MX records does Microsoft 365 use?
Microsoft 365 uses a single primary MX record in the format yourdomain-com.mail.protection.outlook.com at priority 0. The exact hostname varies based on your tenant name. Some tenants also have secondary MX records. After setting up Microsoft 365, an MX lookup should show exactly this hostname and no legacy records from your previous email provider.
How long does it take for MX records to propagate?
MX record propagation time is determined by the record's TTL. If the old MX records had a TTL of 3600 seconds (1 hour), it takes up to one hour for all mail servers worldwide to see the new records. To speed up migrations, reduce the TTL to 300 seconds (5 minutes) at least 24 hours before making the change.
What happens if MX records are missing?
If a domain has no MX records, sending mail servers check for an A record as a fallback (per RFC 5321). This is rarely the intended behaviour. In practice, missing MX records cause emails to bounce with a "No route to host" or "Domain not found" SMTP error. Always verify MX records exist before announcing a new email domain to users.
How do I verify that email is configured correctly?
Start with an MX lookup to confirm the correct mail server hostnames are published. Then use the SPF Lookup tool to verify your SPF record authorises those mail servers to send. Follow up with DKIM Lookup to confirm the DKIM public key is published, and DMARC Lookup to check your authentication policy. All four checks together confirm a fully working email configuration.

Related Tools