Once you have created something that people can sign-up for, a freebie for instance, you need to reach out to them in order to get...
Key Takeaways
- An MX record is a DNS entry that points incoming email to the correct mail server for your domain.
- Every MX record carries a priority number, and lower numbers get tried first.
- You can have multiple MX records on a domain to keep email flowing if one server goes down.
- MX records are set in your DNS management panel using values provided by your email provider.
When someone sends an email to your domain, like [email protected], their mail server needs to know where to deliver it. Instead of guessing, it checks a DNS record that tells it which mail server to use. That record is called an MX record.
MX stands for Mail Exchanger. It’s one of several record types stored in your domain’s DNS (Domain Name System), and it has one job: tell the world which server handles your incoming email. If you get it wrong, email sent to your domain either bounces or disappears entirely.
Understanding what an MX record is and how it works is essential for anyone setting up a new domain, switching email providers, or even troubleshooting delivery issues.
How MX Records Fit Into DNS
DNS is often compared to a phone book. You look up a person’s name to find their phone number, and then use that number to call them. DNS does something similar. It takes a simple name like yourcompany.com and helps computers find the right place to connect.
Different record types handle different tasks. These are the most common ones:
- A record: Maps your domain to an IPv4 address (used for web traffic)
- AAAA record: Maps your domain to an IPv6 address
- CNAME record: Creates an alias from one domain name to another
- TXT record: Stores text-based data, commonly used for SPF, DKIM, and domain verification
- MX record: Specifies which mail server handles email for your domain
MX records sit in the same DNS infrastructure as all the others, but they’re the only ones dedicated to email routing. When you set up multiple SPF records or add DKIM entries, those go into TXT records, but the MX record is always where incoming mail gets directed.
How MX Records Work
The moment someone clicks “send” on an email to your domain, a series of steps begins behind the scenes to make sure the message reaches the right servers:
- The sender’s mail server starts a DNS lookup. It queries the DNS for MX records associated with your domain (the part after the @ symbol).
- DNS returns your MX records. These records include the hostname of your mail server and a priority value.
- The sending server connects to your mail server. It uses the SMTP protocol to attempt delivery, starting with the highest-priority MX record.
- Your mail server accepts the message. If the recipient address exists and the server is configured correctly, the email is delivered.
The mail server hostname in your MX record, for example, mail.yourprovider.com, is what the sending server actually connects to. The MX record itself doesn’t do the receiving; it just points to the server that does.
MX Record Priority: What the Numbers Mean
Every MX record includes a priority value, which is a number that tells mail servers which server to try first. The lower the number, the higher the priority.
For example:
- Priority 10 → your primary mail server (tried first)
- Priority 20 → your backup mail server (tried if priority 10 is unavailable)
Most domains have at least two MX records for redundancy. If your primary server is down or unreachable, the sending server falls back to the next one in the list. This failover behavior is built into how email routing works, which is why providers like Google Workspace and Microsoft 365 give you multiple MX records to add during setup.
If two MX records have the same priority, the sending server doesn’t prefer one over the other. It will choose one of them, often at random. This helps spread incoming emails across multiple servers instead of sending everything to just one, which is a simple way to share the workload and avoid overload.
What an MX Record Looks Like
An MX record has five components. Here’s what each one means:
When you look up MX records using a tool or the command line, you’ll see all five of these fields. The value (mail server hostname) is what the sending server connects to; it must resolve to a valid IP address, which is why mail server hostnames have their own A records in DNS.
How to Set Up an MX Record
MX records are added through your domain’s DNS management panel. This is usually found at your domain registrar or your hosting provider, depending on where your DNS is managed.
General setup steps:
- Log in to your DNS management panel: Find the section for DNS settings or DNS records.
- Check for existing MX records: Before adding new ones, review what’s already there. Old or conflicting MX records can cause delivery problems.
- Add a new MX record: Select MX as the record type.
- Enter the values from your email provider: This always includes the mail server hostname and the priority number. They’re specific to your email provider’s infrastructure. Using incorrect values is one of the most common reasons email stops working after a domain transfer or provider switch.
- Save and wait for propagation: DNS changes can take anywhere from a few minutes to 48 hours to fully propagate, though most updates are visible within an hour or two.
How to Check Your Domain’s MX Records
Checking MX records is useful when troubleshooting delivery issues, confirming a new setup, or making sure a domain can receive email. It also helps during migrations, when emails aren’t arriving or are going to spam, and when setting up services like Google Workspace or Microsoft 365. There are two main ways to do it.
Method 1: Use a browser-based MX lookup tool
Online tools let you enter a domain and instantly see its MX records without any command-line knowledge. DeBounce’s MX lookup tool is a quick option for this. You’ll see the mail server hostnames, priority values, and TTLs at a glance.
Method 2: Use the command line
If you prefer working in a terminal, two commands work well:
Using nslookup (Windows/macOS/Linux):
nslookup -type=MX yourdomain.com
Using dig (macOS/Linux):
dig MX yourdomain.com
Both return the same information: your domain’s MX records, including the server hostnames and priority values. If you get no results, it usually means the domain has no MX records configured, which explains why email to that domain isn’t being delivered.
MX lookups are also helpful for email senders. If a domain doesn’t have a valid MX record, emails sent to it will bounce. That’s why checking for an MX record is one of the first steps in email validation.
Understanding how your domain is set up also ties into email security. If records are missing or misconfigured, it becomes easier for attackers to exploit your domain for phishing or spoofing. Good DNS hygiene supports other protections like email encryption and working with trusted email security providers. A clean setup is what everything else relies on.
Wrapping Up
An MX record is a small part of your DNS with an important role. It tells the internet where to deliver emails for your domain. If it’s missing or set up incorrectly, your emails won’t arrive.
You add MX records in your DNS using details from your email provider, priority numbers decide which server is used first, and having more than one record helps keep email working if a server goes down.
If you’re building or cleaning an email list, it’s worth knowing that MX record checks are part of how email verification tools confirm whether an address can receive mail. If a domain has no MX record, emails to it will bounce. Catching those addresses early is much easier than fixing deliverability issues later.
If you want to improve your email results, run your list through DeBounce to remove invalid, risky, and undeliverable addresses before your next send.