An MX (mail exchange) record is the DNS entry that says which servers accept email for your domain. When someone emails [email protected], their mail server looks up your MX records to find out where to deliver it. Without one, mail to your domain has nowhere to go.
How mail servers use MX records
An MX record has a priority number and a mail server hostname. The sending server looks up all your MX records and tries the one with the lowest number first. If that server does not respond, it moves to the next. Records with equal priority share the load.
The value must be a hostname, such as mail.example.net, which has its own A or AAAA record. The DNS rules say it should not be a raw IP address and should not be a name that is a CNAME.
Example: setting up Google Workspace or Microsoft 365
Google Workspace currently asks new customers to add a single MX record with the value smtp.google.com and priority 1. Microsoft 365 gives each domain its own hostname ending in mail.protection.outlook.com. In both cases the setup is the same: remove the old MX records from your previous provider, add the new one exactly as shown, and wait for cached answers to expire. Mail sent during the overlap may land in either mailbox for a short time.
MX records and the rest of your email setup
MX only controls incoming mail. Whether your outgoing mail reaches inboxes depends on SPF, DKIM and DMARC, which are published as TXT and CNAME records. A complete email setup touches all of them, and your provider's instructions will list each one.
When small businesses need to touch it
You set MX records once, when you start using business email on your domain or switch providers. They also matter when you move your website: if a host or tool asks you to change nameservers, the MX records must exist at the new DNS provider or email stops.
MX record mistakes that stop email
- Leaving the old provider's records in place. Mixed MX records split incoming mail between two systems, and some messages seem to vanish.
- Putting an MX record on the wrong name. For
[email protected], it belongs on the bare domain (@), not onwwwormail. - Losing MX records during a website move. A nameserver switch that copies only website records breaks mail silently.
- Misreading priority. The lower number wins, so a backup given priority 1 becomes the main server.
Related terms
- DNS records: the full set MX sits among.
- TXT record: holds the SPF and DMARC policies for your mail.
- DNS propagation: why mail may split briefly after a switch.
- DNS: the lookup system mail servers rely on.