MX record

A DNS record that tells the world where to deliver email for a domain. Has a priority number; multiple MXs for failover.

An MX (Mail eXchanger) record points senders at the mail server for a domain. Without an MX record, mail to you@example.com has nowhere to go.

example.com.   MX   10 mail1.example.com.
example.com.   MX   20 mail2.example.com.

The number is the priority. Lower = preferred. Senders try the lowest first, fall back if it's unreachable.

What it controls

Just where mail is delivered. Doesn't control authentication (SPF, DKIM, DMARC handle that). Doesn't control how mail leaves your domain.

Common MX patterns

  • Google Workspace: aspmx.l.google.com family at priorities 1, 5, 5, 10, 10.
  • Microsoft 365: <tenant>.mail.protection.outlook.com.
  • Self-hosted: your own mail server's hostname.
  • Disable mail: MX 0 . (a single dot) explicitly says "this domain doesn't accept mail." Useful for domains that should only host websites.

Why MX matters for custom domains in SaaS

A customer adding acme.com to your SaaS as a custom domain shouldn't accidentally break their email. The most common foot-gun: putting a CNAME at acme.com (the apex). CNAMEs at the apex are illegal AND override MX records, so even if their DNS provider allows the CNAME via flattening, email might break.

Tell customers to use www.acme.com or a subdomain (app.acme.com), not the apex.

Want this handled for you? Start free with Domainee — 50 custom domains + 100 GB bandwidth, no card.