What Is an MX Record? How Email DNS Works and How to Check Yours
Email delivery is entirely dependent on MX records. When someone sends you an email, their mail server does not know your email address maps to a specific server — it looks up your domain in DNS and follows the MX record to find where to deliver the message. If the MX record is missing, wrong, or pointing to a server that is not configured to receive mail, email fails.
Here is everything you need to understand and manage MX records effectively.
How MX Records Work
The process: someone sends email to you@yourdomain.com. Their mail server extracts your domain (yourdomain.com), queries DNS for MX records, and receives back one or more hostnames along with priority numbers.
The sending server attempts delivery to the lowest-priority-number server first. If that server accepts the connection and the email is delivered, the process is complete. If the first server rejects the connection or is unreachable, the sending server tries the next highest priority server.
This failover behaviour is why most professional mail setups have at least two MX records at different priority values — one server can fail without mail bouncing.
Reading Your MX Records
Run this in Terminal or Command Prompt: nslookup -type=mx yourdomain.com
A Google Workspace domain returns something like: yourdomain.com mail exchanger = 1 aspmx.l.google.com yourdomain.com mail exchanger = 5 alt1.aspmx.l.google.com yourdomain.com mail exchanger = 5 alt2.aspmx.l.google.com yourdomain.com mail exchanger = 10 alt3.aspmx.l.google.com yourdomain.com mail exchanger = 10 alt4.aspmx.l.google.com
The numbers (1, 5, 10) are priorities. Lower is higher priority. Google Mail sends all email to the priority 1 server first (aspmx.l.google.com) and uses the alt servers only as fallbacks.
A Microsoft 365 domain typically shows a single MX record pointing to yourdomain-com.mail.protection.outlook.com.
Setting Up MX Records
When you subscribe to an email service like Google Workspace or Microsoft 365, the provider gives you specific MX record values to enter in your DNS settings. You add these at wherever your DNS is managed — your registrar, Cloudflare, or whichever DNS host you use.
The key steps: delete any existing MX records for the domain first, add the new ones the provider specifies, save, and wait for propagation. DNS propagation for MX record changes typically takes 15 minutes to a few hours, though up to 48 hours is technically possible.
Common MX Problems and Fixes
No MX records. Email bounces with a permanent failure. Fix: add the correct MX records from your email provider.
Wrong server in MX records. Email is routed to the wrong server, which rejects it. Fix: verify the exact values from your email provider and update.
MX pointing to a CNAME. This is technically invalid per RFC 2181. Some sending servers handle it anyway, others reject it. Always point MX records to A records or direct hostnames, never to CNAMEs.
Leftover old MX records after migration. Split mail delivery — some email goes to the old server, some to the new one. Fix: remove all old MX records when migrating to a new provider.
Email working, then suddenly failing. Check whether the domain has expired. An expired domain loses all its DNS records, including MX records, and email fails immediately. A WHOIS lookup shows expiry status in seconds. The email impact of domain expiry is one of the most damaging and least expected consequences of a missed renewal.
MX Records and Email Authentication
MX records handle routing. But delivered email also needs to pass authentication checks that receiving servers apply. SPF, DKIM, and DMARC are all implemented via TXT records and work alongside your MX configuration. Setting MX records correctly is necessary but not sufficient for email deliverability — authentication records matter too, covered in our SPF, DKIM, and DMARC guide.
Never lose a domain again
Track every domain you own in one dashboard. Free for up to 15 domains.
