tools / DNS lookups / look up mx records for a domain
DNS · MX

MX record lookup

MX records tell senders where to deliver mail for a domain. Each MX has a preference value — lower numbers tried first, ties broken randomly. Use to verify mail routing or diagnose delivery failures.

beginner MX

How to look it up

Four ways to query — pick by what's available on your machine.

digdig MX example.com +short
hosthost -t MX example.com
nslookupnslookup -type=MX example.com
dotdigdotdig mx example.com

Sample response

10 mx1.example.com.
10 mx2.example.com.
20 backup-mx.example.com.

Format

Format: `<preference> <hostname>.`. Lower preference is preferred. The trailing dot is part of the FQDN.

Common pitfalls

Why it matters for security

security relevance MX records expose your mail infrastructure — attackers use them to identify mail providers and craft spoofing campaigns. Pair with SPF/DKIM/DMARC.

Use cases

Look up DNS without flag soup
dotdig is a friendly DNS resolver — formatted output, custom resolver support, DNSSEC validation. Zero-config alternative to dig.
Open dotdig  

Related DNS lookups

NS · TXT · PTR · CNAME · ↗ validate emails before MX lookup