Skip to main content

MX Records

free
GET/v1/dns/mx

Retrieves 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 Administrator

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.

Security Analyst

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.

IT Consultant

Migration Planning

Document current email infrastructure before migrating clients to a new email platform.

Ensure smooth email migrations by understanding existing mail routing.

Parameters

NameTypeRequiredDescription
domainstringRequiredThe domain to query MX records forExample: google.com

Response Fields

FieldTypeDescription
domainstringThe queried domain
has_mxbooleanWhether domain has MX records configured
is_null_mxbooleanWhether domain uses Null MX (RFC 7505) to reject email
mx_recordsarrayMX records with host, priority, and TTL
providerobjectDetected email provider name, type, features, confidence, and backup_provider (backend provider behind security gateways)
record_countnumberNumber of MX records found

Code Examples

cURL
curl "https://api.edgedns.dev/v1/dns/mx" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "domain=google.com"
JavaScript
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);
Python
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.

Try This Endpoint

Test the MX Records endpoint live in the playground.