Overview
MX records are the part of your domain's DNS that tells the rest of the internet which servers should receive email for your domain. Without a valid MX record, messages sent to your addresses have nowhere to land, which is why checking these records is one of the first things to do when email goes missing or when you are vetting a domain before sending to it.
This guide explains what MX records are, how priority values work, and how to check them using command line tools and free online lookups. It also covers what a missing MX record really means and how MX records relate to whether an address can actually accept mail.
What is an MX record and what does it do?
An MX record, short for Mail Exchanger record, is a DNS entry that names the mail server responsible for accepting email on behalf of a domain. When someone sends a message to jane@example.com, the sending server does not magically know where example.com keeps its inbox. It asks the Domain Name System for the MX records of example.com, and the DNS answers with one or more hostnames of mail servers.
Each MX record points to a hostname, not an IP address directly. That hostname then needs its own A or AAAA record so the sender can resolve it to an actual server. This two step lookup is deliberate. It lets a domain change hosting providers or scale across many servers without every sender needing to know the underlying addresses.
In plain terms, the MX record is the mailbox address on the front of the building. The postal service reads it to know where to drop the letters, and the internal mail room sorts them from there.
How do MX priority values work?
MX priority values decide the order in which sending servers try your mail servers, with the lowest number tried first. A domain can list several MX records, and each one carries a preference number, sometimes called a priority or distance.
Here is a simple example of what a domain might publish:
- 10 mail1.example.com
- 20 mail2.example.com
- 30 backup.mailprovider.net
A sending server will attempt mail1 first because 10 is the lowest value. If that server does not respond, it falls back to mail2, then to the backup. This gives you redundancy. If two records share the same priority number, senders spread the load between them, which is a basic form of balancing.
A common misconception is that a higher number means higher importance. It is the opposite. Think of it as a queue position where number 1 goes first. So priority 10 outranks priority 20.
How do I check MX records with the command line?
You can check MX records in about ten seconds using tools that are already on most computers. The two most common are dig and nslookup.
Using dig on Mac or Linux
Open a terminal and run the following, replacing the domain with the one you want to inspect:
- dig MX example.com returns the full record set with priority values.
- dig MX example.com +short trims the output to just the priorities and hostnames, which is easier to read.
The answer section lists each mail server and its preference number. If the answer section is empty, the domain has no MX records, which we will cover below.
Using nslookup on Windows
Windows users can open Command Prompt or PowerShell and run these two lines:
- Type nslookup and press enter to start the interactive tool.
- Type set type=mx and press enter, then type the domain such as example.com and press enter.
nslookup will print the mail exchanger hostnames and their preference values. You can also run it in one line with nslookup -type=mx example.com if you prefer not to enter interactive mode.
Can I check MX records without the command line?
Yes, several free web tools let you look up MX records in a browser with no software to install. If you are not comfortable in a terminal, this is the easiest route.
Popular options include MXToolbox, Google Admin Toolbox Dig, and the DNS lookup pages offered by many hosting companies. You paste in a domain, choose the MX record type, and the page shows the same hostnames and priorities you would see from the command line. Many of these tools also flag issues such as a mail server that does not resolve or a record that points to a private address.
For a broader picture, a dedicated domain health check tool can inspect MX records alongside related signals such as SPF, DKIM, and DMARC in one report. That wider view is useful because MX is only one piece of whether a domain sends and receives mail cleanly.
What does it mean when a domain has no MX record?
A domain with no MX record cannot receive email through the normal mail routing path, with one narrow exception. When a sending server finds no MX record, the rules say it should fall back to the domain's A record, treating the web server as if it were the mail server. This is called implicit MX and it rarely works in practice because most web servers do not run a mail service.
So in the real world, no MX usually means one of these situations:
- The domain is used only for a website and was never set up to receive mail.
- The domain is parked, expired, or freshly registered and not yet configured.
- Someone made a DNS mistake and the mail routing is broken.
If you own the domain and mail is bouncing, a missing MX record is one of the first things to check. If you are evaluating someone else's domain, a missing MX is a strong signal that addresses there will not accept mail.
How do MX records relate to whether an address can receive mail?
A valid MX record is necessary for an address to receive mail, but it is not a full guarantee that a specific mailbox exists. MX tells you the domain has a mail server ready to accept connections. It does not tell you whether jane@example.com is a real, active inbox or a typo.
Think of it as two separate questions. First, does the domain accept mail at all? MX answers that. Second, is this particular address a working mailbox? That requires a deeper check where a verification service opens a conversation with the mail server and asks about the specific recipient, without actually sending a message.
This is exactly why marketers who send to lists care about more than MX. A domain can have perfect MX records while a given address is inactive, mistyped, or a catch all that silently swallows everything. Verifying the individual address on top of the MX check is what protects your sender reputation.
Before a large campaign, it is smart to run your list through an email verification service so you are not relying on MX presence alone. Confirming both the domain routing and the individual mailbox keeps bounce rates low and mailbox providers happy.
A quick checklist for reading MX results
When you run a lookup, walk through these points:
- Is there at least one MX record? No record means no normal mail delivery.
- Do the priority values make sense, with a clear primary and any backups?
- Do the mail server hostnames resolve to real addresses when you look them up?
- Do the hostnames match a provider you expect, such as your email host or a known service?
- Are there any records pointing to localhost or private ranges, which are misconfigurations?
Running through this list turns a raw DNS answer into a quick health read on the domain.
Frequently asked questions
How long do MX record changes take to take effect?
MX changes usually propagate within a few minutes to a couple of hours, though they can take up to 48 hours in slower cases. The delay depends on the TTL, or time to live, set on the record. A lower TTL such as 300 seconds means senders refresh the record more often, so your change is seen sooner.
Can a domain have more than one MX record?
Yes, and most business domains do. Multiple MX records give you redundancy and load sharing. Each one has a priority value, and senders try them in order from the lowest number upward, moving to the next if a server is unavailable.
Does a valid MX record mean an email address definitely works?
No. A valid MX record confirms the domain has a mail server willing to accept connections, but it does not confirm that a specific mailbox exists or is active. To check an individual address, you need a verification step that queries the mail server about that recipient rather than the domain alone.
What is the difference between an MX record and an A record?
An MX record names the mail server for a domain, while an A record maps a hostname to an IP address. MX records depend on A records because the mail server hostname in an MX entry still needs an A record so senders can resolve it to a real server.
Comments (0)
No comments yet. Be the first to share your thoughts!
Leave a Comment
Your email address will not be published. Required fields are marked *