What Is an MX Record?
An MX (Mail Exchange) record is a type of DNS record that specifies which mail servers are responsible for receiving email on behalf of a domain.
How MX Records Work
When someone sends an email to user@yourdomain.com, the sending mail server queries DNS for MX records associated with yourdomain.com. The DNS response returns one or more mail server hostnames along with priority values. The sending server connects to the highest-priority (lowest number) mail server and delivers the message.
Each MX record consists of two parts: a priority (preference) number and a mail server hostname. For example, Google Workspace uses MX records like 10 aspmx.l.google.com and 20 alt1.aspmx.l.google.com.
Why MX Records Matter
Without correctly configured MX records, your domain cannot receive email. Misconfigured MX records are one of the most common causes of email delivery failures. They are also relevant for email security — knowing which mail servers handle your domain's email helps you properly configure SPF, DKIM, and DMARC.
MX Record Priority
The priority number determines the order in which servers are tried. Lower numbers have higher priority. If the primary server (e.g., priority 10) is unavailable, the sending server tries the next one (e.g., priority 20). Most domains configure at least two MX records for redundancy.
Frequently Asked Questions
What does MX record priority mean?
MX record priority is a number that determines the order in which mail servers are tried. Lower numbers have higher priority. If the highest-priority server is unavailable, the next one is tried.
Can a domain have multiple MX records?
Yes. Most domains have multiple MX records for redundancy so that email delivery continues even if the primary server is down.
What happens if there is no MX record?
Without an MX record, sending servers fall back to the domain's A record. This is not recommended and can cause delivery issues. Always set explicit MX records for domains that receive email.