Article

What Is an MX Record Lookup in Email Verification?

By Unlimited Verifier Team ·

Diagram of an MX record lookup showing an email address's domain queried through DNS, returning mail servers with priority numbers that pass or fail the domain

Summary

An MX record lookup is a DNS query that asks which mail servers accept email for a domain. In email verification it is usually the first check, confirming the domain can receive mail before slower mailbox checks run. It proves the domain's infrastructure works, not that a specific inbox is active.

An MX record lookup is a DNS query that asks which mail servers accept email for a domain, and in email verification it is usually the first check that confirms an address's domain can receive mail at all. It runs against the domain, not the individual mailbox, so it is quick and cheap enough to apply to every unique domain in a list, and it removes dead domains before slower mailbox checks begin.

This guide explains what the lookup returns, how to read each result, where it misleads, and how to run it yourself or across a large list. For the wider process, start with how email verification works.

Quick answer

What is an MX record and what does a lookup return?

An MX record lookup returns the list of mail servers a domain has published for receiving email, with a priority number for each. The MX record type is defined in RFC 1035, and RFC 5321 describes how senders use those records to route mail.

A typical answer for a domain hosted on a major provider looks like this:

A lower preference number means higher priority. Senders try the lowest number first and fall back to higher ones. A verifier follows the same logic, so a domain does not need every record to work. One reachable host is enough to show the domain accepts mail.

A lookup sends no email and touches no mailbox. It is a DNS query, which is why it is safe to run on every domain in a list.

Bottom line: An MX lookup tells you which mail servers a domain has published, in priority order. That describes the domain's infrastructure, not any person's inbox.

Why does an MX lookup matter for email verification?

It matters because it removes addresses that could never be delivered, at the lowest cost in the verification chain. A domain with no mail servers cannot deliver anything, however well the local part of the address is formed. A syntax check, covered in what RFC 5322 email syntax is, tests the shape of the string. The MX step tests the infrastructure behind it.

This affects your bounce rate. Every address on a dead domain becomes a hard bounce. Google's sender guidelines set 0.3% as the spam-complaint rate bulk senders should avoid and advise staying below 0.1%. Google does not publish a bounce threshold, so bounces need a limit of your own. A practical ceiling is 2% hard bounces per send. Removing dead domains before the send is the cheapest way to stay under it.

It also supports email verification compliance and hygiene. If you can show that you checked domains and removed unreachable addresses before a campaign, you have a documented process rather than an assumption.

Bottom line: MX checks are among the highest-return, lowest-cost steps in verification. They remove whole dead domains in one lookup, which a mailbox check cannot do efficiently.

How does an MX record lookup work, step by step?

A verifier extracts the domain, queries its MX records, sorts them by preference, resolves each mail host, and falls back to the domain's address record when no MX exists. The steps are below.

  1. Extract the domain. For jane@acme-widgets.com, the domain is acme-widgets.com.
  2. Query for MX records. The verifier asks a DNS resolver for the MX record type for that domain.
  3. Read the preference order. Records are sorted by preference. Records with the same number are normally load-balanced.
  4. Resolve each mail host. Each hostname is resolved to an IP address through an A or AAAA record.
  5. Fall back if there is no MX. RFC 5321 says that when a domain has no MX records, the domain's address record is used as an implicit mail host. A domain with an A record but no MX can still receive mail.
  6. Handle failures carefully. A timeout or a SERVFAIL response means the lookup did not finish. It is not the same as "no record". Retry it. Our recommendation is up to three retries over 24 hours before marking the domain unresolved.
  7. Cache the answer. DNS answers carry a TTL (time to live), and resolvers hold them for that long. A domain that just changed hosts may return the old answer until the TTL expires.

Only after the domain passes does the verifier open a connection to a mail host and ask about the mailbox. That is the SMTP check, which uses the RCPT TO command explained in what RCPT TO means in email verification. Slow domains usually stall at the connection stage. See why email verification is slow for some domains.

Bottom line: The lookup resolves, reads, falls back, and caches. Most errors come from skipping the fallback rule or treating a timeout as a failure.

What do the results of an MX lookup tell you?

Each result maps to one of three verdicts: Pass, Invalid or Unknown. The table below is the decision logic a bulk workflow should follow.

MX outcome What it means Verdict Next step
Multiple MX records, hosts resolve Domain is configured for mail Pass Run the SMTP mailbox check
One MX pointing to a filtering gateway Mail passes through a security layer Pass, with caution Run SMTP; flag as possible catch-all if it accepts everything
No MX, but an address record exists Implicit MX fallback applies (RFC 5321) Pass Run the SMTP mailbox check
No MX and no address record Nothing is set up to receive mail Invalid Suppress every address on the domain
Null MX (0 .) Domain has declared it accepts no mail (RFC 7505) Invalid Suppress every address on the domain
Confirmed NXDOMAIN The domain does not exist Invalid Suppress every address on the domain
Timeout or SERVFAIL The lookup did not finish Unknown Retry; do not mark Invalid

