Definition
An MX record is a type of DNS record that directs email to the servers that handle incoming mail for a domain. When someone sends an email to user@example.com, the sending server looks up the MX record for example.com to find the IP address of the mail server that should receive the message. Without a properly configured MX record, email cannot be delivered to a domain.
MX records work alongside other DNS records like A records (which map domain names to IP addresses) and TXT records (which hold SPF, DKIM, and DMARC configuration). Each MX record has a priority value that determines the order in which mail servers should be tried. Lower priority numbers are preferred, and higher numbers serve as fallback servers if the primary is unavailable.
How It Works
An MX record contains two key pieces of information: the hostname of the mail server and a priority number. For example, 10 mail.example.com means that mail.example.com has a priority of 10. If you have multiple MX records, the sending server tries the lowest priority record first. If that server is unreachable, it tries the next lowest, and so on. This provides redundancy for email delivery.
When configuring MX records, you point them to the hostname of your email provider's mail servers, not directly to an IP address. For Google Workspace, the MX record points to something like aspmx.l.google.com. For Microsoft 365, it points to mail.protection.outlook.com. The email provider supplies the exact MX record values you need to add to your domain's DNS configuration.
Best Practices
Always have at least two MX records with different priority values to ensure redundancy if the primary server goes down. Use descriptive hostnames for your MX records rather than bare IP addresses. Monitor your MX record configuration with DNS lookup tools to ensure they resolve correctly. Set the TTL (time to live) appropriately, typically 300 to 3600 seconds, so DNS changes propagate quickly when needed. If you change email providers, update your MX records during low-traffic periods and keep the old records in place during transition. Verify that your MX records are consistent with your SPF record, which should authorize the same servers to send email for your domain.
Related Glossary Terms
Email Bandwidth
Email sending bandwidth and throughput refer to the rate at which emails can be delivered, typically 100-500 emails/second per IP. Bandwidth planning ensures campaigns complete within desired delivery windows.
Email BIMI VMC
BIMI Verified Mark Certificate (VMC) certifies brand logo ownership for display in supporting email clients. VMCs cost £1,500-2,000+ per year per logo and require DMARC reject or quarantine policy plus SVG logo format.
Email Blacklist
An email blacklist (DNSBL) is a real-time database of IP addresses or domains known for sending spam or unwanted email.
Email Bulkhead
Email bulkhead pattern isolates transactional emails from marketing sends using separate IPs, subdomains, and servers. This protects critical deliverability and prevents marketing issues from affecting essential transactional messages.
Email DANE
DANE (DNS-based Authentication of Named Entities) uses TLSA records to authenticate STARTTLS connections for SMTP, preventing TLS downgrade and man-in-the-middle attacks. It requires DNSSEC to function securely.
Email DKIM Selector
DKIM selector management involves rotating signing keys across named selectors (default, s1, s2, 2024). Multi-selector strategies allow zero-downtime key rotation every 6-12 months for ongoing email authentication.
Frequently Asked Questions
Email sent to your domain will typically bounce with a "no mail server for domain" error. Some sending servers may fall back to an A record lookup if no MX record exists, but this is not guaranteed and not recommended as a delivery strategy.
The priority is a number that determines the order mail servers are tried. Lower numbers are preferred. For example, priority 10 is tried before priority 20. If the priority 10 server is down, the sending server tries priority 20. Priority values do not imply load balancing equal distribution.
Yes. If you have multiple MX records with the same priority, sending servers will distribute email across them in a round-robin fashion. This provides load balancing. Combining same-priority records with different-priority backup records is a common configuration.
Changes take effect according to the TTL value set on the record. Common TTLs range from 300 seconds (5 minutes) to 86400 seconds (24 hours). The TTL tells DNS resolvers how long to cache the record before checking for an update.
No. The MX record determines where incoming email is delivered. To send email, you need DNS records like SPF, DKIM, and DMARC. You also need a properly configured mail server or ESP that handles outbound delivery. MX records are only for receiving mail.