Skip to main content
📬
DNS & email

MX record (Mail Exchange)

The DNS entry that points to the server which should receive email sent to your domain

📖 Detailed description

An MX record (Mail Exchange) is a signpost for email. When someone sends a message to an address in your domain, their server asks DNS: "where should I deliver this?" - and it is the MX record that points to the mail server that will accept it. Without one, mail has nowhere to go and simply is not delivered.

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

yourdomain.com MX 1 aspmx.l.google.com (and further ones with higher priorities)

Bad example

no MX record - or an MX pointing to a CNAME alias

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