Skip to main content

DNS Basics

MX Records Explained: How Your Domain's Email Gets Routed

Understand how MX records and their priority values decide which server receives your domain's inbound email.

0-65535

Valid range for MX priority values

1+

MX records a domain can publish

24/7

Human support for DNS record checks

Free

DNS management included with hosting

In short

An MX (Mail Exchange) record is a DNS entry that tells the internet which mail server should receive email for your domain. Each MX record has a priority value (lower numbers are tried first), so a domain can list a primary mail server and one or more backups that only receive mail if the primary is unreachable.

Without a correctly configured MX record, or with one pointing at the wrong server, mail addressed to your domain either bounces or is silently misdirected, which is why MX errors are among the most common causes of a domain suddenly 'not receiving email'.

Every domain that receives email relies on MX records to tell sending servers where to deliver it — your domain's A record, which points web browsers to your website, plays no part in this. When someone sends mail to you@yourdomain.com, their mail server looks up the MX records for yourdomain.com first, not the website's IP address, which is a common source of confusion when troubleshooting.

Understanding how MX records and their priority values actually work makes it far easier to diagnose problems like mail going to the wrong server, a migration that stopped working, or delivery failures after a hosting change. This guide breaks down the anatomy of an MX record and the mistakes that most often break it.

The Anatomy of an MX Record

An MX record has three core parts: the domain (or subdomain) it applies to, a priority value, and the hostname of the mail server that should receive mail for that domain. For example, an MX record for yourdomain.com might point to mail.yourdomain.com with a priority of 0, meaning sending servers should try that host first when delivering mail to any address at your domain.

Unlike an A record, an MX record's value must always be a hostname, never a bare IP address — that hostname then needs its own A record resolving to the actual server. This two-step lookup (MX to hostname, hostname to IP) is a common place misconfigurations creep in, particularly when a hostname is retired or repointed without updating the MX record that still refers to it.

How Priority Values Decide Delivery Order

When a domain has multiple MX records, each carries a priority number, and sending mail servers always attempt delivery to the lowest number first. If that server doesn't respond, they fall back to the next-lowest priority value, and so on, which is how businesses set up backup mail servers that only activate during an outage of the primary. A domain with a single MX record commonly uses a priority of 0 or 10, since the exact number only matters relative to other MX records for the same domain.

It's a common myth that a lower priority number means 'less important' — it's the opposite: priority 0 is tried before priority 10, making it the primary, preferred server. Some hosting providers add a secondary MX record automatically as a spam-filtering or backup layer, so it's worth checking all MX records for a domain, not just the first one you find, when troubleshooting delivery.

Common MX Record Misconfigurations

The most frequent MX problem is a leftover record from a previous host: after migrating email, the old provider's MX record is never removed, so mail alternates unpredictably between the old and new servers depending on which record a given sender's mail system happens to try first. Another frequent mistake is pointing an MX record directly at an IP address or a CNAME target, both of which violate the DNS standard and cause unpredictable delivery failures with many mail systems.

A third common issue is forgetting that MX records are domain-wide, so if you use different mail providers for a main domain and a subdomain, each needs its own correctly scoped MX records — subdomains don't automatically inherit the parent domain's mail routing unless explicitly configured to do so.

Checking and Testing Your MX Records

You can check a domain's current MX records with a command-line lookup tool (like a dig or nslookup query for MX records) or any online MX lookup tool, which will list every record along with its priority and confirm whether the target hostname itself correctly resolves to an IP. This is the first step whenever email seems to have stopped arriving after any hosting or DNS change.

After changing an MX record, remember that DNS propagation isn't instant — other mail servers cache the previous value for a period defined by the record's TTL, which can range from minutes to 48 hours depending on your prior settings. If you're planning a change, lowering the TTL a few days in advance makes the eventual cutover far faster and more predictable.

What Is an MX Record? Email DNS Explained

MX Records Made Simple in the Control Panel

Every Hosting Cheap plan includes a Zone Editor in the cPanel-style control panel where MX records — along with A, CNAME, and TXT records — can be added, edited, or reordered by priority without needing to understand raw DNS zone file syntax.

If an MX record ever looks wrong or mail stops arriving after a change, our 24/7 human support team can review your zone file and correct priority values or hostnames directly.

  • Zone Editor manages MX records alongside A, CNAME, and TXT
  • Priority values are editable without touching raw zone files
  • 24/7 human support for MX and DNS troubleshooting
  • Free DNS management included with every hosting plan

Why Hosting Cheap

What you get

Visual Zone Editor

Add, edit, or delete MX records through a simple interface, not raw text files.

Multiple MX support

Configure primary and backup mail servers with distinct priority values.

Fast propagation tools

Adjust TTL values directly to speed up future MX record changes.

24/7 support

Get help diagnosing MX errors any time mail delivery seems wrong.

Free SSL

Auto-renewing SSL secures the mail servers your MX records point to.

Daily backups

DNS zone configurations are included in your regular account backups.

How It Works

Get set up in a few steps

1

Look up your current MX records

Use a DNS lookup tool to see every MX record and its priority for your domain.

2

Correct the hostname and priority

Point MX records at valid mail server hostnames with sensible priority values.

3

Test and confirm delivery

Send test mail from an external account and recheck records after any change.

Included

Everything you need, on every plan

  • Confirm which mail server hostname each MX record points to
  • Verify priority values reflect the intended primary and backup order
  • Check that MX targets are hostnames, never bare IP addresses
  • Remove leftover MX records from any previous email provider
  • Confirm the MX target hostname has its own valid A record
  • Check subdomains have their own MX records if they use separate mail
  • Lower TTL in advance of any planned MX record change
  • Re-test delivery after propagation completes

FAQ

Frequently asked questions

What is an MX record in simple terms?

An MX record is the DNS entry that tells other mail servers which computer should receive email for your domain. It's separate from the A record that points your website to a server, which is why changing web hosting doesn't automatically affect email.

What does MX priority mean?

Priority is a number that decides delivery order when a domain has more than one MX record — the lowest number is tried first, with higher numbers used only as fallbacks if the preferred server doesn't respond.

Can an MX record point to an IP address?

No, an MX record must always point to a hostname, which in turn needs its own A record resolving to an IP address. Pointing an MX record directly at an IP violates the DNS standard and causes unreliable delivery.

Why is my email not arriving after changing hosts?

The most common cause is a leftover MX record from the previous provider that was never removed, or a new MX record that hasn't fully propagated yet. Checking current MX records with a lookup tool usually reveals which is the case.

Do subdomains need their own MX records?

Yes, if a subdomain uses a different mail service than the main domain, it needs its own MX records — mail routing isn't automatically inherited from the parent domain.

How do I add or edit an MX record?

Use your host's DNS Zone Editor (typically found in cPanel) to add, edit, or reorder MX records by priority, specifying the domain, priority value, and destination mail server hostname.

Get MX Records Right the First Time

Manage MX, A, CNAME, and TXT records from one simple Zone Editor with 24/7 support.

Get Started