MX Records vs A Records: What's the Difference for Email?
Learn the difference between MX records and A records, why email needs both, and how to check your configuration is correct.
When someone says "check your DNS records," it can sound like a trip to a foreign country where everyone speaks a different language. DNS has a lot of record types, and two of the most important ones (MX records and A records) often get confused. If you've ever wondered why your website works fine but your email is broken (or vice versa), the answer almost always comes down to the difference between these two record types.
This article explains what each one does, how they relate to each other, and how to check that both are set up correctly for your domain.
What Is an A Record?
An A record is the most fundamental building block of the internet. It maps a domain name to an IP address, the numerical address that computers use to find each other on a network.
When you type yourbusiness.com into a browser, your computer asks DNS: "What is the IP address for yourbusiness.com?" The A record answers that question with something like 203.0.113.42. Your browser then connects to that IP address, and your website loads.
Think of an A record like a street address in a phone book. The name in the listing is your domain. The address is the IP. Without an A record, your domain name points nowhere, and visitors would get an error instead of your site.
A records handle web traffic, file transfer, and most other internet services. But they don't handle email. That's where MX records come in.
What Is an MX Record?
An MX record (short for Mail Exchanger record) tells the internet where to deliver email for your domain. When someone sends a message to [email protected], their mail server looks up the MX records for yourbusiness.com to find out which server should receive the message.
The MX record doesn't contain an IP address directly. Instead, it contains a hostname (the name of a mail server) plus a priority number. The priority tells the sending server which mail server to try first if you have more than one. Lower numbers mean higher priority.
A typical MX record looks like this in the background:
yourbusiness.com. MX 10 mail.yourbusiness.com.
This says: "Email for yourbusiness.com should be delivered to the server called mail.yourbusiness.com, with priority 10."
Why Are They Different?
Here's the key insight: email delivery and web browsing are completely separate systems with separate routing rules.
Your website and your email inbox do not have to live on the same server. In fact, for most small businesses today, they almost certainly don't. Your website might be hosted with a company like SiteGround or WP Engine, while your email runs through Google Workspace or Microsoft 365, on completely different servers, in completely different data centers.
A records tell the internet where your website lives. MX records tell the internet where your email lives. By keeping these separate, you can change one without affecting the other. Switch web hosting providers without touching your email. Switch email providers without touching your website.
A Common Point of Confusion
Many business owners assume that because they set up an A record for their domain, email will automatically work. It won't.
Here's a scenario that causes a lot of headaches: you register a new domain, your hosting company automatically creates an A record pointing to their web server, and you build your website. Everything looks great. Then you try to get email working and nothing arrives.
The A record got you a website. But no one set up MX records to tell the internet where to deliver email. Without MX records, sending mail servers don't know what to do with messages for your domain and typically return them with a "delivery failed" error.
Similarly, if you switch email providers and update your MX records but forget that your old hosting company had its own email server, you might end up with conflicting settings or missing email.
How Email Routing Works Step by Step
When someone sends you an email, here's what happens behind the scenes:
- The sender's mail server looks up the MX records for your domain.
- It finds the hostname of your mail server (for example,
aspmx.l.google.comfor Google Workspace). - It then looks up the A record for that mail server hostname to get its IP address.
- It connects to that IP address on port 25 and delivers the message.
Notice that step 3 requires an A record, but it's the A record for the mail server hostname, not for your main domain. Google's servers have their own A records. You don't manage those. You only manage the MX record that points to Google's servers.
This two-step process is why MX records point to hostnames rather than IP addresses directly. It adds flexibility: the mail provider can update their server IP addresses without you needing to change anything in your DNS.
When You Need Both
Every domain that has a website and uses email needs both A records and MX records. They serve different purposes and don't overlap.
- You need an A record so browsers can find your website.
- You need MX records so mail servers can find your inbox.
If you only have an A record, your website works but email bounces. If you only have MX records, email works but your website is unreachable. A fully functioning business domain needs both.
You may also need additional records depending on your setup: SPF records to prevent your email from being flagged as spam, DKIM records for email authentication, and DMARC records for policy enforcement. But MX and A records are the foundation.
Examples of a Correct Configuration
A typical small business domain might have DNS records that look like this:
A record (for the website):
yourbusiness.com → 203.0.113.42 (your web host's IP address)
MX records (for email via Google Workspace):
yourbusiness.com MX 1 aspmx.l.google.com
yourbusiness.com MX 5 alt1.aspmx.l.google.com
yourbusiness.com MX 5 alt2.aspmx.l.google.com
yourbusiness.com MX 10 alt3.aspmx.l.google.com
yourbusiness.com MX 10 alt4.aspmx.l.google.com
The A record points to your hosting company's server. The MX records all point to Google's mail servers. These live side by side in DNS without interfering with each other.
How to Check Both with the MX Checker
If you're not sure whether your MX records are set up correctly, or if email has suddenly stopped working, the fastest first step is to run a free lookup at mxrecordchecker.com.
Enter your domain name and the tool will show you every MX record currently published in DNS for your domain. You'll be able to see the mail server hostnames, their priority values, and whether the records are resolving properly. If your domain has no MX records, the tool will make that clear immediately.
For A records, most DNS lookup tools can check those too. Look for a section labeled "A" or "IPv4 address" in your registrar's DNS management panel.
If you recently changed email providers, wait 24-48 hours and then run the MX checker again to confirm that DNS propagation has completed and your new records are visible worldwide.
A Few Things to Remember
MX records and A records are not interchangeable. An A record cannot route email, and an MX record cannot make your website load. Each record type has a specific job, and both are necessary for a fully functioning domain.
When troubleshooting email problems, always start with the MX records. Run the free lookup at mxrecordchecker.com to confirm your records exist and point to the right mail servers. From there, you can dig into SPF, DKIM, and other authentication records if needed.
And if you're setting up a new domain or switching email providers, remember: updating one record type doesn't automatically update the other. A records and MX records are managed separately, and both need your attention.