MX Records: Understand and Use the Results
Find mail servers and detect email provider
MX records: the mailroom address for your domain
An MX record ("Mail eXchanger" record) is a special type of DNS entry that tells the rest of the internet which servers handle email for a particular domain. When someone sends an email to `you@example.com`, the sending server doesn't already know where your inbox lives — it has to ask DNS, "who handles email for `example.com`?" The answer comes back as one or more MX records, each pointing at a hostname (like `aspmx.l.google.com` for Google Workspace, or `example-com.mail.protection.outlook.com` for Microsoft 365), each with a numeric priority. The sending server tries the lowest-priority server first; if that fails, it tries the next one; and so on.
You should care because without correct MX records, your domain cannot receive email at all. There is no fallback, no alternate path, no "oh, it'll figure it out." If your MX records are wrong — pointing at a server that no longer exists, or missing entirely — every message sent to your domain will silently bounce, and the senders will get a delivery-failure notice while you sit there wondering why the customer never wrote back. This is one of the highest-stakes pieces of DNS configuration, and one of the easiest to break during a migration.
The five things every MX record check looks at:
Does at least one MX record exist? A domain with no MX records cannot receive email.
Do the listed mail servers actually resolve and accept SMTP connections? An MX record pointing at a hostname that returns NXDOMAIN is silently broken.
Are the priorities correct? The lowest number wins. If your primary server is priority 10 and your backup is priority 20, that's right. If they're the same, they share the load.
Does the domain use a recognized email provider? Most domains today use Google Workspace, Microsoft 365, Zoho, ProtonMail, or a similar managed provider. The hostnames in the MX records reveal which one.
Is there a Null MX record? A `0 .` (priority zero, target dot) tells receivers that this domain explicitly does not accept mail — useful for parked domains and brand-protection registrations.
Three questions an MX record check answers:
Can my domain actually receive email right now?
Did the recent email-provider migration go correctly, or are some MX records still pointing at the old service?
Which email provider is this domain (mine or a competitor's) actually using?
The cost of broken MX records is total email loss — the worst possible failure mode for a business. The fix is one DNS edit. The protection is checking your MX records every time you migrate email providers, every time you launch a new domain, and on a recurring schedule for your most important domains. The MX record format is defined in RFC 5321, the same standard that defines SMTP.
The MX Records endpoint, in plain language
Find mail servers and detect email provider
The sanity flags catch the three failure modes responsible for most "why isn't email arriving?" tickets — RFC (Request for Comments) 5321 forbids MX→CNAME (Canonical Name record), RFC 1918 IPs in MX records mean mail never leaves, and lame MX is invisible to plain `dig`. ASN (Autonomous System Number) + country enrichment gives M&A due diligence and fraud teams a clear "your MX moved to AS in another country" anomaly signal without writing the lookup themselves. Provider detection identifies the security gateways (Proofpoint, Mimecast, Barracuda) and downstream providers in the mail path so callers understand the defense stack.
What is actually happening when you call it
Queries MX records, identifies the email provider and security gateways, and surfaces three classes of misconfiguration as `sanity_flags`: MX hostnames that resolve via CNAME (Canonical Name record) (a violation of RFC (Request for Comments) 5321 §5.1 that breaks delivery on strict resolvers), MX hostnames that resolve to private/reserved IPs (mail will never reach them), and lame mail delegation (MX with no A or AAAA at all). Detects Null MX (RFC 7505) — the explicit "this domain does not accept mail" signal. Enriches each MX IP (Internet Protocol address) with its ASN (Autonomous System Number) and country code via Team Cymru, surfaces unique-ASN and unique-country counts for diversity assessment, and returns a `linked_endpoints` hint for callers who want full SPF/DMARC/MX-Health analysis.
Why this specific tool matters
Choose a task: Email Deliverability Troubleshooting. Emails to a specific domain are bouncing. Check if MX records exist and are properly configured.
Run the MX Records request below and retain the input and observed result. Before changing configuration, compare the relevant fields with the value or policy you expected. Use the MX Records reference to check the field definitions and supported options.
Available on the free plan. The technical details: `GET /v1/dns/mx`.
When would I actually use this?
Email Deliverability Troubleshooting
Emails to a specific domain are bouncing. Check if MX records exist and are properly configured.
Use the finding: Quickly diagnose email delivery issues by verifying mail server configuration.
Email Security Posture Assessment
Map an organization's email security stack by identifying security gateways (Proofpoint, Mimecast, Barracuda), cloud email providers, and backup mail servers from MX records.
Use the finding: Understand email infrastructure defenses without active scanning — identify gaps in the security gateway chain.
Migration Planning
Document current email infrastructure before migrating clients to a new email platform.
Use the finding: Ensure smooth email migrations by understanding existing mail routing.
The easiest way: just ask your AI assistant
Connect the MCP server. Just ask in plain English:
Use dns_mx with domain=google.com. Show the returned findings, identify unavailable evidence, and explain a useful next check.
Confirm the tool and inputs in the client before accepting its summary. For MX Records, use the response fields below to separate observations from recommendations.
The dedicated MCP server is available on every plan. Individual tool access and request limits depend on your plan. Management categories and endpoints disabled for the tool catalog are not exposed through MCP.
The technical way: call it from code
This MX Records request uses the example inputs from its API contract. Replace YOUR_API_KEY with a key on the free plan or higher; adapt the target to your task.
curl --request GET 'https://api.edgedns.dev/v1/dns/mx?domain=google.com' \
--header "Authorization: Bearer YOUR_API_KEY"Prepare inputs for MX Records
Start with the inputs below. Keep the same hostname, path, and options when comparing MX Records observations. The API reference contains the complete parameter contract, optional settings, and access requirements.
| Field | Type | Required? | What it means | Example |
|---|---|---|---|---|
domain | string | Yes | The domain to query MX records for | google.com |
Interpret MX Records findings
Read these fields alongside the full response from your MX Records check. A missing value or failed lookup is different from a passing result. Keep returned errors and confidence or cache metadata when available; do not replace missing evidence with a successful default. See the complete response reference for additional fields.
| Field | Type | What you'll see in it |
|---|---|---|
domain | string | The queried domain |
has_mx | boolean | Whether domain has MX records configured |
is_null_mx | boolean | Whether domain uses Null MX (RFC (Request for Comments) 7505) to reject email |
Words you might be wondering about
IP (Internet Protocol address) — A unique number that identifies a computer on the internet, like a phone number for a server.
CNAME (Canonical Name record) — A DNS entry that says "this name is just an alias for that other name."
SPF (Sender Policy Framework) — A list, published in your DNS, of which servers are allowed to send email pretending to be you. Helps stop spammers from forging your address.
DMARC (Domain-based Message Authentication, Reporting and Conformance) — An email rulebook you publish in your DNS. It tells receiving servers what to do with email that fails SPF or DKIM checks — ignore it, send it to spam, or block it entirely.
ASN (Autonomous System Number) — A unique number assigned to a big network operator (like an ISP or cloud provider). Tells you who owns a chunk of the internet.
RFC (Request for Comments) — The official internet standards documents. When someone says 'RFC 8484' they mean a specific numbered standards document — in that case, the one defining DNS over HTTPS.
Related Guides
MX Health: Understand and Use the Results
Check mail server health and redundancy
SPF Check: Understand and Use the Results
Validate SPF record syntax, DNS lookups, and policy
Email Hosting: Understand and Use the Results
Detect email service provider
TXT Records: Understand and Use the Results
Get TXT records including verification entries
Need Programmatic Access?
Automate domain intelligence with 100+ API endpoints and a free MCP server for AI integration.