MX

Mail Exchange Record

Specifies the mail servers responsible for receiving email

Look up MX records
Query MX records for any domain
Try it now

About

The MX (Mail Exchange) record specifies which mail servers are responsible for receiving email for a domain. When someone sends an email to [email protected], their mail server queries the MX records for example.com to find where to deliver the message.

MX records include a priority value (lower numbers = higher priority). This allows for backup mail servers - if the primary server is unavailable, email is delivered to the next server in priority order. Multiple MX records with the same priority enable load balancing.

MX records point to hostnames, not IP addresses. The hostname must have a valid A or AAAA record.

Format & Example

Record Format
domain.com. IN MX 10 mail.domain.com.
Example
example.com. 3600 IN MX 10 mail.example.com. example.com. 3600 IN MX 20 backup.example.com.

Primary mail goes to mail.example.com (priority 10). If unavailable, backup.example.com (priority 20) receives the email.

Common Uses

  • Routing email to your mail server
  • Using third-party email services (Google Workspace, Microsoft 365)
  • Setting up backup mail servers
  • Load balancing email across multiple servers

Best Practices & Tips

  • Always have at least one backup MX record
  • MX targets must be hostnames with valid A/AAAA records
  • Never point MX to a CNAME record
  • Lower priority numbers = higher priority
  • Use priority 10, 20, 30 to leave room for future additions

Related Record Types

ATXTSPF