What is an MX record and how does it work?

Updated October 2026 · How we answer

Short answerAn MX (Mail Exchange) record tells the internet which servers accept email for your domain. Each MX record has a priority number; lower numbers are tried first.

How MX records route mail

When someone sends you an email, their mail server looks up the MX records for your domain. It then connects to the highest-priority server (the lowest number) and tries to deliver the message there.

If that server is unreachable, the sender tries the next priority in order. This is why providers often publish two or more MX records with different priorities.

MX records must point to a hostname, not an IP address. That hostname then resolves to an A or AAAA record.

Priorities and common setups

Priority values are arbitrary but relative. A common setup uses 10 for the primary and 20 for a backup. Some providers use 1 and 5, or 10 and 20.

If you use a single provider, you normally copy exactly the MX records they list. Mixing providers can cause mail to split unpredictably between them.

MX records only handle incoming mail. Outgoing mail depends on SPF, DKIM, and DMARC, not MX.

  • Google Workspace: single MX record, priority 1
  • Microsoft 365: one MX record, priority 0
  • Zoho: multiple MX records with priorities 10, 20, 50
  • Backup MX: a second server with a higher number
  • Null MX: a single record of "." to reject all mail

Common mistakes

  • Pointing an MX record at an IP address instead of a hostname — this is invalid and mail will fail.
  • Using the same priority for every MX record, which makes delivery order random.
  • Deleting MX records when switching providers before the new ones are active, causing a gap in incoming mail.
From our shopsPhoneCasesForAll: 50,000+ aesthetic cases — Y2K, coquette, cottagecore and more.