Skip to content

MX Record

An MX record identifies the mail servers responsible for receiving email for a domain.

An MX, or Mail Exchange, record identifies the mail servers responsible for receiving email for a domain.

MX records affect email delivery rather than ordinary website traffic.

What It Means in Practice

Suppose a business uses:

hello@example.com

The domain's MX records tell sending mail systems which provider should receive messages addressed to that domain.

Cloudflare's DNS setup documentation shows MX records alongside other email-related DNS records used to route and authenticate mail. Cloudflare's email DNS examples

Example

A simplified record might look like:

Type: MX
Name: example.com
Server: mail.example-provider.com
Priority: 10

Several MX records can exist with different priorities.

MX Record vs. Website Hosting

Website hosting and email hosting are often completely separate.

For example:

A record
→ website host

MX record
→ email provider

Changing website hosting should therefore not require changing MX records unless the email service is changing too.

Why It Matters

Accidentally deleting or changing MX records can interrupt incoming email even while the website continues to work normally.

This is one of the main risks when moving DNS providers or nameservers.

Email configuration frequently also uses TXT Records for standards such as:

  • SPF
  • DKIM
  • DMARC

Those records help with email authentication and anti-spoofing controls.

Common Problems

Common problems include:

  • MX records lost during DNS migration
  • Email assumed to be hosted with the website
  • Old mail provider records left behind
  • Incorrect priority
  • New provider configured before old system migration is ready
  • Testing only the website after a nameserver change

How to Improve

Before changing DNS or nameservers:

  1. Document current MX records
  2. Identify the email provider
  3. Record associated TXT records
  4. Verify the complete mail configuration at the new DNS provider
  5. Test incoming and outgoing email after the change