Glossary
MX record
Definition
MX record: A DNS record that names the mail servers accepting email for a domain, each with a preference number. Sending servers try the lowest number first, and fall back to the domain's address record when no MX record exists.
Also known asmail exchanger recordmail exchange recordMX
In short
An MX (mail exchanger) record is a DNS record that tells sending mail servers which hosts accept email for a domain. Each record carries a preference number, and senders try the lowest number first. A domain with no MX record still gets delivery attempts at its A or AAAA address, and a null MX record ("0 .") says the domain accepts no mail at all.
Key takeaways
- An MX record points a domain's incoming mail at a hostname, not at an IP address.
- Lower preference numbers are tried first, and records with the same number share the load at random.
- With no MX record, senders fall back to the domain's A or AAAA record and may retry for days.
- A null MX record (0 .) tells senders the domain accepts no mail, so they fail the message at once.
- MX records steer incoming mail only. SPF, DKIM and DMARC cover the mail you send.
Last reviewed 30 November 2026
An MX record (mail exchanger record) is the DNS record that tells sending mail servers which hosts accept email for a domain. When someone writes to you@example.com, the sending server looks up the MX records for example.com, picks a host from the answer and delivers the message to it over SMTP. The record type is defined in RFC 1035 and the lookup rules in RFC 5321.
What an MX record looks like#
example.com. 3600 IN MX 10 mx1.example.com.
example.com. 3600 IN MX 10 mx2.example.com.
example.com. 3600 IN MX 20 mx3.example.net.Each record carries a preference number, which most DNS hosts label "priority", and a hostname. Lower numbers are tried first: here a sender tries the two 10s and uses the 20 only when neither answers. Records that share a number are picked at random, which spreads the load. Only the order matters: 1 and 2 behave like 10 and 20.
The value must be a hostname with its own A or AAAA record. An IP address won't work, and RFC 5321 doesn't cover a hostname that is itself a CNAME.
What happens with no MX record#
The mail doesn't bounce right away. RFC 5321 tells the sender to treat the domain's own A or AAAA record as an "implicit MX" and deliver there. That address usually belongs to a web server that doesn't accept mail, so the message waits in the sender's queue. RFC 7505 notes that senders typically keep retrying for about a week, so a mistyped address can take days to bounce.
A domain that should never receive mail can say so with a null MX record, which RFC 7505 defines:
example.org. IN MX 0 .Senders that see it fail the message at once. It must be the domain's only MX record.
Mistakes that cost you mail#
- Old records left in place. After a migration, a leftover MX with an equal or lower number takes some or all of your mail, and one with a higher number catches mail whenever your new server is unreachable. Delete them.
- Expecting an instant switch. Resolvers can cache the old answer until its TTL runs out (3600 seconds in the example), so mail may reach the old server for a while after the change.
- Treating MX as the whole setup. MX records steer incoming mail only. Outgoing mail is authenticated by SPF, DKIM and DMARC, which are separate records.
In Foxcolab#
When you connect a custom domain to Foxcolab Mail, the Domains tab lists one MX record: mail.foxcolabmail.com with priority 10. It also warns you to delete MX records left by your previous provider.
Keep exploring
Related terms
- SMTP (Simple Mail Transfer Protocol)SMTP is the protocol that sends email, from your mail app to your provider and from one mail server to the next. Here's what a session looks like, which port does what and what STARTTLS really protects.
- SPF (Sender Policy Framework)SPF is a DNS record that lists which servers may send email for your domain, so receiving servers can spot mail from anywhere else.
- DKIM (DomainKeys Identified Mail)DKIM adds a cryptographic signature to outgoing email so receivers can confirm the message came from your domain and wasn't changed on the way.
- DMARCDMARC ties SPF and DKIM to the From address people see, tells receivers what to do with mail that fails, and sends you reports on who's sending as your domain.
- MTA-STSMTA-STS lets a domain tell sending mail servers to deliver only over TLS, to named hosts with valid certificates. It closes the downgrade gap that STARTTLS leaves open.
Where Foxcolab uses it
Foxcolab
Private work tools, without the ads.
Mail, files, documents, spreadsheets and meetings in one account. Files, documents and spreadsheets are end-to-end encrypted.