Glossary/MX Record
Infrastructure

MX Record

A DNS record that tells senders which mail servers accept incoming email for a given domain and in what priority order.

What is an MX Record?

An MX record, short for Mail Exchanger, is a DNS record that specifies which mail servers are responsible for accepting incoming email for a domain. Each record includes a priority value, which tells sending servers which host to try first when delivering mail.

Why it matters

Without an MX record, no mail can reach your domain. MX records also matter to senders: validators check them to decide whether a domain can receive mail at all, and incorrect MX entries cause silent delivery failures. Sysadmins, DNS owners, and anyone migrating mail hosting must configure them correctly.

How it works

MX records are published alongside other DNS records for the domain. Each entry points at a hostname (not an IP) and includes a numeric priority where lower values are preferred.

acme.io. IN MX 10 mx1.mailhost.com.
acme.io. IN MX 20 mx2.mailhost.com.

When a sending server wants to deliver mail to [email protected], it queries DNS for the MX records, tries the lowest priority host first, and falls back to higher priorities on failure. If no MX record exists, some senders fall back to the domain's A record, but modern practice discourages this.

Examples

  • A Google Workspace customer with priority 1 at aspmx.l.google.com and backups at 5 and 10
  • A team migrating from one mail host to another by updating MX priorities over a TTL window
  • A validator checking MX presence before accepting a signup form submission

Best practices

  • Always publish at least two MX records for redundancy
  • Set a short TTL before a migration so changes propagate quickly
  • Point MX to hostnames, never directly to IP addresses
  • Verify MX records from an external resolver after any DNS change

FAQs

What does the priority number mean?

Lower priority is tried first. A host with priority 10 is preferred over one with priority 20. Same-priority hosts are load-balanced.

Can I have an MX record for a subdomain?

Yes, and it is common. Marketing senders often use a subdomain like mail.acme.io with its own MX and sending identity.

What happens if all MX hosts are unreachable?

The sending server queues the message and retries for up to several days before giving up with a delivery failure.

Start sending in minutes.

3,000 emails/month on the free tier. No credit card, no commitment.

Still wondering?

See what your favorite LLM has to say about us, then make an informed decision.