
What Is an MX Record? Email Routing Explained Simply
An MX record (Mail Exchanger record) is a DNS resource entry that tells the internet which mail server is authorized to accept incoming email for your domain name.
When someone sends an email to an address on your domain, the sending system does not look up where your website is hosted. Instead, it queries public DNS records specifically for your MX entries to find the exact destination mail server. Without an MX record, sending servers have no delivery instructions, and every incoming message sent to your domain will immediately bounce back as undeliverable.
How MX Records Work: The Mail Delivery Sequence
When a sender clicks "Send," the transmission process relies on a predictable, automated DNS lookup sequence:
- Initiation: The sender's mail server receives an outgoing email addressed to an inbox at your domain.
- DNS Query: The sending server extracts the recipient's domain name and issues a DNS query specifically requesting the domain's MX records.
- Lookup Response: The authoritative DNS server returns a list of assigned mail server hostnames along with their numerical priority values.
- Connection: The sending mail server attempts an SMTP connection to the destination server with the lowest priority number (the primary server).
- Handoff: Once the connection is established, the sending server hands off the message payload, which the receiving mail host places into the target inbox.
If the primary mail server is offline, unreachable, or unresponsive, the sending mail server automatically falls back to the secondary or backup server specified in the MX record list.
The Anatomy of an MX Record
An MX record contains five core parameters inside your DNS zone file. Unlike A or AAAA records, which map domain names directly to numeric IP addresses, MX records must always point to another host domain name (a Fully Qualified Domain Name, or FQDN).
Hostname (Name or Host)
This specifies which domain or subdomain the record applies to. In almost all standard email setups, this field is set to @ or left blank to indicate that it governs the primary root domain.
Record Type
This defines the DNS entry type. For email routing, this is always set to MX.
Target (Points To, Destination, or Value)
This is the server domain name designated to handle incoming messages. For example, domains using Google Workspace route their incoming mail to Google's primary host, ASPMX.L.GOOGLE.COM.
Priority (Preference)
A numerical value assigned to determine the preference order when multiple receiving mail servers are published. Lower numerical values indicate higher delivery priority.
TTL (Time To Live)
The duration, measured in seconds, that intermediate DNS servers across the web cache the record before querying authoritative nameservers for updates. Common standard TTL settings range from 3600 seconds (1 hour) to 86400 seconds (24 hours).
MX Record Configuration Examples
DNS management interfaces display MX entries line by line. Below is an example of a standard multi-server configuration designed for high availability and automatic failover.
Primary Mail Host
Host: @
Type: MX
Destination: ASPMX.L.GOOGLE.COM
Priority: 1
TTL: 3600
Secondary Backup Host
Host: @
Type: MX
Destination: ALT1.ASPMX.L.GOOGLE.COM
Priority: 5
TTL: 3600
Tertiary Backup Host
Host: @
Type: MX
Destination: ALT2.ASPMX.L.GOOGLE.COM
Priority: 10
TTL: 3600
In this configuration, external mail transfer agents always attempt delivery to ASPMX.L.GOOGLE.COM first because it holds the lowest priority number (1). If that server fails to answer, the sender falls back to ALT1.ASPMX.L.GOOGLE.COM (5), followed by ALT2.ASPMX.L.GOOGLE.COM (10).
Priority Numbers and Load Balancing
Priority values give domain administrators full control over mail redundancy and traffic management.
Redundancy and Failover
If your primary receiving host goes offline for software updates or suffers a temporary network outage, backup MX records prevent messages from bouncing. Sending mail servers hold undelivered messages in their outbound queue while attempting delivery to secondary target hosts. Once your primary server recovers, receiving servers sync incoming queues automatically.
Round-Robin Load Balancing
If two or more MX records share the exact same priority value—such as two distinct host entries set to priority 10—sending mail servers distribute incoming connection requests between them. This creates a basic round-robin load distribution system across receiving infrastructure.
What an MX Record Does NOT Do
To prevent DNS misconfigurations, it is essential to understand the technical boundaries of MX records.
1. MX Records Do Not Authenticate Outbound Mail
An MX record only tells other servers where to deliver incoming mail. It does not prove that an outbound email originating from your domain is legitimate. Outbound sender authorization relies on an SPF record, which defines authorized sending IP addresses, alongside DKIM and DMARC protocols.
2. MX Records Cannot Point Directly to IP Addresses
Under official internet engineering standards (RFC 2181), an MX record destination field must contain a domain hostname, never an IPv4 or IPv6 address. That hostname must resolve through its own A or AAAA record to point to an underlying IP address.
3. MX Records Do Not Store Mail or Manage Inboxes
An MX record is simply a direction sign in a public registry. It contains no storage capacity, inbox management capabilities, or user account data. Physical message storage, inbox indexing, and server-side spam filtering occur entirely on the mail server hardware specified by the record.
4. MX Records Do Not Guarantee Inbox Delivery
Publishing valid MX records ensures external servers can locate your receiving host, but it does not bypass spam filters if your sending IP appears on a global email blacklist.
When Should You Modify MX Records?
Updating MX records incorrectly can instantly halt all incoming business communications. Understanding when to make changes protects your domain from unexpected downtime.
Scenarios Requiring MX Record Changes
- Migrating Email Providers: When moving inbox hosting to a new provider (such as transitioning from a basic web hosting panel to Google Workspace or Microsoft 365), you must update your MX records to point to your new provider's infrastructure.
- Activating Custom Domain Email: Newly registered domains carry no MX records by default. You must manually add your provider's MX parameters to begin receiving mail.
- Adding Security or Spam Filtering Services: Secure email gateways and cloud spam filters require you to route your MX records through their inspection servers first before messages are clean-forwarded to your underlying inbox server.
Scenarios Where MX Records Must Remain Unchanged
- Switching Web Hosting Providers: Updating your website hosting server only requires changing your A or CNAME records. Modifying MX records during a web hosting migration will break your active email setup.
- Changing Domain Registrars: Transferring domain registration management between registrars requires copying existing DNS records intact so incoming email flow remains uninterrupted.
How to Check Any Domain's MX Records
You can inspect active MX records for any public domain using command-line tools or web-based lookups.
Command-Line Inspection
Command-line utilities query DNS resolvers directly from your local terminal.
On Windows (Command Prompt):
nslookup -type=mx google.com
On macOS or Linux (Terminal):
dig google.com MX
These queries return the active hostnames, priority rankings, and TTL parameters currently published by authoritative nameservers.
Web-Based Diagnostics
For instant visual verification, use our dedicated MX record lookup tool. It evaluates active receiving hostnames, checks priority structures, and verifies host reachability in real time.
For a comprehensive domain audit covering delivery and security policies, see our complete guide on how to check SPF, DKIM, and DMARC records.
Disposable Email Infrastructure and MX Routing
MX records play a crucial role in how temporary mail platforms receive messages reliably without long-term storage overhead.
When testing registration forms, verifying software workflows, or avoiding unwanted marketing campaigns, users rely on disposable inbox platforms to handle short-lived communications. Services like Best-TempMail operate clean, active custom domains backed by automated DNS routing. When an external system transmits a verification message to a temporary address, public DNS routes that payload to the platform's active mail host. The receiving host processes the incoming SMTP handoff and pushes the email contents straight to the active user session without storing persistent user account logs.
Recommended Solution for Verification and Testing
For developers building signup authentication flows or users protecting their personal inboxes from unwanted promotions, using a managed disposable mail service eliminates the overhead of managing dedicated test domains and custom server configurations.
Best-TempMail provides instant, anonymous email addresses directly in your browser with zero registration required. The service delivers live inbox updates, features browser extensions for major platforms, and offers nearly 80 free network and domain management utilities under our full suite of email tools.
Frequently Asked Questions
What happens if a domain has no MX record set up?
When a domain lacks MX records, sending mail servers attempt a legacy fallback mechanism by querying the domain's primary A record to check if a mail server exists on that website IP. However, this fallback behavior is unreliable and largely obsolete across modern mail security systems. In practice, sending an email to a domain without an MX record results in an immediate bounce notification.
Is a lower priority number better in an MX record?
Yes. MX record priority operates in ascending order. A record assigned a priority value of 0 or 1 is treated as the primary, preferred destination server. Higher numbers (such as 10, 20, or 50) are treated as lower-priority backup or fallback hosts.
Can I point an MX record directly to an IP address?
No. Internet engineering standards strictly mandate that MX record destination fields contain a valid domain hostname (FQDN). That hostname must resolve separately via an A or AAAA record to an underlying IPv4 or IPv6 address.
How long do MX record updates take to propagate globally?
Propagation times depend on the Time To Live (TTL) set on your previous DNS records. While updates publish to authoritative nameservers almost instantly, recursive DNS resolvers across the web cache previous records until the TTL duration expires. Global MX propagation typically completes within 1 to 24 hours.
Does updating my domain's MX records delete existing emails?
No. Modifying an MX record only alters the destination path for future incoming messages. It does not modify, delete, or relocate existing messages stored on your previous mail provider's physical servers. To preserve historic email data when switching providers, export your inbox files prior to shutting down your old host account.
Your temp mail is ready right now
No signup, no password. A disposable inbox waiting the moment you open the page.
Get My Free Temp Mail →