MX Health
developer/v1/dns/mx-healthPerforms health checks on mail servers by verifying MX record DNS resolution and checking redundancy configuration. Resolves each MX host to A and AAAA records to confirm DNS-level reachability. Detects Null MX (RFC 7505) domains and identifies potential delivery issues including single-server configurations and fake redundancy (all MX records resolving to the same IP).
What It Does
Resolves each MX server to verify DNS reachability (both A and AAAA records for IPv4/IPv6), checks for proper redundancy (multiple MX records with different priorities and distinct IP addresses), and detects Null MX configurations (RFC 7505). Note: SMTP port connectivity checks are not performed because Cloudflare Workers' shared IP ranges are commonly blocked by major mail providers.
Why It's Useful
Verifies that mail server DNS records are properly configured and resolvable before issues affect email delivery. Complements SPF, DKIM, and DMARC checks by testing the underlying mail server DNS infrastructure. Identifies MX hosts that lack A or AAAA records, single points of failure, and fake redundancy.
Use Cases
Pre-Campaign Health Check
Before launching a major campaign, verify that recipient domains' mail servers are healthy and accepting connections.
Avoid sending to domains with offline mail servers, improving campaign metrics.
Vendor Email Reliability Assessment
Evaluate the email infrastructure reliability of potential vendors or partners before signing contracts.
Ensure business-critical communications won't be lost due to partner email issues.
Continuous Monitoring
Set up automated health checks for critical business partner domains to detect DNS-level mail server issues early.
Detect unreachable MX targets, missing A records, and single points of failure before they cause delivery failures.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | Required | The domain to check mail server health forExample: example.com |
Response Fields
| Field | Type | Description |
|---|---|---|
domain | string | The queried domain |
mx_records | array | Health status for each MX server including hostname, priority, resolved IPs (A and AAAA), reachability status, and error details |
has_valid_mx | boolean | Whether domain has at least one reachable MX server (resolves to A/AAAA records) |
all_reachable | boolean | Whether all MX servers resolve to at least one IP address |
issues | array | List of detected issues: missing A/AAAA records, no redundancy, same-IP redundancy, Null MX |
count | number | Number of MX records found |
Code Examples
curl "https://api.edgedns.dev/v1/dns/mx-health" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d "domain=example.com"const response = await fetch(
'https://api.edgedns.dev/v1/dns/mx-health?domain=example.com',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data);import requests
response = requests.get(
'https://api.edgedns.dev/v1/dns/mx-health',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
'domain': 'example.com'
}
)
data = response.json()
print(data)Read the full MX Health guide
Why it matters, real-world use cases, parameters, response fields, and how to call it from Claude, ChatGPT, or Gemini via MCP.
Read the guide →Related Endpoints
External References
Learn more about the standards and protocols behind this endpoint.