An MX record (Mail Exchanger record) is a type of DNS record that specifies which mail servers are responsible for receiving email sent to your domain. When someone sends an email to [email protected], the sending server looks up your domain’s MX record to find out where to deliver that message. Without a correctly configured MX record, email sent to your domain simply won’t arrive.
MX records are one of several DNS record types that govern how traffic reaches your domain. While an A record points your domain to a web server, an MX record points your email address to a mail server. The two are independent — your website and your email can live on entirely different servers, and MX records are how the internet knows the difference.
[Image: Diagram showing email delivery path: Sender → Sender’s MTA → DNS MX Lookup → Recipient Mail Server → Inbox]
How MX Records Work
When an email is sent to your domain, the sending mail server performs a DNS lookup to find your MX records. The process works like this:
- DNS query — The sending mail transfer agent (MTA) asks the DNS system: “What are the mail servers for this domain?”
- MX record response — DNS returns your MX records, which include the hostname of the mail server and a priority value
- Connection attempt — The sending server connects to your mail server via SMTP and delivers the message
- Fallback on priority — If you have multiple MX records with different priority values, the lower number is tried first. If it’s unavailable, the sending server tries the next one
An MX record has two key components:
– Priority (preference value) — A number indicating the order in which mail servers should be tried. Lower numbers = higher priority. A server with priority 10 is tried before one with priority 20.
– Mail server hostname — The domain name of the server that should receive email (e.g., mail.yourdomain.com or aspmx.l.google.com for Google Workspace)
Most businesses use hosted email services (Google Workspace, Microsoft 365, Outlook) that provide specific MX record values to add to their DNS settings during setup.
Purpose & Benefits
1. Route Email to the Right Server
MX records are what make your business email address functional. Without them — or with misconfigured values — email to your domain bounces or disappears. When you set up a hosted email service like Google Workspace or Microsoft 365, the first step is always updating your domain’s MX records to point to that provider’s servers. This configuration tells the email ecosystem where your mailboxes live.
2. Enable Redundancy and Failover
Multiple MX records with different priority values ensure email delivery even if your primary mail server goes offline. If the priority 10 server doesn’t respond, the sending server automatically tries the priority 20 server. This redundancy is built into the MX record system and protects against mail loss during server maintenance, outages, or migrations. Most enterprise email providers configure multiple MX records by default.
3. Support Email Authentication
MX records work alongside other DNS-based email security records — DKIM and DMARC — that verify your email is legitimate and not forged. While MX records themselves don’t perform authentication, they work within the same DNS framework. Properly configured MX records are the foundation that email authentication layers are built on.
Examples
1. Setting Up Google Workspace
A business migrating from a generic hosting email to Google Workspace follows the setup wizard, which instructs them to replace their existing MX records with Google’s values (like aspmx.l.google.com with priority 1 as the primary). After DNS propagation (typically 24–48 hours), all email to their domain routes through Google’s servers and appears in Gmail.
2. Multiple MX Records for Redundancy
A company’s DNS zone has these MX records:
– Priority 10: mail1.emailprovider.com
– Priority 20: mail2.emailprovider.com
Under normal operation, all email goes to mail1. If mail1 is temporarily unavailable, sending servers automatically retry on mail2 — email is queued and delivered without any messages being lost.
3. Diagnosing Bounced Email
A business owner reports that clients are saying their emails aren’t getting through. A quick MX record lookup using a tool like MXToolbox reveals the MX record is still pointing to a previous hosting provider’s mail server — from a migration that happened months ago. Updating the MX record to point to the current mail service resolves the delivery failures.
Common Mistakes to Avoid
- Pointing MX records to an IP address — MX records must point to a hostname (a domain name like
mail.yourprovider.com), never directly to an IP address. This is a DNS requirement — an MX record pointing to an IP address will not work correctly. - Forgetting to update after a migration — When switching email providers, web hosts, or domain registrars, MX records need to be updated manually. Many email delivery failures trace back to MX records that still point to an old provider.
- Removing backup MX records — Operating with a single MX record means any mail server downtime results in bounced or delayed email. Keeping at least two MX records with different priority values provides a safety net.
- Confusing MX records with email forwarding — Email forwarding is a setting within your email provider. MX records tell the internet which server handles your email — they don’t forward messages themselves. Both need to be configured correctly for email to work as expected.
Best Practices
1. Use Your Email Provider’s Exact MX Record Values
When configuring MX records, use the exact values your email provider specifies. Values vary between providers and must be entered precisely — a typo in a hostname will cause email delivery to fail. Google Workspace, Microsoft 365, and other major providers document their required MX records in their setup guides. Don’t modify priority values from what’s recommended unless you have a specific reason.
2. Allow Time for DNS Propagation
MX record changes take time to propagate across the DNS system — typically a few hours, sometimes up to 48 hours depending on your TTL (Time to Live) settings. During this window, some email may route to the old server and some to the new one. Plan migrations for low-traffic periods and keep access to both old and new mail systems during the transition.
3. Verify with an MX Lookup Tool
After making MX record changes, use a free tool like MXToolbox or Google Admin Toolbox to verify your records are set correctly and have propagated. These tools show you exactly what the internet sees when it looks up your domain’s mail servers — confirming everything is working before you assume the issue is resolved.
Frequently Asked Questions
What happens if my MX record is missing?
If your domain has no MX record, email sent to your domain will typically bounce with a “delivery failed” or “no mail servers found” error. The sender receives a bounce notification. Depending on the sending server’s configuration, some servers may attempt to fall back to your domain’s A record — but this is unreliable and not a substitute for a proper MX record.
Can I have multiple MX records?
Yes — and you should. Multiple MX records with different priority values create redundancy. The lower the priority number, the higher the preference. If the primary server is unavailable, sending servers work down the priority list until they find one that responds.
Why do my MX records point to Google/Microsoft domains?
When you use hosted email services like Google Workspace or Microsoft 365, those providers handle your email on their infrastructure. Your MX records point to their servers because that’s where your mailboxes live. This is normal and expected — you’re delegating email handling to a specialized provider.
How is an MX record different from a CNAME record?
A CNAME record maps one domain name to another (used for subdomains, web services, etc.). An MX record specifically designates mail servers for a domain. MX records cannot point to CNAME records — they must point to A records (hostnames that resolve directly to IP addresses).
Related Glossary Terms
How CyberOptik Can Help
Properly configured DNS — including MX records — is the foundation of reliable business email. We manage DNS and hosting infrastructure for clients daily, including email setup, migrations, and troubleshooting. If your email isn’t working reliably, or you’re switching providers and need help with the technical setup, we can help. Learn about our hosting solutions or contact us to discuss your setup.

