MX Record Lookup
Find the Mail Exchange (MX) servers responsible for accepting email on behalf of a domain.
About MX Records & Priorities
Mail Exchange (MX) records direct email to a mail server. They indicate how email messages should be routed in accordance with the SMTP protocol.
Priority: The priority number indicates the preference given to an MX record. The lowest number gets the highest priority (e.g., priority 0 or 10 is chosen before priority 20 or 50). If the primary server is down, senders will try the server with the next lowest priority number.
Our MX Record Lookup queries the DNS mail exchanger records for any domain, showing every mail server, its priority value, and the resolved IP address. Use it to confirm where your email is delivered and to diagnose mail routing failures in seconds.
What is an MX Record?
Each MX record has two parts: a priority number and a hostname. The priority (also called preference) controls the order in which servers are tried — lower numbers are tried first. A domain typically publishes several MX records so that mail still flows if the primary server is unreachable.
MX records must point to a hostname, never to an IP address. That hostname must itself resolve to an A or AAAA record.
- Tells sending servers where to deliver mail for your domain
- Defined in RFC 5321 as part of the SMTP specification
- Lower priority numbers are tried first
- Must point to a hostname, never directly to an IP address
- Multiple records provide redundancy if a mail server goes down
Why MX Records Matter
MX records are also a security surface. Attackers check them to identify your mail provider and craft targeted phishing. A stale MX record pointing at a decommissioned host can allow an attacker to claim that hostname and intercept your inbound mail.
- No MX record means inbound email silently bounces or is lost
- Wrong priority order can send mail to a backup server permanently
- Stale records pointing at dead hosts are an interception risk
- MX hostnames reveal your mail provider to attackers planning phishing
- Correct MX setup is a prerequisite for SPF, DKIM and DMARC to work properly
How This MX Record Lookup Works
- Validates the domain input against format and SSRF safety checks
- Queries authoritative DNS for records of type MX
- Sorts every result by priority, lowest number first
- Resolves each mail server hostname to its A or AAAA address
- Flags common faults such as missing records or IP addresses used as targets
How to Use the MX Record Lookup
- Enter your domain name such as example.com in the input field
- Run the lookup to query live DNS
- Review every mail server returned and its priority value
- Confirm the lowest-priority host is your intended primary mail server
- Check that each hostname resolves to a valid IP address
Understanding Your MX Record Results
Each MX record returns a priority, a target hostname and a TTL. Here is what each field means:
| Field / Value | Meaning |
|---|---|
Priority |
Also called preference. Sending servers try the lowest number first. Equal values are load-balanced randomly. Typical values are 10 for primary and 20 or higher for backups. |
Mail server |
The fully qualified hostname that accepts mail. It must have its own A or AAAA record. Common values point at Google Workspace, Microsoft 365, or your own mail host. |
Resolved IP |
The address the mail server hostname currently resolves to. If this is blank, the MX target is broken and mail will not be delivered. |
TTL |
How long resolvers cache this record, in seconds. 3600 is a common value. Lower it to 300 before migrating mail providers. |
Null MX (.) |
A single record with priority 0 and a target of "." declares that the domain accepts no email at all, as defined in RFC 7505. This is correct for domains that only host a website. |
Common Problems & How to Fix Them
Best Practices
- Publish at least two MX records so mail still flows if one server is unreachable
- Give the primary server the lowest priority number, typically 10
- Always point MX records at a hostname that has its own A or AAAA record
- Remove old provider records immediately after a mail migration
- Lower the TTL to 300 seconds a day before migrating, then restore it afterwards
- Publish a null MX record for domains that never receive email
- Keep SPF records aligned with the servers your MX records name
Security Recommendations
- Audit MX records for hostnames pointing at decommissioned or third-party infrastructure you no longer control
- Pair MX records with SPF, DKIM and DMARC — MX alone provides no authentication
- Publish MTA-STS and DANE where supported so inbound mail is encrypted in transit
- Check that your mail servers are not open relays, which gets your IP blacklisted rapidly
- Monitor for unauthorised MX record changes, which are a hallmark of domain hijacking and mail interception
- Avoid exposing internal hostname patterns in MX targets that reveal your infrastructure layout