Technical Guide

How MX records work, and what they tell you about an address

The BounceBuster team

What an MX record does

An MX (Mail Exchange) record is a DNS record that names the mail servers that accept email for a domain. When you send to someone@example.com, your mail server looks up the MX records for example.com and connects to the servers they list.

What is in an MX record

  • Hostname. The mail server, for example mx1.example.com or aspmx.l.google.com.
  • Priority. A number from 0 to 65535. Lower is preferred.
  • TTL. How long DNS resolvers may cache the record.

How priority works

Senders try the lowest number first and move to the next if that server is unreachable. A common layout is 10 for the primary server, 20 for a backup and 30 for a last fallback. Records with the same number are tried in random order, which spreads load across them.

Two example setups

Google Workspace's long-standing five-record setup:

  • Priority 1: ASPMX.L.GOOGLE.COM
  • Priority 5: ALT1.ASPMX.L.GOOGLE.COM
  • Priority 5: ALT2.ASPMX.L.GOOGLE.COM
  • Priority 10: ALT3.ASPMX.L.GOOGLE.COM
  • Priority 10: ALT4.ASPMX.L.GOOGLE.COM

Microsoft 365 uses one record per domain, in the form yourdomain-com.mail.protection.outlook.com at priority 0.

What an MX check tells you about an address

An MX check answers one question: can this domain receive mail at all? If the domain has no MX records, or doesn't exist, every address at it will bounce. Strictly, the SMTP spec lets a sender fall back to the domain's A record when there is no MX, but few domains depend on that, and a domain can publish a "null MX" to say it takes no mail.

An MX check says nothing about the mailbox. A domain with perfect MX records can still have thousands of addresses that don't exist. That is why BounceBuster goes one step further and asks the mail server whether the mailbox exists. More on that below.

Checking MX records yourself

  • macOS and Linux: run dig your-domain.com MX +short. It prints priorities and hostnames.
  • Windows: run nslookup -type=mx your-domain.com in Command Prompt.
  • In a browser: MXToolbox and Google Admin Toolbox do the same lookup with extra diagnostics.

An empty result means the domain has no MX records.

Common MX problems

No MX records

The domain was registered for a website and email was never set up, or the records were deleted during a DNS migration. It is a frequent cause of hard bounces.

Misconfigured priorities

If all MX records share one priority, senders pick among them at random. That is fine when every server is set up to accept mail, and a problem when some are not. Leave gaps between values (10, 20, 30) so you can add servers later without renumbering.

Records that point at dead servers

The MX hostname doesn't resolve, or doesn't answer on port 25. Senders can't deliver, and retry until they give up.

Changes that haven't taken effect

After you change MX records, resolvers keep serving the old ones until the old TTL expires, which can take a day or two if the TTL was long. Until then some senders still deliver to the old servers. To make the switch cleanly:

  • Lower the TTL to something short, like 300 seconds, a day or more before the change, so the old long TTL has expired by the time you switch.
  • Keep the old and new mail servers both accepting mail during the switch.
  • Watch bounce rates for about 48 hours afterwards.
  • Put the original TTL back once things have settled.

Good practice

  • Publish at least two MX records, so one server going down doesn't stop mail.
  • Use a TTL of one to four hours.
  • Make sure every listed server accepts mail and can handle your volume.
  • Check the records again after any DNS change or provider migration.

How BounceBuster uses MX data

BounceBuster runs on your computer, so your list is never uploaded to us or to anyone else. For each address it does this:

  1. Extracts the domain, everything after the @.
  2. Queries DNS for that domain's MX records. Only the domain name goes out, never the full address.
  3. Checks that the mail servers named in the records exist and respond.
  4. Runs the mailbox check. It connects from your computer to the mail server named in the MX record, on port 25, asks whether the mailbox exists, and disconnects before any email is sent. Only that mail server, which already hosts the address, ever sees it. A random-address probe detects catch-all domains, and BounceBuster keeps those addresses rather than guessing.
  5. Gives a verdict, valid or invalid. Invalid means no MX records, a domain that doesn't exist, or a definite "no such mailbox" from the server, and the result says which. Everything else stays valid, including catch-all domains and addresses that couldn't be checked because of a DNS timeout, a temporary failure or a server that gave no clear answer. BounceBuster counts those two groups separately so you can see how many there are.

The DNS and MX steps carry only domain names. The mailbox check is the one step that involves a full address, and it goes only to the mail server that already hosts it, never to a validation service. It is on by default and you can switch it off in Settings. Many home ISPs block outbound port 25. When yours does, BounceBuster falls back to format and DNS/MX checks for that run and tells you in the results. For more on validating without uploading, read our guide to validating emails without uploading your data.

MX, SPF, DKIM and DMARC

MX records decide where mail to a domain is delivered. Three other DNS records decide whether mail from a domain is trusted.

  • SPF is a TXT record listing which servers may send mail for the domain. Receivers check the sending server against it.
  • DKIM publishes a public key in DNS. Receivers use it to verify that the message was signed by the domain and not altered in transit.
  • DMARC builds on SPF and DKIM. It tells receivers what to do with messages that fail authentication: monitor only, quarantine, or reject.

A domain can have perfect MX records and still land in spam because its authentication is wrong, and an MX check can't see that. These records matter for sending. A validator is looking at receiving.

Clean your lists the way this post describes.

BounceBuster checks format, dead domains, and mailboxes from your own computer. Free up to 600 emails.

Need unlimited? Get Professional for $19, once

$19 once, free up to 600 a month

Download