You don't have javascript enabled. Please enable javascript to use this website.

MX Lookup

Find the mail servers handling email for any domain — server hostnames, priority order, and TTL in real time.
More Tools

What Does an MX Lookup Return?

MX records name the mail servers that receive email for a domain. Each has a priority number, and the lowest number is tried first.

MX lookup is a DNS query that retrieves the Mail Exchanger (MX) records for a domain, as defined in RFC 1035 (Section 3.3.9). MX records specify which mail servers are responsible for receiving inbound email on behalf of a domain and in what priority order. Each record returns a mail server hostname and a numeric priority value — the lower the number, the higher the delivery precedence per RFC 5321.

Field Value
DNS Record Type MX — Type 15 (RFC 1035 §3.3.9)
SMTP Routing Standard RFC 5321, Section 5
Priority Range 0–65535 (lower value = higher preference, tried first)
Protocol UDP datagrams, caching disabled
TTL Unit Seconds
Multiple MX Records Supported — enables failover and load balancing

How to Use the MX Lookup Tool

Find the mail servers for any domain in seconds.

1

Enter a Domain Name

Type the domain to check in the input field — for example, google.com. No www prefix or http is needed.
2

Select a DNS Server

Choose a resolver from the dropdown: Google, Cloudflare, OpenDNS, Quad9, Yandex, or Authoritative DNS. Use Authoritative DNS for the most current results.
3

Click Lookup MX Records

Submit the query. The tool sends a live UDP DNS query to the selected resolver — results are never served from cache.
4

Read the Results

Each row shows a mail server hostname, its priority value, and TTL in seconds. The mail server with the lowest priority number receives email first.

What the MX Lookup Results Mean

Each row is one mail server with its priority. Senders try the lowest number first and use the others as backups; servers with the same number share the load.

Field Meaning Example
Record Type Always MX — identifies this as a Mail Exchanger record. MX
Value Priority number followed by the mail server hostname. Lower priority = tried first for email delivery. 10 aspmx.l.google.com
TTL (seconds) How long this record is cached before DNS servers must requery the authoritative source. Relevant when verifying a recent MX record change. 300

When a domain returns multiple MX records, the sending mail server attempts delivery to the record with the lowest priority value first. If that server is unreachable, it tries the next in ascending order. Records sharing the same priority value are selected randomly, distributing inbound load across equivalent servers.

How MX Lookup Works

The tool sends a live DNS query for the domain’s MX records, to a public resolver or to the domain’s own name servers, and lists the servers by priority.

How senders use MX records A sending server looks up the MX records of example.com and gets two servers: priority 10 mx1.example.com and priority 20 mx2.example.com. It delivers to mx1 first and uses mx2 only if mx1 does not answer. Sending serverto: [email protected] DNS MX example.com10 mx1.example.com20 mx2.example.com mx1.example.comtried first (10) mx2.example.combackup (20)
Senders look up the MX records and deliver to the lowest priority number first; higher numbers are backups.
  • Queries are sent as UDP datagrams using the dnsjava SimpleResolver with caching disabled (lookup.setCache(null)) and a 3-second timeout per server.
  • The MX record type (Type 15) is defined in RFC 1035, Section 3.3.9. The wire format specifies a 16-bit PREFERENCE value followed by a domain name (the EXCHANGE field) identifying the mail server.
  • When Authoritative DNS is selected, the tool first queries Google (8.8.8.8) for the domain's NS records, resolves each name server hostname to an IP address via an A record lookup, then queries each authoritative server directly — bypassing all resolver cache for the freshest possible data.
  • RFC 5321 (SMTP), Section 5 defines how sending mail transfer agents (MTAs) use MX records: servers are sorted by ascending PREFERENCE and attempted in order. A domain with no MX record at all falls back to its A record per RFC 5321 §5.1 — email delivery still proceeds but with no priority control.

Do it yourself

How to Look Up MX Records Without an Online Tool

All major operating systems include command-line DNS tools. The online tool queries from a neutral external resolver — results may differ from your local resolver due to caching.

Windows Command Prompt

