MX Records
free/v1/dns/mxRetrieves MX (Mail Exchange) records for a domain and identifies the email service provider. Returns mail server hostnames, priority values, and provider detection for Google Workspace, Microsoft 365, Proofpoint, Mimecast, Barracuda, Amazon SES, ProtonMail, Zoho, Fastmail, iCloud Mail, and more.
What It Does
Queries MX records and analyzes mail server hostnames to identify the email provider and security gateways. Detects Null MX (RFC 7505) configurations — domains that explicitly do not accept email. Returns priority-sorted records with provider confidence scoring.
Why It's Useful
MX record analysis is critical for email deliverability troubleshooting, email security posture assessment, and identifying infrastructure misconfigurations. Identifies email security gateways (Proofpoint, Mimecast, Barracuda) in the mail path, useful for understanding an organization's email defense stack.
Use Cases
Email Deliverability Troubleshooting
Emails to a specific domain are bouncing. Check if MX records exist and are properly configured.
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.
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.
Ensure smooth email migrations by understanding existing mail routing.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | Required | The domain to query MX records forExample: google.com |
Response Fields
| Field | Type | Description |
|---|---|---|
domain | string | The queried domain |
has_mx | boolean | Whether domain has MX records configured |
is_null_mx | boolean | Whether domain uses Null MX (RFC 7505) to reject email |
mx_records | array | MX records with host, priority, and TTL |
provider | object | Detected email provider name, type, features, confidence, and backup_provider (backend provider behind security gateways) |
record_count | number | Number of MX records found |
Code Examples
curl "https://api.edgedns.dev/v1/dns/mx" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d "domain=google.com"const response = await fetch(
'https://api.edgedns.dev/v1/dns/mx?domain=google.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',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
'domain': 'google.com'
}
)
data = response.json()
print(data)Read the full MX Records 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.