DNS for email

What is an MX record?

An MX record tells the internet which servers accept email for a domain, and in which order to try them. Here is how it works, what the priority number means and which mistakes stop mail from arriving.

Updated October 9, 2026 · 6 min read

MX records for example.org: priority 10 is tried first, priority 20 is the backup

An MX record (mail exchange record) is the DNS entry that names the servers accepting email for a domain. When someone sends a message to jane@example.org, their mail server looks up the MX records of example.org, picks the server with the best priority and delivers the message there. Without a working MX record, a domain can’t reliably receive email.

example.org.  3600  IN  MX  10 mx1.example.org.
example.org.  3600  IN  MX  20 mx2.example.org.

What an MX record is

The format goes back to RFC 1035, section 3.3.9, which defines two fields:

In a DNS zone, each MX record has the usual columns: the domain it belongs to, the time to live (TTL) in seconds, the class IN, the type MX, and then preference and host. The host needs its own address record:

example.org.       3600  IN  MX    10 mx1.example.org.
mx1.example.org.   3600  IN  A     192.0.2.10
mx1.example.org.   3600  IN  AAAA  2001:db8::10

The MX record only covers receiving. Which servers may send for the domain is a separate question, answered by the SPF record.

What senders do with it

A sending server takes the domain after the @, asks DNS for its MX records and connects to the hosts in order of preference. If the domain has no MX record at all, SMTP falls back to the domain’s own A or AAAA record and tries to deliver there (RFC 7505, section 1, referring to RFC 5321). That fallback is why a domain with only a website can still receive delivery attempts, and why domains that never take mail should say so with a null MX (below).

Email verification starts with the same lookup: an address on a domain without usable MX records can’t receive mail, which is what the mx_found field and the invalid_mx reason of the email validation API report. Our guide on how to check if an email exists covers the steps that follow.

MX record priority explained

The preference number is relative: lower values are preferred (RFC 1035). A sender tries the host with the lowest number first and moves to the next one when it can’t connect.

RecordWhat happens
MX 10 mx1.example.org.Tried first.
MX 20 mx2.example.org.Tried if mx1 doesn’t answer.
MX 30 backup.example.net.Tried last.

A few rules of thumb:

MX record examples: Google Workspace, Microsoft 365, Zoho

Values from each provider’s documentation, checked October 9, 2026. Always copy the exact values your admin console shows; they can differ by account or region.

ProviderMX hostPrioritySource
Google Workspacesmtp.google.com1Google: Set up MX records
Microsoft 365<MX token>.mail.protection.outlook.comlower than any other MX recordMicrosoft: External DNS records
Zoho Mailmx.zoho.com, mx2.zoho.com, mx3.zoho.com10, 20, 50Zoho: Configure email delivery

As zone records:

; Google Workspace
example.com.  3600  IN  MX  1  smtp.google.com.

; Microsoft 365 (your MX token is shown in the Microsoft 365 admin center)
example.com.  3600  IN  MX  1  example-com.mail.protection.outlook.com.

; Zoho Mail (generic values from Zoho's help page; the domain ending depends on your data center)
example.com.  3600  IN  MX  10 mx.zoho.com.
example.com.  3600  IN  MX  20 mx2.zoho.com.
example.com.  3600  IN  MX  50 mx3.zoho.com.

Notes from the providers:

MX hosts for more than 100 other providers are on the email server settings pages, for example Microsoft 365 and Zoho.

Null MX: domains that receive no email (RFC 7505)

A domain that never receives email should publish a null MX: a single MX record with preference 0 and a lone dot as the host (RFC 7505, section 3).

example.com.  IN  MX  0 .

It must be the only MX record of the domain. Without it, senders fall back to the domain’s A record and, if nothing answers there, retry “for a long period, typically a week” before the sender hears that the address doesn’t work. With a null MX, delivery fails immediately: RFC 7505 recommends the reply 556 5.1.10 for a recipient domain with a null MX, and 550 5.7.27 when a receiving server rejects mail whose sender domain publishes one.

example.com itself is a live example: its MX lookup returns exactly 0 . (checked October 9, 2026), because the domain is reserved for documentation and accepts no mail. For a domain that also sends no mail, combine the null MX with v=spf1 -all and a DMARC record with p=reject; see what is a DMARC record.

Common MX record mistakes

MistakeWhy it breaksFix
MX points to an IP address, such as MX 10 192.0.2.10The target must be a domain name (RFC 1035). Many DNS hosts refuse the entry; others store it as a host name that doesn’t resolve.Create mail.example.com with an A record and point the MX record there.
MX points to a CNAMERFC 2181 says the target “must not be an alias” (section 10.3). Lookups need extra queries and can fail.Point the MX record to the canonical host name.
Missing trailing dot in a zone file: MX 10 mx1.example.orgNames without a final dot are relative, so the zone’s origin is appended: mx1.example.org.example.org (RFC 1035, section 5.1).End host names with a dot. Web DNS forms usually handle this for you.
Old provider’s MX records left in placeSome mail still goes to the old servers.Delete them when you switch provider.
No MX record, website on the A recordSenders try to deliver to the web server and retry for days.Publish the correct MX records, or a null MX.
MX host without an A or AAAA recordSenders find no address to connect to.Add the address record for the host.

Look up your MX records

Enter a domain to see its MX records in order of priority, their TTL and the email provider behind them:

Live DNS lookup over DNS-over-HTTPS. You can also paste an email address.

The same check runs on the MX lookup page, next to the MX values of popular providers for comparison. On the command line, dig and nslookup show the same data:

dig MX example.com +short
nslookup -type=mx example.com

Seeing the right MX records means mail can reach the domain. Whether a particular mailbox on it exists is a different check: the email checker tests that, live and free.

Frequently asked questions

What is an MX record?

A mail exchange record: a DNS entry that names a server accepting email for a domain, together with a preference number. A domain usually has one or more, for example example.com MX 10 mx1.example.com. Sending servers look them up to know where to deliver.

What does MX priority mean?

The preference number in each MX record. Senders try the server with the lowest number first and use higher numbers as fallbacks (RFC 1035: lower values are preferred). Records with the same number are equally preferred.

Can an MX record point to an IP address?

No. The target of an MX record must be a host name, and that name must have its own A or AAAA record. It must not be a CNAME either (RFC 2181). Create a name such as mail.example.com with an A record and point the MX record to it.

What happens if a domain has no MX record?

Senders fall back to the domain's A or AAAA record and try to deliver there. If nothing accepts mail at that address, they retry for a long time, typically about a week, before giving up. Domains that never receive mail should publish a null MX instead.

Email validation API

Validate emails in your app

emailvalidation.io checks syntax, MX records and the mailbox over SMTP, flags disposable, role and free addresses and returns a quality score, in one request.

/v1/info Email validation API Read the documentation

100 free validations every month. No credit card required.

GET https://api.emailvalidation.io/v1/info?email=support@emailvalidation.io

{
  "email": "support@emailvalidation.io",
  "user": "support",
  "tag": "",
  "domain": "emailvalidation.io",
  "format_valid": true,
  "mx_found": true,
  "smtp_check": true,
  "catch_all": null,
  "role": true,
  "disposable": false,
  "free": false,
  "score": 0.64,
  "state": "deliverable",
  "reason": "valid_mailbox",
  "did_you_mean": ""
}

Keep reading

Start using our email validation software today!

Get 100 validations per month for free