Mail Exchanger (MX) resource records represent the foundational routing directory of the global email ecosystem: they instruct the internet exactly which mail transfer agents (MTAs) accept incoming mail for your domain.
Standardized under RFC 1035 and RFC 5321, MX records bridge public domain name systems (DNS) with the Simple Mail Transfer Protocol (SMTP). Without properly configured MX records, sending mail servers cannot discover where to deliver messages, resulting in immediate delivery failures and permanent bouncebacks. Understanding how MX records function at the DNS protocol layer, how preference numbers dictate failover behavior, and how receiving MTAs resolve destination sockets is vital for maintaining robust corporate email architecture.
What are MX Records?
An MX record is a specialized DNS resource record (Type 15) published on an authoritative nameserver that maps a domain name to one or more mail exchange hosts:
- Host Target Requirements: Under RFC 2181 and RFC 5321 Section 5.1, an MX record target must always point to a canonical domain hostname backed by an Address (
A) or IPv6 Address (AAAA) record. An MX record must never point directly to a raw IP address, and must never point to a Canonical Name (CNAME) alias. Pointing an MX record to a CNAME breaks recursive DNS lookups and causes mail to bounce unpredictably. - Null MX Defense (RFC 7505): For non-email operational domains (such as static asset CDN domains or API endpoints) that should never receive mail, domain owners should publish a “Null MX” record (
IN MX 0 .). This explicitly informs sending MTAs that the domain does not accept email, preventing spammers from forging spoofed messages using your unused root domain.
How Outbound MTAs Resolve MX Records & Negotiate Failover
When an outbound MTA processes an outgoing message, it resolves destination routing through a standardized sequence:
- DNS Query Extraction: The sending MTA parses the recipient email address (e.g.,
[email protected]) and executes a recursive DNS query forexample.com IN MX. - Host Prioritization & Socket Initiation: The authoritative DNS server returns a list of MX hostnames accompanied by integer preference values. The sending MTA sorts these hosts in ascending numerical order, selects the lowest priority number, and attempts an encrypted TCP handshake over port 25 with STARTTLS negotiation (RFC 3207).
- Automated Redundancy Failover: If the primary MX host fails to respond within standard timeout windows (typically 30 to 60 seconds), the sending MTA automatically terminates the dead socket and attempts delivery to the next available MX server in the priority hierarchy.
- Implicit A-Record Fallback: If a domain publishes zero MX records, RFC 5321 specifies that sending servers may fall back to querying the domain's root
Arecord. However, modern security gateways treat missing MX records as unconfigured or abandoned domains, making explicit MX records mandatory for reliable delivery.
MX Preference Integers: Load Balancing vs. High-Availability Failover
MX priority values are 16-bit unsigned integers ranging from 0 to 65,535. The fundamental rule of MX priority is simple: lower numerical values denote higher operational preference.
- Load Balancing Across Equal Priorities: Assigning identical priority values to multiple MX records (e.g.,
10 mail1.example.comand10 mail2.example.com) instructs sending MTAs to randomize connections between both endpoints, distributing high-volume inbound traffic evenly across cluster nodes. - High-Availability Failover Architectures: Enterprise topologies designate primary mail gateways with priority 10, while routing backup spooling servers to priority 20 or 30. If the primary datacenter encounters an outage, remote MTAs spool incoming mail on secondary backup servers, preserving message delivery without hard bounces until primary systems recover.
Before launching outreach campaigns, inspecting recipient MX routing with the MailVeri MX Lookup Tool and validating destination mailboxes with the MailVeri Email Checker ensures that your messages route exclusively to active, responsive mail servers. You can also inspect authoritative MX infrastructure, server topologies, and deliverability ratings for top email service providers like Gmail, Microsoft Outlook, and Yahoo Mail directly in our Email Domain Intelligence Directory, and pair MX validation with our DNS TXT Records for Email Deliverability Guide.
Sample Production DNS MX Record Priority Table
| Host | Record Type | Priority (Preference) | Mail Server Target | Routing Role |
|---|---|---|---|---|
@ | MX | 1 | aspmx.l.google.com. | Primary inbound MTA (tried first) |
@ | MX | 5 | alt1.aspmx.l.google.com. | Secondary failover MTA |
parked.yourdomain.com | MX | 0 | . (Null MX, RFC 7505) | Explicitly declares domain accepts no email |
yourdomain.com. 3600 IN MX 1 aspmx.l.google.com.
yourdomain.com. 3600 IN MX 5 alt1.aspmx.l.google.com.
yourdomain.com. 3600 IN MX 10 alt2.aspmx.l.google.com.
parked.yourdomain.com. 3600 IN MX 0 .MailVeri automatically checks DNS MX records, detects RFC 7505 Null MX declarations, and verifies the underlying mailbox via live SMTP for just $0.0002/check ($59 per 100,000 credits) on our Pricing page.
Frequently Asked Questions
What is the most important takeaway from What Are MX Records? DNS Mail Exchange Priority, Failover Routing & Verification Explained?
Understand how DNS MX records route email across primary and backup mail servers, how RFC 7505 null MX records work, and how MX lookups filter dead domains. When applying what are mx records?, teams should always validate recipient addresses before sending or provisioning accounts so hard bounce rates stay strictly below 2% and sender reputation remains protected across Gmail, Microsoft 365, and Yahoo.
How does MailVeri help teams implement What are MX Records? at scale?
MailVeri provides real-time REST API, native MCP server (mailveri-mcp), and 1,000,000-row bulk CSV verification across 7 granular statuses (VALID, INVALID, DISPOSABLE, CATCH_ALL, ROLE_ACCOUNT, FULL_INBOX, and UNKNOWN). This lets you automate how outbound mtas resolve mx records & negotiate failover while filtering out dead mailboxes, 100,000+ burner domains, and over-quota inboxes.
How much does email verification cost for What Are MX Records? DNS Mail Exchange Priority, Failover Routing & Verification Explained workflows?
MailVeri uses 100% pay-as-you-go Universal Credits that never expire: $9 for 10,000 credits, $59 for 100,000 credits, $299 for 1,000,000 credits, and $999 for 5,000,000 credits ($0.0002 per email—up to 90% cheaper than legacy verifiers). Every new account includes 1,000 free trial credits with no credit card required, and UNKNOWN responses cost 0 credits.
