MX
Mail Exchanger
The MX record tells the internet which servers accept email for your domain. Learn format, priority values, redundancy, and common mistakes.
Record Type
MX
Category
Email Delivery
Email Delivery
RFC
RFC 5321
RFC 5321
Email Relevant
Yes
Yes
Format
MX <priority> <hostname>
Example
MX 10 mail.example.com.
TTL Guidance
3600–86400 s recommended; lower (300 s) only during migrations
3600–86400 s recommended; lower (300 s) only during migrations
💬 What This Record Does
When someone sends you an email, their mail server looks up your domain's MX records to find out where to deliver the message. MX records point to hostnames (never IP addresses), and each has a priority number: the lower the number, the higher the preference. Multiple MX records provide redundancy: if the primary is unreachable, delivery falls back to the next priority host.
Common Uses
- Receiving email for your domain via a cloud provider (Google Workspace, Microsoft 365)
- Setting up a backup MX host for redundancy
- Declaring a null MX (priority 0, target ".") for domains that intentionally receive no email (RFC 7505)
⚠️ Watch Out For
- MX records must point to hostnames with A/AAAA records — never directly to an IP address.
- Two hosts with the same priority are tried randomly (load balancing). Different priorities create a failover order.
- Changing MX records takes effect after the old TTL expires — plan migrations accordingly.