Two rows need extra attention. A null MX is an explicit statement from the domain owner, so it is one of the few DNS results with no ambiguity. A gateway MX is one of the most misread results. Many filtering gateways accept mail at the SMTP stage and make the delivery decision afterwards. A domain pass says little about the mailbox in that case. If the SMTP check cannot tell real addresses from fake ones, those addresses belong in Risky. The logic is explained in what accept-all means in an email verifier and how bounce-based catch-all verification works.

Bottom line: Only three results should drive a delete decision: no MX with no address record, a null MX, and a confirmed NXDOMAIN. Everything else needs a retry or a closer look.

How is an MX lookup different from a mailbox check?

An MX lookup checks the domain's mail infrastructure, while a mailbox check asks the receiving server whether it will accept a specific address. The two answer different questions, and treating one as the other is a common reason a list looks cleaner than it is.

Method What it confirms What it can't confirm Cost profile Best use
DNS MX lookup (dig, nslookup) Domain accepts mail Whether a mailbox exists One query per domain, free to run Spot-checking a domain
MX check inside a bulk verifier Domain accepts mail, across a whole list Mailbox existence and consent One lookup per unique domain First pass on every row
SMTP mailbox check (RCPT TO) The mail host responds about that recipient Consent, engagement, gateway behaviour One connection per address; slower Second pass on domains that passed MX
Engagement and consent review Whether the person wants the mail Whether the mailbox works Depends on your data Segmenting before a campaign

The sensible order is MX, then SMTP, then engagement. MX removes dead domains cheaply, which cuts the number of slower SMTP connections. The SMTP step does not deliver a message; see does email verification send an email to the address for how that works. The SMTP step also needs outbound port 25, which some hosting environments block. The tool's method matters as much as its result. For tool comparisons, see the best email verification tools and how to choose an email verifier.

Bottom line: MX answers "can this domain receive mail?" and SMTP answers "does this mailbox respond?" Use MX to narrow the list and SMTP to test what remains.

What are the limits of an MX record lookup?

An MX lookup has four limits that a practitioner should know before trusting the result.

It says nothing about the person. A domain can have perfect MX records while the mailbox has been deleted. Company domains often keep the same MX for years after staff leave. For the individual, the SMTP check and your engagement data are the evidence.

Parked and typo domains can pass. Some misspelled domains, such as a near-copy of a major provider, have MX records because the owner set up parking or forwarding. An MX check catches only part of this. Typo detection needs a comparison against common domains, and the domain result should be read alongside the syntax and mailbox results.

Gateways hide the mailbox. When a domain routes mail through a filtering gateway, SMTP may accept every address. That is the core of the catch-all problem, and it is common on corporate domains. Email verification for ecommerce and SaaS lists often show it on business domains where the MX has moved but the directory has not been cleaned. Consumer providers also behave differently at the mailbox step, as covered in does email verification work for Yahoo and AOL addresses.

Changes take time to appear. Because of TTL caching, a domain that migrated may return the old MX for hours. A "no MX" result on a brand-new domain can reflect propagation rather than a permanent failure. Retry after a few hours before concluding anything.

Bottom line: A domain pass is necessary for a deliverable address but not sufficient. Expect false passes from parked domains and gateways, and stale answers after a migration.

How do you run an MX record lookup yourself?

You can check any domain from a command line in under a minute. This tutorial assumes no DNS experience.

  1. Open a terminal. On macOS or Linux, open Terminal. On Windows, open Command Prompt or PowerShell.
  2. Run the lookup on macOS or Linux. Type dig example.com MX +short and press Enter. A valid answer prints lines such as 10 mail.example.com., with the priority number first.
  3. Run the equivalent on Windows. Type nslookup -type=MX example.com. The output lists each mail exchanger and its preference.
  4. Check the fallback if there is no MX. Run dig example.com A +short. An IP address means the implicit MX fallback applies.
  5. Read the result against the table above. Multiple MX hosts mean Pass. An explicit 0 . means the domain accepts no mail. An empty answer with no address record means Invalid.
  6. Check suspicious domains. If a domain looks like a typo of a major provider, look up its MX. If the MX points to a generic parking host, treat the domain as suspect.
  7. Retry anything that errors. A timeout is not a verdict. Run the same command again after a short wait.

For individual addresses, the free email checker runs the full chain, including the domain and MX steps, without command-line setup.

