Glossary / DNS records

MX record

An MX record is a DNS record that names the mail server responsible for receiving email for a domain. Sending servers look it up before delivering a message to an address like jo@example.com. Each MX record has a priority number, and lower numbers are tried first.

Copy the syntax

Two MX records with a backup

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

Use the hostnames and priorities your email provider gives you.

Check it

dig example.com MX +short

Lists priority and server for each record.

Have a name in mind?

.com $24.99 first year, renews at $24.99/yr. Other endings: not on sale yet.

In plain English

An MX record tells the world which server receives email for your domain.

What to do

  • Copy the MX hostnames and priorities from your email provider.
  • Remove old MX records from your previous provider.
  • Send a test message once the TTL has passed.
How an email finds your mail serverMail delivery: the sender looks up example.com's MX records and delivers to the priority 10 server.1 · Sendto jo@example.comsender's server2 · Look upexample.com MXpriority 10 first3 · Delivermx1.example.netmessage accepted
The sending server asks DNS for MX records, then tries the lowest priority number first.
Defined in
RFC 1035, section 3.3.9Source: RFC 1035
Delivery rules
RFC 5321, section 5Source: RFC 5321
Type code
15Source: IANA
Target rule
Must be a hostname, not an IP or CNAMESource: RFC 2181
How do MX priority numbers work?

Senders try the record with the lowest number first. If that server does not answer, they move to the next number. Records with equal numbers share the load.

The numbers are relative, so 10 and 20 behave the same as 1 and 2.

Do I need an MX record for email?

Yes, to receive mail reliably on your domain. Without one, some senders fall back to the domain’s A record, which usually points at a web server that does not accept mail.

MX setups, with example values

Example hosts use documentation-only names (RFC 2606).
NamePriorityMail serverPurpose
@10mx1.example.net.Primary mail server
@20mx2.example.net.Backup
support10mx1.example.net.Mail for a subdomain

Questions about MX record

Can an MX record point to an IP address?

No. The value must be a hostname with its own A or AAAA record. RFC 2181 also rules out pointing an MX record at a CNAME.

How long do MX changes take?

As long as the old records’ TTL, often an hour. Mail sent in that window may still go to the old server, so keep it running until the switch settles.

Do MX records affect sending mail?

No. MX records control where mail to your domain arrives. Sending depends on your provider’s servers plus SPF, DKIM and DMARC records.

Can I have MX records with a website on another host?

Yes. Email and website records are separate, so your mail can live with one provider while your site lives with another.

Put it to work on your own domain

See the first-year and renewal price before you pay.

.com first year$24.99, renews $24.99Check a domain
↑