nslookup -q=MX google.com
nslookup -q=MX google.com 8.8.8.8

Append a resolver IP after the domain name to query a specific DNS server.

Windows PowerShell

Resolve-DnsName google.com -Type MX
Resolve-DnsName google.com -Type MX -Server 8.8.8.8

Mac / Linux dig

dig google.com MX
dig google.com MX @8.8.8.8
dig google.com MX @8.8.8.8 +short

dig is the preferred tool for sysadmins — it returns the full DNS response including TTL, response flags, and the authority section. The +short flag outputs only the priority value and hostname. On macOS, dig is pre-installed. On Ubuntu/Debian, install it with apt install dnsutils.

Common Uses for MX Lookup

Mail server migration verification. A sysadmin switching email providers updates the domain's MX records to point to the new mail servers. Before decommissioning the old servers, they run an MX lookup using the Authoritative DNS option to confirm the new records are live — bypassing resolver cache to check the current TTL and verify the exact hostnames in place.

Email deliverability troubleshooting. A developer finds outbound emails from a new domain bouncing with a "550 Host not found" error. An MX lookup reveals the domain has no MX record published. After adding the correct MX record, verifying its PTR record with the Reverse DNS Lookup tool and checking the mail server IP against the IP Blacklist Checker confirms the full email path is clean.

Identifying a domain's email infrastructure. A security analyst investigating a suspicious sending domain runs an MX lookup to identify the mail server hostnames. The hostnames reveal the hosted provider (Google Workspace, Microsoft 365, Mimecast, or a self-hosted server) and feed directly into an IP Blacklist check on the resolved mail server IPs. The SPF Lookup tool and TXT Lookup tool complete the picture of the domain's email authentication setup.


Frequently Asked Questions

What is an MX record?
An MX (Mail Exchanger) record is a DNS record type defined in RFC 1035 (Section 3.3.9) that identifies the mail servers responsible for receiving inbound email for a domain. Each record specifies a mail server hostname and a numeric priority value. When a sending mail server delivers email, it queries the recipient domain's MX records and attempts delivery to the lowest-priority server first.
What does the priority value in an MX record mean?
Priority (also called preference) is a 16-bit integer that determines the order in which mail servers are tried during email delivery. Per RFC 5321 (Section 5), the sending mail transfer agent selects the MX record with the lowest numeric value first — a server at priority 10 is tried before one at priority 20. When two records share the same priority value, the sending server selects between them randomly, distributing load equally.
Why does a domain have multiple MX records?
Multiple MX records provide redundancy and load balancing. If the primary mail server — the one with the lowest priority value — is unreachable, the sending server automatically fails over to the next record in priority order. Records with identical priority values share inbound mail traffic equally. This configuration ensures email delivery continues during server outages or scheduled maintenance.
How accurate are MX lookup results?
Results reflect the live DNS response from the selected resolver at the time of the query, with caching disabled. DNS changes propagate within the record's TTL window — typically 1 to 48 hours after an update. Selecting the Authoritative DNS option returns data directly from the domain's own name servers, bypassing any intermediate resolver cache, and gives the freshest possible result.
Do you store the domains I look up?
No. Domains entered are used only to perform the DNS query and are not stored or logged.
What is the difference between MX lookup and DNS lookup?
DNS lookup retrieves any record type — A, AAAA, CNAME, NS, TXT, MX, and others — for a domain. MX lookup specifically queries for MX (Mail Exchanger) records only, with the record type pre-selected. The MX Lookup tool is optimized for email server verification and deliverability workflows. The DNS Lookup tool is the right choice when you need to inspect multiple record types or verify the full DNS configuration of a domain at once.

Related Guides

Guide What Is an IP Address?
Mail servers listed in MX records are identified by hostname and resolved to an IP address for the SMTP connection. Understanding IP addressing clarifies how email delivery works end to end.
Guide What Is IPv4?
Most mail servers operate on IPv4 addresses. Understanding IPv4 address space and allocation helps when verifying that a mail server's IP is correctly assigned and not shared with untrusted infrastructure.