---
title: "MX Lookup: Check MX Records for Any Domain"
description: "Free MX lookup. List a domain's MX records in priority order, resolve each mail server to IPv4 and IPv6, and catch null MX, CNAME and IP-address mistakes."
canonical_url: "https://smtp.dev/tools/mx-lookup/"
---

> Index of every page on this site: [llms.txt](https://smtp.dev/llms.txt)

## What MX records are

An MX record names a server that accepts mail for a domain, with a preference number. When someone sends to `you@example.com`, their server looks up the MX records of `example.com`, sorts them by preference, and connects to the lowest one on port 25 ([RFC 5321, section 5.1](https://www.rfc-editor.org/rfc/rfc5321#section-5.1)).

```txt
example.com.  MX  10 mx1.example.net.
example.com.  MX  20 mx2.example.net.
```

## How to read the result

- **Priority**: lowest first. Equal numbers share load.
- **Host**: the exchange name, with a note under it when it does not resolve or is a CNAME.
- **IPv4 / IPv6**: the A and AAAA records of each host, which are the addresses senders actually connect to.
- **Provider**: a guess from the hostnames (Google Workspace, Microsoft 365 and others), so you can tell who handles inbound mail.

## Common failures and how to fix them

**MX host does not resolve.** The MX points at a name with no A or AAAA record, usually a typo or a server that was retired. Senders skip it. Fix the name, or add the address record:

```txt
example.com.       MX  10 mail.example.com.
mail.example.com.  A   192.0.2.25
```

**MX points at an IP address.** `example.com. MX 10 192.0.2.25` is invalid. Create a hostname with an A record and point the MX at the hostname.

**MX points at a CNAME.** Not allowed by RFC 2181. Most large senders cope, but some smaller MTAs do not. Use the canonical hostname.

**No MX at all.** Mail still gets delivered to the domain's A record, which is usually a web server that does not run SMTP, so senders keep retrying for days before they bounce. If the domain does not receive mail, publish a null MX ([RFC 7505](https://www.rfc-editor.org/rfc/rfc7505)):

```txt
example.com.  MX  0 .
```

**Null MX mixed with real records.** A null MX has to be the only MX record. Remove one or the other.

**Leftover records after a migration.** Old provider MX records with a lower number than the new ones send mail to a mailbox nobody reads. Remove them once the TTL has passed.

## MX for test and sandbox domains

For staging and CI you rarely want real mailboxes. Point a dedicated subdomain's MX at `mx.smtp.dev` and every message to it lands in an inbox you can read over IMAP, POP3 or the API. See [domain setup](https://smtp.dev/docs/setup/domain/).

## Sitemap

See the full [sitemap](https://smtp.dev/sitemap.md) for all pages.