Bottom line: Two dig commands and the table above are enough to make a sound domain-level call on any address you are unsure about.

How do verifiers use MX checks in a bulk workflow?

A bulk workflow runs cheap checks first so that expensive ones see fewer addresses. It deduplicates, groups by domain, runs one lookup per domain, and then runs the mailbox check only where it is needed.

  1. Normalise the list. Trim whitespace, lowercase the domain, and remove exact duplicates. Duplicates inflate both the lookup count and the send count.
  2. Run the syntax check against the RFC 5322 format. Remove malformed rows and record the count.
  3. Group addresses by domain. Count the unique domains. This is the number of MX lookups you will actually run.
  4. Run one MX lookup per domain and cache the result for the whole run.
  5. Apply the decision table. Mark dead and null-MX domains Invalid, hold timeouts for retry, and pass the rest.
  6. Run the mailbox check on passing domains, and flag catch-all and gateway domains as Risky.
  7. Segment the output into Valid, Risky and Invalid. Export it and save the counts with the run date.

Steps 3 and 4 do most of the work, and they are the steps teams most often skip when verifying in a spreadsheet. The same logic applies to sign-up forms, as described in real-time email validation. For the ongoing schedule, see email list maintenance best practices.

Bottom line: Deduplicate and group by domain before any lookup runs. Grouping is a large part of why a 25,000-row check finishes in minutes rather than hours.

Worked example: MX-checking a 25,000-row list

The figures below are illustrative, but the plan limits and arithmetic are real.

Starting point: A SaaS company exports 25,000 contacts from a trade-show form and a legacy CRM. Unlimited Verifier's Pro plan accepts lists of up to 25,000 emails each, so the whole file fits in one upload.

Step 1: Syntax and duplicates. 25,000 rows minus 1,380 malformed or duplicate rows leaves 23,620 addresses.

Step 2: Group by domain. Those 23,620 addresses sit on 2,940 unique domains. The MX step therefore needs 2,940 lookups, saving 23,620 − 2,940 = 20,680 lookups.

Step 3: MX results across the 2,940 domains:

Domain result Domains Addresses Action
Valid MX 2,702 22,827 Proceed to SMTP check
No MX and no address record 171 610 Invalid; suppress
Null MX 38 95 Invalid; suppress
Timeout 29 88 Retry later

Check: 2,702 + 171 + 38 + 29 = 2,940 domains. 22,827 + 610 + 95 + 88 = 23,620 addresses.

Step 4: Time. At an illustrative 300 ms per lookup, 2,940 lookups run one after another take 2,940 × 0.3 = 882 seconds, or about 15 minutes. Parallel lookups shorten that further.

Step 5: Result. 705 addresses (610 + 95) are removed at the MX stage. The 88 timeouts are retried. The 22,827 passing addresses go to the mailbox check, and any gateway or catch-all results among them are flagged Risky.

Cost: One Pro month covers this file. Pro is $29 a month, or $25 a month billed annually, and includes 25,000 deep verifications a month. Compare vendors by cost per 1,000 rows rather than the headline fee. The email verification pricing page of any vendor should let you run that calculation.

Bottom line: One upload and about 15 minutes of DNS work remove 705 unreachable addresses before the mailbox checks run.

How do you run MX checks on a large list with Unlimited Verifier?

Unlimited Verifier checks syntax, domain, MX records and the SMTP mailbox in one pass, then sorts results into Valid, Risky and Invalid. The steps below take you from export to re-import.

  1. Export your contacts as a CSV from your ESP or CRM, including the email column.
  2. Sign up for an account. The Free plan allows 25 lists a month of up to 150 emails each, which is 25 × 150 = 3,750 emails a month.
  3. Split large files if needed. On Free, a 400-row file needs three lists (150 + 150 + 100). On Pro, each list can hold up to 25,000 emails.
  4. Upload and verify a list. CSV and Excel files up to 10MB are accepted, and the email column is detected automatically.
  5. Run verification and wait for the batch to finish.
  6. Read the three buckets. Valid addresses are safe to send to. Invalid addresses should be removed and suppressed. Risky addresses include catch-all domains and role accounts, which need a separate decision. See how verifiers detect role-based addresses.
  7. Export the results as CSV, Excel or JSON. Results are kept for 24 hours on Free and 30 days on Pro, so export before the window closes.
  8. Re-import only Valid contacts into your ESP, and add Invalid addresses to its suppression list. Unlimited Verifier has no native ESP, CRM or Zapier integration, so this is a manual import or a scripted call.

