What is an MX Record?

How DNS Routes Email to the Right Server

An MX (Mail Exchange) record is a type of DNS record that specifies which mail servers are responsible for receiving email for a domain. MX records are essential for email delivery.

Explore the Learn Hub

Step 1: What is an MX Record?

An MX record is a DNS record that tells the internet which mail servers accept email for a domain. When someone sends an email to user@example.com, the sending mail server looks up the MX records for example.com to find out where to deliver the message.

MX records are one of several DNS record types — alongside A records (IPv4), AAAA records (IPv6), TXT records, and others. They are managed on the authoritative DNS side, not the resolver side.

Step 2: How MX Records Work

Email delivery using MX records follows this process:

  • Sender's mail server: Looks up MX records for the recipient's domain via DNS
  • DNS response: Returns one or more MX records, each containing a mail server hostname and a priority value
  • Connection: The sending server connects to the mail server with the lowest priority number (highest priority) via SMTP
  • Delivery: The email is transferred to the recipient's mail server for storage and retrieval

Step 3: MX Priority and Failover

Each MX record includes a priority value (also called preference). Lower numbers mean higher priority. A domain can have multiple MX records for redundancy:

  • Priority 10: mail1.example.com — primary mail server, tried first
  • Priority 20: mail2.example.com — backup server, used if the primary is unavailable
  • Priority 30: mail3.example.com — tertiary failover

This priority system ensures email delivery continues even if a mail server goes down — the sending server automatically tries the next server in the list.

Step 4: MX Records and the DNS Ecosystem

MX records are an authoritative DNS concept — they're configured by domain owners at their nameserver provider. Services like NOC.org manage authoritative DNS zones where MX records are created and maintained.

CleanBrowsing operates on the recursive resolver side — resolving DNS queries for end users. While CleanBrowsing's DNS filtering focuses on blocking web content domains, MX record lookups pass through normally since they're essential for email delivery.

Related DNS records for email security include TXT records used for SPF, DKIM, and DMARC — authentication mechanisms that verify email sender identity. For a deeper look at how DNS filtering complements email security tools, see our guide on DNS filtering and email security.

Learn more about DNS and filtering

Explore the Learn Hub