MX record
Also known as: mail exchanger record, MX records, mail exchange record
An MX (mail exchanger) record is a type of DNS record that tells other email systems where to deliver messages sent to a domain.
For example, a business using Microsoft 365 has MX records pointing to Microsoft's mail servers. MX records include a priority number, so if the main server is unavailable, mail goes to a backup. While MX records rarely change, getting them wrong during an email migration can cause messages to bounce or disappear.
MX record, explained at three levels
At home
An MX record is like the delivery instructions you leave with the post office. It tells mail carriers where letters for your address should actually go, such as a mailroom down the street. When someone emails you, their mail server checks your domain's MX record to find which server accepts your mail, then delivers it there. Change the instructions and mail goes somewhere else.
At work
An MX record is the DNS setting that tells other email systems which servers receive mail for a company's domain, such as Microsoft 365 or Google Workspace. Each record has a priority number, so mail can go to a backup if the main server is down. Businesses care because a wrong MX record means incoming email bounces or vanishes, especially during a provider switch.
At home
When someone sends you an email, their mail server needs to know where to deliver it. It looks up the MX records for the part of your address after the @. Each MX record names a mail server and a priority number. The sending server tries the server with the lowest number first, and falls back to the next if it cannot connect. Change the MX records, and email for the whole domain flows to a different provider.
At work
MX records must point to hostnames, not IP addresses, and those hostnames need their own A or AAAA records. Priority values set preference, with lower numbers tried first, and equal values spread load. When a business uses an email filtering gateway, the MX records point to the gateway, which scans messages and forwards clean mail to Microsoft 365 or Google Workspace. A domain that sends no mail can publish a null MX record.
At home
Anyone can look up a domain's MX records with free online tools, and the server names usually reveal the provider, such as Microsoft 365, Google Workspace or a security filtering service. That is how attackers know which fake login page to use in phishing, and how IT providers quickly diagnose email problems. In my view, checking them is a quick way to see which email provider a business uses, for good or bad.
At work
Lower TTL values a day or two before migrations so changes take effect quickly, change MX records during quiet hours, and monitor mail flow and message traces afterward. When using a filtering gateway, lock down direct delivery to the mail platform, for example with Exchange Online connector restrictions, so attackers cannot bypass filtering by connecting straight to it. Keep SPF, DKIM and DMARC consistent with mail routing changes.
Real-world examples
At home
Fatima set up email for her small business domain. After adding the MX records her provider gave her, messages started arriving within minutes.
At work
Jerome's Regina MSP moved a client from an old hosting company's email to Microsoft 365. Updating the MX records on a Friday evening avoided disruption.
How it compares
| feature | MX record | SPF record |
|---|---|---|
| Purpose | Receive email | Authorize senders |
| Record type | MX | TXT |
| If wrong | Mail doesn't arrive | Sent mail lands in spam |
| Changes | During migrations | When adding senders |
MX records bring email in. SPF records vouch for email going out.
For analysts
In email migration plans, I'd schedule MX changes as a formal cutover step with rollback steps. It's the moment the switch actually happens.
History & origin
Early internet email relied on simpler address lookups. MX records were introduced in 1986, through the internet standard RFC 974, allowing domains to direct mail to specific servers and backups. As businesses moved email from on-premises Exchange servers to hosted services such as Google Apps, launched in 2006, and Office 365, launched in 2011, changing MX records became a routine part of email migrations. Email security gateways also use MX records to filter mail before it reaches inboxes. In my view, the MX record is the most important line of text most business owners have never seen.