For automated workflows, the email verification API accepts single-email checks and bulk batches of up to 10,000 emails per request. A 25,000-row list needs three requests (10,000 + 10,000 + 5,000). The API is not available on Free. Pro includes 100,000 API emails a month. For the pattern, see email verification API and automation. Catch-all results are explained on the catch-all email verification page.

Unlimited Verifier also flags disposable addresses, which MX checks alone do not reveal. On the verifier side, that matters most for sign-up data, where throwaway domains often have working MX records.

Bottom line: Export, split to the plan's per-list limit, upload, read the three buckets, export within the retention window, and re-import only Valid contacts.

What are the most common MX lookup mistakes?

Bottom line: Most MX mistakes come from reading a DNS answer as more than it is. Keep the domain-level result separate from the mailbox-level result, and keep the counts.

How we compared (and limitations)

This article is based on public documentation: RFC 1035 for the MX record format, RFC 5321 for mail routing and the implicit MX fallback, RFC 7505 for the null MX, and Google's sender guidelines. Industry guidance on list hygiene comes from M3AAWG.

We have not run controlled accuracy tests of any verifier's MX logic. The timings, domain counts and address counts in the worked example are illustrative, not measurements. DNS behaviour depends on resolver configuration, TTL values and network conditions, so your own numbers will differ.

Unlimited Verifier states 99.5% accuracy for deep verification. That is the company's own figure, not an independent benchmark. Its verification engine is open source, so you can read the implementation in the project's GitHub repository and test it against domains you already know before relying on it.

Bottom line: Test MX logic against domains you already know, and use the worked example as a template for your own counts rather than a benchmark.

Worked example: lookups needed for a 23,620-address list

Item Count
Addresses in list 23,620
Unique domains 2,940
MX lookups needed (one per domain) 2,940
Lookups avoided by caching 20,680

Steps: 1) Extract the domain from each address. 2) Deduplicate to unique domains. 3) Run one MX lookup per domain. 4) Retry timeouts. 5) Remove addresses on domains with no MX, no address record, or a null MX.

Frequently asked questions

Does an MX lookup confirm an email address exists?

No. An MX lookup confirms only that the domain has published mail servers. It does not touch the mailbox, so it cannot tell whether a specific person's address exists or is read. Mailbox-level checks are needed for that, and even those have limits.

What is a null MX record?

A null MX record is published as preference 0 with a single dot as the host, written as '0 .'. It signals that the domain accepts no email. Verifiers should treat it as a failed domain and remove addresses on it before sending.

What should I do when an MX lookup times out?

Retry the lookup later rather than deleting the address. A timeout means the result is unknown, often due to a temporary DNS problem. Only remove the domain if repeated attempts still fail or return a definitive negative answer.

Do I need to run an MX lookup on every email address?

No. MX records belong to domains, so you only need one lookup per unique domain. Caching results means a list of thousands of addresses on a few thousand domains needs far fewer queries than addresses.

What happens if a domain has no MX record?

Mail senders fall back to the domain's address record, called an A or AAAA record, as an implicit mail server. If neither exists, the domain cannot receive mail and addresses on it should be treated as undeliverable.

Can an MX record be valid but the domain still bounce mail?

Yes. The MX record may point to a live server while the specific mailbox is disabled, full, or never existed. The domain check passes, but the address still hard bounces, which is why the MX step is only the first layer.

What is the difference between MX priority numbers?

Lower numbers are tried first. Senders attempt the lowest-preference server and fall back to higher numbers if it is unreachable. A domain needs only one working host to accept mail, so verifiers should not require every record to respond.

Does an MX lookup send any email?

No. It is a DNS query that reads published records and sends no message to the address. That makes it safe to run across an entire list without affecting the recipient or your sender reputation.

Cut Bounces and Protect Your Sender Reputation With Unlimited Email Verification

Every invalid address you send to hurts your sender reputation and your inbox placement. Verifying your list before each send means fewer bounces, healthier deliverability, and a predictable cost. With Unlimited Verifier, standard verification is unlimited on every plan, with no per-email fees.

Unlimited Verifier checks syntax, domain, MX records and the SMTP mailbox. It also detects catch-all domains and flags disposable and role-based addresses. Export a CSV from your email platform or CRM, upload and verify the list, then re-import the clean results. You can also automate checks with the email verification API.

Free Pro
Price $0 $29/month ($25/month billed annually)
Lists 25 a month, up to 150 emails each Unlimited, up to 25,000 emails each
Deep verifications 750 a month 25,000 a month
API access No Yes (100,000 emails a month)
Result retention 24 hours 30 days

Why teams choose Unlimited Verifier

Unlimited Verifier states 99.5% accuracy for deep verification.

Create a free account and verify your next list before you hit send.

Want to test a single address first? Try the free email checker.