Glossary

What is an MX record?

Short answer

An MX (mail exchanger) record is a DNS record that names the server that receives email for a domain, along with a priority number. When someone sends mail to you@example.com, their server looks up the MX records for example.com and delivers to the host with the lowest number first, trying the others if it is unavailable. MX records control receiving, not sending.

Last checked 16 November 2026

An MX record, short for mail exchanger, is the DNS record that tells the world which servers receive email for a domain. Each MX record has a hostname and a priority number. When a mail server needs to deliver a message to sam@example.com, it looks up the MX records for example.com and connects to the listed host over SMTP.

How MX records work

  1. A sending server gets a message for sam@example.com.
  2. It queries DNS for example.com type MX.
  3. It sorts the answers by priority. Per RFC 5321 section 5.1, lower numbers are more preferred.
  4. It looks up the A or AAAA record of the chosen host and opens an SMTP connection.
  5. If that host is down, it tries the next one, and keeps retrying for a while if all fail.

If a domain has no MX records at all, RFC 5321 says senders treat the domain’s own address record as an implicit MX. If a domain wants to say “we accept no email”, it publishes a null MX (RFC 7505).

MX record examples

A domain using Google Workspace for its team mailboxes:

example.com.   MX   1   smtp.google.com.

A domain with a primary and a backup server:

example.com.   MX   10  mx1.example.net.
example.com.   MX   20  mx2.example.net.

A subdomain whose mail goes to an app through an inbound email service, leaving the main domain’s mailboxes untouched:

reply.example.com.   MX   10  inbound-smtp.us-east-1.amazonaws.com.

A domain that never receives mail:

noreply.example.com.   MX   0   .

Why it matters for app email

MX records matter for app email in two ways. First, receiving: if you want your app to handle replies, the MX of a subdomain is the switch that routes them to your code. Second, bouncing: your envelope sender, the Return-Path, is often a subdomain like send.example.com with its own MX, so that bounce reports have a server to land on. Some receivers are also wary of mail from domains that could never accept a reply.

Common mistakes

  • Changing the root domain’s MX for an app feature and cutting off everyone’s inbox. Use a subdomain.
  • Pointing MX at an IP address or a CNAME. It must be a hostname with A or AAAA records.
  • Adding the domain twice, ending up with mx.example.com.example.com because the DNS host appends the zone.
  • Mixing a null MX with other MX records, which RFC 7505 forbids.
  • Leaving old MX records from a previous provider, so some mail goes to a server nobody checks.

Look up any domain’s MX records with our tools.

How Mailcandor handles it

Mailcandor uses a bounce MX on send.<domain> for outbound mail, and for inbound you point a domain’s MX at inbound-smtp.us-east-1.amazonaws.com.

Questions

What does MX stand for?

Mail exchanger. The record type is defined in DNS and its use for mail routing is described in RFC 5321.

Does a lower MX priority number win?

Yes. Lower numbers are preferred. A server tries the host with priority 10 before the one with priority 20.

Do I need an MX record to send email?

Not to send, but many receivers check that the sending domain or its envelope sender domain can receive mail, and bounces need somewhere to go. Email providers often ask for an MX on the bounce subdomain for this reason.

Can an MX record point to an IP address?

No. It must point to a hostname, which in turn has A or AAAA records. It also must not point to a CNAME.

Related

Send with someone on your side.

Unlimited domains on every plan, a person before any block, and 3,000 emails a month free. Tell us what you send and we set you up within one business day.