MX
MX Record
ActiveThe MX (Mail Exchanger) record specifies the mail servers responsible for accepting email on behalf of a domain.
name TTL IN MX priority mail-server
In one line
The MX (Mail Exchanger) record specifies the mail servers responsible for accepting email on behalf of a domain. MX records include a priority value – lower numbers have higher priority. When email is sent to [email protected], the sending server queries MX records to find where to deliver the message.
Description
The MX record designates the mail servers that accept incoming email for a domain. Multiple MX records can exist with different priority values (preference numbers) – lower values indicate higher priority. If the primary mail server is unavailable, delivery is attempted on servers with higher priority numbers.
Fields
| Field | Description |
|---|---|
| priority | Integer preference value. Lower = higher priority. Common values: 1, 5, 10, 20. |
| mail-server | FQDN of the mail server. Must resolve to an A or AAAA record – cannot be a CNAME. |
Examples
Google Workspace MX
shell
example.com. 3600 IN MX 1 aspmx.l.google.com.
example.com. 3600 IN MX 5 alt1.aspmx.l.google.com.
example.com. 3600 IN MX 10 alt2.aspmx.l.google.com.Lookup with dig
shell
dig example.com MX
;; ANSWER SECTION:
example.com. 3600 IN MX 10 mail.example.com.