Glossary

MX record

A DNS record naming the mail server that receives email for a domain, with a priority number.

In plain English The domain setting that tells the world where to deliver your email.

An MX record (mail exchanger) tells other mail servers where to deliver email for a domain. When someone sends a message to you@example.com, their mail server looks up the MX records for example.com and delivers to the server named there. MX records only affect incoming mail, not the website.

What it looks like

NameTypePriorityValue
@MX10mx1.mailprovider.example.
@MX20mx2.mailprovider.example.

The priority number decides the order: lower is tried first. Equal numbers share the load. If the first server is unavailable, senders try the next. Check a domain’s MX records with:

dig example.com MX +short

Rules and common mistakes

  • An MX record must point to a hostname with an A or AAAA recordAAAA record The same as an A record, but for the newer, longer kind of internet address (IPv6). Only needed if your server has one. More about AAAA record →, never directly to an IP address, and never to a CNAME.
  • When moving email, remove all the old MX records. A leftover record keeps receiving some of your mail.
  • Changing the website’s host does not require touching MX records. Deleting them by accident while editing DNSDNS The internet’s phone book. It turns a name people can remember, like example.com, into the number address computers use to find the server. More about DNS → stops mail arriving, often silently.
  • A domain with no MX record falls back to its A recordA record The line in a domain’s settings that says which server’s address to send visitors to. Like a forwarding address card for your website. More about A record →, so mail may be sent to the web server. Domains that never receive mail can publish a “null MX” record (0 .) to say so.

Moving mail between providers is covered in how to migrate email to a new host.