📚 What Is an MX Record?
An MX (Mail Exchange) record is a DNS resource record type that specifies which mail server is responsible for accepting incoming email on behalf of a domain. When someone sends an email to user@example.com, the sending mail server queries DNS for the MX record of example.com, connects to the returned mail server hostname, and delivers the message.
MX records have two components: a hostname (the mail server's fully qualified domain name) and a priority value (a lower number = higher priority). Multiple MX records create fallback chains — if the primary server is unreachable, the sender automatically tries the next-priority server.
🔄 How MX Record Priority Works
Priority values are unsigned integers — smaller means higher preference. Standard practice:
- Priority 0–5: Primary mail server (tried first)
- Priority 10–20: Secondary / backup servers
- Priority 50+: Tertiary fallback or spam filter bypass traps
- Equal priorities: Load-balanced by sending MTA (random selection)
Google Workspace example: ASPMX.L.GOOGLE.COM at priority 1, ALT1 and ALT2 at 5, ALT3 and ALT4 at 10.
🔑 Common Email Providers & Their MX Patterns
🛡️ Use Cases for MX Lookup
📧
Email Deliverability Diagnosis
If emails bounce with "no MX record" or "host not found" errors, check MX records first. Missing, misspelled, or improperly prioritised records cause the majority of domain-level delivery failures.
🔍
Email Infrastructure Reconnaissance
Security researchers use MX lookups to identify which email provider a target uses — vital for phishing simulation testing, email gateway configuration, and threat intelligence.
🔄
Email Provider Migration
Before migrating from one email host to another, lower your MX TTL to 300 seconds. After switching, verify new MX records with this tool before restoring TTL to avoid mail loss during propagation.
🔒
SPF Record Validation
SPF's "mx" mechanism includes all MX hosts as authorised senders. Knowing your current MX records lets you verify your SPF policy accurately reflects your sending infrastructure. Use our
SPF Lookup tool to check.
✅
Email Verification Pre-Check
Our
Email Checker automatically queries MX records as the first step of verification. A domain without MX records cannot receive email — addresses there are automatically invalid.
📊
Redundancy Auditing
Professional email setups need at least 2 MX records. Single-MX-record domains risk total email loss during server outages. Use this tool to audit your MX redundancy configuration.
🔗 More Ways to Investigate Mail Infrastructure
For full DNS record inspection (A, TXT, NS, SOA), use our DNS Lookup tool. To verify your SPF authorisation policy, try SPF Lookup. For complete email domain health (MX + SPF + DMARC in one), use Email Checker. Learn the full email authentication picture in our guide: SPF vs DKIM vs DMARC.
What is an MX record? +
An MX (Mail Exchange) record is a DNS resource record that specifies the mail server responsible for accepting email for a domain. Each MX record contains a hostname and a priority value — lower numbers are tried first.
What does MX record priority mean? +
Priority tells sending mail servers which MX host to try first. Lower numbers = higher priority. If priority 10 fails, the sender tries priority 20. Equal priority values are load-balanced randomly.
How many MX records should a domain have? +
At least 2 for redundancy. Most professional setups have 2–5 MX records. Google Workspace uses 5 MX records (ASPMX.L.GOOGLE.COM at priority 1, plus backup servers at 5, 10, and 20).
What happens if a domain has no MX record? +
RFC 5321 defines a fallback to the domain's A record, but many modern mail servers refuse delivery without explicit MX records, causing bounces. Always configure MX records explicitly.
Why would an MX lookup return NXDOMAIN? +
NXDOMAIN means the domain itself doesn't exist. If the domain exists but has no MX record, the query returns NOERROR with an empty answer — both cases mean email delivery will likely fail.
What is MX record TTL? +
TTL is how long DNS resolvers cache the MX record in seconds. TTL 3600 = cached 1 hour. When migrating email providers, lower TTL to 300 (5 min) 24 hours before changing, so updates propagate quickly.
How do I change my MX records? +
Log into your domain registrar or DNS host → DNS management → delete old MX records and add new ones with correct hostname and priority. Changes propagate per the TTL — typically 1–48 hours.
What is a null MX record? +
A null MX (RFC 7505) uses a single dot (.) as hostname with priority 0. It signals the domain intentionally accepts no email, preventing MTAs from queuing failed deliveries indefinitely.
How does MX relate to SPF? +
SPF's "mx" mechanism includes all A records of the domain's MX hosts as authorized senders. "v=spf1 mx -all" authorises all IPs of your MX hosts without listing them explicitly.
What is the difference between MX and A records? +
An A record maps hostname to IPv4. An MX record maps a domain to a mail server hostname — which then needs its own A/AAAA record. MX records must never point directly to an IP address.
Why does my MX record point to Google? +
If your MX records show ASPMX.L.GOOGLE.COM or ALT*.ASPMX.L.GOOGLE.COM, your domain uses Google Workspace (formerly G Suite) for email hosting.
What does MX lookup failure mean for email? +
If MX lookup fails, the sending MTA can't find where to deliver email. It retries for 72–96 hours before bouncing the message back to the sender with a delivery failure notice.
How do I verify MX records with dig? +
Run: dig MX example.com +short (Linux/Mac) or Resolve-DnsName example.com -Type MX (Windows PowerShell). This tool replicates that query in your browser.
Can I use the same MX for multiple domains? +
Yes. Multiple domains can point to the same mail server. The server uses the RCPT TO envelope address to route to the correct mailbox, regardless of how many domains it handles.
Is MX Lookup free? +
Yes — completely free, no sign-up, unlimited lookups. All queries use Google's public DNS resolver and results appear instantly.