Every email you receive arrives because of an MX record. It's the signpost that tells the rest of the internet which servers handle mail for your domain. When MX records are right, mail flows; when they're wrong or missing, messages bounce or vanish. This guide explains how MX records work, what the priority numbers mean, and how to set them up and troubleshoot them.

What an MX record is

An MX (Mail Exchanger) record is a DNS entry that names the mail servers responsible for receiving email for your domain. When someone sends a message to an address at your domain, their mail server looks up your MX records and delivers to whichever server they point to. MX records only govern incoming mail — sending is handled separately and judged by SPF, DKIM, and DMARC.

Crucially, an MX record must point at a hostname that itself resolves to an IP address (via an A or AAAA record) — never at an IP directly, and never at a CNAME. Pointing MX at a CNAME violates the standard and some servers will reject it.

How priority works

A domain usually has several MX records, and each carries a priority number. The rule is simple: lower numbers are tried first. A sending server attempts the lowest-priority record, and only falls back to higher numbers if it can't connect.

  • Records with the same priority share the load roughly evenly (round-robin).
  • Records with higher numbers act as backups, used only when the primary is unreachable.
  • Only the relative order matters — 1 and 10 behave identically to 10 and 20.

Google Workspace, for example, publishes a single MX at a low priority; many other providers publish two or more across their infrastructure for redundancy. You generally don't need to add your own backup MX — managed providers handle that for you.

Why your MX points at someone else's domain

If you use a hosted email provider, your MX records point at their servers, not yours — and that's exactly right. Google Workspace points at hosts ending in google.com, Microsoft 365 at hosts ending in outlook.com, and so on. You're delegating mail handling to their infrastructure. Seeing an unfamiliar hostname in your MX records is normal; it's the fingerprint our MX lookup uses to detect your provider.

How to set up MX records

  1. Get the values from your provider. During email setup, the provider lists the exact MX hostnames and priorities to publish.
  2. Remove old MX records. Leftover entries from a previous host can route mail to the wrong place — delete them first.
  3. Add the new records at your DNS host exactly as given. Most providers also have you publish an SPF record and DKIM keys at the same time.
  4. Wait for the old TTL to expire, then verify. Re-run an MX lookup; when the listed servers match your provider's, incoming mail is routed correctly.

Common MX problems

No MX records. Some senders fall back to the domain's A record, but many won't — so a domain with no MX can't reliably receive mail. If you expect email, publish at least one MX.

MX pointing at a CNAME. The target must have an A/AAAA record, not be an alias. This is a frequent and easily-missed misconfiguration.

A mail server hostname that doesn't resolve. If the MX target has no IP, mail can't be delivered. An MX lookup flags any hostname that fails to resolve.

Stale records after a migration. Forgetting to remove the previous provider's MX is the classic cause of mail silently going to the old mailbox.

Check your MX records

The MX lookup shows every MX record sorted by priority, resolves each server to its IP with reverse DNS, and detects your mail provider. For how MX fits with the rest of email authentication, read SPF, DKIM & DMARC explained, and to understand the broader DNS picture, see DNS record types explained.