How to Check MX Records
MX (Mail Exchanger) records tell the internet which mail servers accept email for a domain. Checking MX records is one of the first steps when troubleshooting email delivery problems, verifying that a domain's email routing is configured correctly, or investigating where a domain's inbound mail is handled.
Method 1: Use a web-based DNS lookup tool
The easiest way to check MX records is with a web-based DNS lookup tool. On IPLookupHub, enter the domain name in the DNS Lookup tool and select MX as the record type. The tool will return the domain's MX records, priority values, and the hostnames of the mail servers.
Method 2: Use dig on the command line
If you have access to a terminal on macOS, Linux, or Windows Subsystem for Linux, run:
dig example.com MX
The output will show each MX record with its priority and target hostname. For example:
example.com. 300 IN MX 10 mail1.example.com.
example.com. 300 IN MX 20 mail2.example.com.
Method 3: Use nslookup
On Windows or any system with nslookup available:
nslookup -type=MX example.com
Understanding MX priority
Each MX record has a priority number (also called preference). Lower numbers mean higher priority. When a mail server sends email to a domain, it tries the MX with the lowest priority number first. If that server is unavailable, it moves to the next one.
| Priority | Mail Server | Role |
|---|---|---|
| 10 | mail1.example.com | Primary mail server (tried first) |
| 20 | mail2.example.com | Backup mail server (tried if primary fails) |
If two MX records share the same priority number, the sending server distributes delivery attempts between them, which provides basic load balancing.
Common MX configurations
- Google Workspace: typically uses hostnames like
aspmx.l.google.comwith multiple backup servers atalt1.aspmx.l.google.com, etc. - Microsoft 365: uses a single MX pointing to
*.mail.protection.outlook.com. - Self-hosted mail: points to the organization's own mail server hostname, often with a backup MX at a different location.
Troubleshooting tips
- If no MX records appear, check whether the domain exists and has an active DNS zone.
- If email is bouncing, verify the MX hostname resolves to a valid A or AAAA record.
- After changing MX records, allow up to 24-48 hours for full DNS propagation, though changes often take effect much faster.
- Check SPF records alongside MX records to ensure the authorized sending IPs align with the mail infrastructure.
Frequently asked questions
What is an MX record?
An MX (Mail Exchanger) record is a DNS record that specifies which mail server is responsible for receiving email on behalf of a domain. It includes a priority value and a hostname.
What does MX priority mean?
MX priority (or preference) is a number that determines the order in which mail servers are tried. Lower numbers have higher priority. If the primary server is unreachable, the next priority is attempted.
Can a domain have multiple MX records?
Yes. Most domains have at least two MX records for redundancy. Different priority values control the failover order.
What happens if a domain has no MX record?
If no MX record exists, the sending server may fall back to the domain's A record. However, this fallback is unreliable and many servers will reject or defer the delivery attempt.