MX record (Mail Exchange)
The DNS entry that points to the server which should receive email sent to your domain
📖 Detailed description
How does MX work? An MX record does not contain an IP address, only a server name (for example aspmx.l.google.com), which resolves to an address separately through an A record. Each MX has a priority - a number where lower means more important. The sending server tries the lowest-priority server first; if it does not respond, it moves on to the next. This lets you keep a backup mail server that takes over when the primary one is down.
A common trap is confusing email with the website. The MX record handles email only, while the A record handles displaying the site. You can happily host your site with one provider and your email with another (such as Google Workspace or Microsoft 365) - you just set the MX records accordingly. After switching mail providers, updating the MX records is the single most common reason why "emails suddenly stopped arriving".
You can view which MX records and priorities your domain has in seconds with our free DNS Lookup tool at /dns.
Most common problems
No MX record
Mail has nowhere to go - messages sent to your domain are not delivered
Wrong priority
Traffic goes to a backup or inactive server first instead of the primary one
MX pointing to a CNAME
The standard forbids this - an MX must point to a name with an A record, not to an alias
Stale records after migration
After changing mail providers, an old MX sends mail to a place that no longer exists
How to fix it?
Set MX records per your mail provider's instructions (for example Google Workspace, Microsoft 365)
Assign priorities correctly - the lowest number is the primary server
Point MX to a host name that has an A record, never to a CNAME
After migrating mail, remove old MX records to avoid losing messages
Remember: MX is email, the A record is the website - two independent things
Examples
Good example
Bad example
🔗 Related indicators
SPF record (Sender Policy Framework)
A list of servers allowed to send email on behalf of your domain - the foundation of anti-spoofing protection
DMARC record
The rule that tells servers what to do with mail that fails SPF and DKIM checks
DKIM signature (DomainKeys Identified Mail)
A digital seal attached to every email - proof that the content was not altered in transit
Check this indicator for your website
Get a detailed analysis and personalized tips on how to improve this element on your website.
Start free analysis