1. What is the MX record for?
When someone sends a message to [email protected], their mail server asks DNS: "which servers accept mail for company.com?". The answer is the MX records (Mail Exchanger). Each contains two pieces of information:
- priority (preference): a number; the lower it is, the more preferred the server;
- the server name, e.g.
mx1.company.com, which must have its own A or AAAA record.
company.com. 3600 IN MX 10 mx1.company.com.
company.com. 3600 IN MX 20 mx2.company.com.The sending server tries mx1 (priority 10) first, and if it does not answer, mx2 (priority 20). Servers with the same priority share the traffic.
2. How to check MX records
In a Linux or macOS terminal:
dig +short MX company.comOn Windows:
nslookup -type=mx company.comYou can also check any address in the MailSpecto demo: the result shows whether the domain has MX, implicit MX or Null MX.
3. No MX, implicit MX and Null MX
| Situation | What happens to mail |
|---|---|
| MX records exist | Mail goes to the listed servers |
| No MX, an A/AAAA record exists | Implicit MX (RFC 5321): the sender may deliver to the address in the A record. It works, but it is rare and not recommended |
Null MX: MX 0 . | An explicit statement that "this domain does not accept mail" (RFC 7505). Senders reject the message right away |
| The domain does not exist | Mail is rejected; the address is invalid |
If a domain is only used for a website and does not receive mail, publish a Null MX. That way nobody tries to deliver mail to your web server, and spammers find it harder to use the domain as a sender.
4. The most common configuration mistakes
- MX points to an IP address instead of a name (
MX 10 198.51.100.10). An MX record must contain a host name. - MX points to a CNAME alias. The specification forbids it; some servers tolerate it, some do not.
- The MX name has no A/AAAA record or points to a private address (e.g.
10.0.0.5,192.168.1.10). Such a server is unreachable from the internet. - Leftovers from the old provider: after moving mail to a new service, an old MX with a lower priority stays in the zone and some mail gets lost.
- A typo in the server name, or a missing trailing dot in a hand-written zone (
mx1.company.cominstead ofmx1.company.com.appends the domain name a second time). - Too high a TTL before a migration: lower the TTL to a few minutes a day before changing mail providers, so the new records take effect quickly.
5. MX and address verification
The MX record is the first level of checking whether an address can receive mail. MailSpecto verification reads MX, checks implicit MX and Null MX, rejects servers on private addresses, and then asks the listed server about the specific mailbox (see How to check whether an email address is valid). The domain audit in the panel checks MX together with SPF, DKIM and DMARC.
- MX points to host names, not IP addresses or CNAME aliases.
- Every MX name has a public A or AAAA record.
- After a mail migration, remove the old MX records.
- A domain without mail has a Null MX (
MX 0 .). - Lower the TTL before changing mail providers.
Keep your contact list clean
Verify email addresses before you send, and explore our upcoming SPF/DKIM/DMARC diagnostics module.
MailSpecto Engineering Team
We build tools for email address verification, deliverability monitoring and mail infrastructure security diagnostics for companies in Poland and Europe.