An MX record says which server takes in email for a domain. Without one, the sending server falls back to the domain's own address record, treated as an implicit MX with preference 0. With proper MX rows, it knows exactly where to knock.1
MX stands for "mail exchange", the name the original specification gives the type.2
Microsoft's help page states the job plainly. "MX record - This DNS record is required and specifies where email for the domain should go." That's about Microsoft's own mail service.3
The two parts of an MX value
Each MX row has a priority number and a server name.
The number is the preference. The specification defines it as "A 16 bit integer which specifies the preference given to" a record.2
The mail standard has its own rule. Records go in order, with the "lowest-numbered records being most preferred".1
Microsoft puts it this way: "In MX records, lower numbers indicate higher priority."3
So a row with a low number is tried first. A row with a higher number is a backup.
The server name is a name, not a number. It must itself have an address row. The mail standard asks for "at least one address record (e.g., A or AAAA RR)" there.1 See A and AAAA records.
What you'll see in your settings
A provider's setup page usually hands you the rows to copy. You'll see the type MX, a name that's either blank or an @ sign, a priority and a server name. Some providers give you more than one row, each with its own priority.
Copy them exactly. A typo in the server name won't show an error on screen. Mail just won't arrive where you expect.
Rules to keep in mind
- The server name in an MX row can't be an alias. The standard says the value of an MX record "must not be an alias", so don't point it at a CNAME.4 The CNAME page covers that rule.
- If you move to a new mail provider, look for old MX rows. Microsoft's help says to "Remove any existing MX records pointing to a previous email provider." It also describes a second option, which is giving the old provider a lower priority than the new one.3
When a domain has no MX record
Mail doesn't always stop. If no MX records come back, the standard says the address is "treated as if it was associated with an implicit MX" record.1 That record has a preference of zero and points at the host itself.
In plain terms, the sender falls back to the domain's own address record. If you want email on a domain, add proper MX rows rather than rely on the fallback.
What an MX record doesn't do
It only sets the destination. It doesn't create mailboxes, and it doesn't prove mail is genuine. Other rows handle that, and they're mostly TXT records. The rules for those rows belong to your email provider's own setup guide.
Notes and sources
- RFC 5321: Simple Mail Transfer Protocol, IETF (RFC Editor)
- RFC 1035: Domain names, implementation and specification, IETF (RFC Editor)
- Add DNS records to connect your domain, Microsoft Learn
- RFC 2181: Clarifications to the DNS specification, IETF (RFC Editor)
