MX Record Checker

Look up MX (Mail Exchange) records for any domain to verify mail server configuration, check priorities, and troubleshoot email delivery issues. All lookups are performed using Google Public DNS in your browser.

MX Record Checker
Figure 1 — MX Record Checker

What Are MX Records?

MX (Mail Exchange) records are a type of DNS record that specifies which mail servers accept email for a domain. When someone sends an email to user@example.com, the sending server performs a DNS lookup for the MX records of example.com to determine where to deliver the message. Without properly configured MX records, email delivery will fail completely.

MX records are critical to the email infrastructure of the internet. They work alongside other DNS-based email authentication records like SPF, DKIM, and DMARC to ensure reliable and secure email delivery. Understanding how DNS works is essential background for managing MX records effectively.

How MX Record Priority Works

Each MX record has two components: a priority value (also called preference) and a mail server hostname. The priority determines the order in which sending servers attempt delivery:

PriorityBehaviorTypical Use
10Tried first (lowest = highest priority)Primary mail server
20Tried if priority 10 failsSecondary/backup server
30Tried if 10 and 20 failTertiary backup
Equal valuesLoad balanced randomlyDistributing traffic across servers

Lower priority numbers indicate higher preference. If two MX records share the same priority value, the sending server randomly selects one, effectively creating round-robin load balancing. This is how large email providers like Google and Microsoft distribute incoming mail across their data centers.

Pro Tip: Always configure at least two MX records with different priorities. If your primary mail server goes down, the backup server will accept messages and queue them for later delivery. This redundancy is essential for business email. Make sure your DNS configuration includes backup mail servers to avoid lost emails.

MX Records for Popular Email Providers

If you use a hosted email service, your MX records will point to the provider's mail servers. Here are the standard MX configurations for the most widely used email platforms:

ProviderMX RecordsPriority
Google Workspaceaspmx.l.google.com1
Google Workspacealt1.aspmx.l.google.com5
Google Workspacealt2.aspmx.l.google.com5
Microsoft 365[tenant].mail.protection.outlook.com0
Zoho Mailmx.zoho.com10
Zoho Mailmx2.zoho.com20
ProtonMailmail.protonmail.ch10
ProtonMailmailsec.protonmail.ch20

Troubleshooting MX Record Issues

When email delivery fails, MX record misconfiguration is one of the first things to check. Common issues include:

  • No MX records — The domain has no MX records at all. Senders will fall back to the A record, but many servers reject this. If your DNS server is not responding, MX lookups will also fail.
  • MX pointing to CNAME — RFC 2181 prohibits MX records from pointing to CNAME aliases. The target must be an A or AAAA record.
  • MX pointing to IP — MX records must contain hostnames, not IP addresses. Use our IP Lookup tool to verify the resolved address.
  • Stale records — After switching email providers, old MX records may still be cached. DNS TTL values determine how long caches persist.
  • Missing backup servers — Single MX record configurations create a single point of failure for all email delivery.

You can verify your overall DNS health using our DNS Lookup tool to check A, AAAA, CNAME, and TXT records alongside your MX configuration. If you suspect your ISP DNS is causing issues, try switching to a public resolver like Google DNS (8.8.8.8) or Cloudflare (1.1.1.1).

Note: When you change MX records, propagation can take up to 48 hours depending on the TTL value set by your DNS provider. During this time, emails may be delivered to either the old or new mail server. Plan your migration carefully and lower your TTL in advance. If your router DNS settings are caching old records, flush the DNS cache on your device.

How to Set Up MX Records

Configuring MX records requires access to your domain's DNS management panel. Here is a typical setup process:

  1. Log in to your DNS provider (e.g., Cloudflare, Namecheap, Route 53).
  2. Navigate to DNS management for your domain.
  3. Add MX records with the mail server hostnames and priority values from your email provider.
  4. Remove old MX records if switching providers.
  5. Verify using this MX Record Checker tool.

Here is an example DNS zone file entry for Google Workspace:

; MX Records for Google Workspace
example.com.  IN  MX  1   aspmx.l.google.com.
example.com.  IN  MX  5   alt1.aspmx.l.google.com.
example.com.  IN  MX  5   alt2.aspmx.l.google.com.
example.com.  IN  MX  10  alt3.aspmx.l.google.com.
example.com.  IN  MX  10  alt4.aspmx.l.google.com.

After configuring MX records, you should also set up SPF, DKIM, and DMARC records to protect against email spoofing and improve deliverability.

MX Records and Email Security

MX records are just one part of a complete email security setup. Modern email authentication relies on several DNS-based mechanisms working together:

Record TypePurposeDNS Record
MXSpecifies mail servers for the domainMX record
SPFLists authorized sending IP addressesTXT record
DKIMAdds digital signature to outgoing mailTXT record (selector._domainkey)
DMARCPolicy for handling authentication failuresTXT record (_dmarc)
MTA-STSEnforces TLS encryption for mail transportTXT + HTTPS policy file
DANE/TLSABinds TLS certificates to MX serversTLSA record

Proper email authentication prevents spoofing attacks where malicious actors send emails that appear to come from your domain. Learn more about protecting your network in our secure home WiFi network guide.

Checking MX Records via Command Line

You can also query MX records using command-line tools. This is useful for scripting and server administration:

Windows (nslookup)

nslookup -type=mx example.com
nslookup -type=mx example.com 8.8.8.8

macOS / Linux (dig)

dig example.com MX +short
dig @8.8.8.8 example.com MX

Linux (host)

host -t mx example.com

If command-line DNS tools aren't resolving correctly, your DNS server may not be responding. Try specifying a public DNS server like 8.8.8.8 directly. You can also test DNS resolution through encrypted channels with our DNS over HTTPS Tester.

Key Takeaways
  • MX records tell sending servers where to deliver email for your domain. Without them, email won't work.
  • Lower priority numbers mean higher preference — priority 10 is tried before priority 20.
  • Always have at least two MX records with different priorities for redundancy.
  • MX records must point to hostnames, never IP addresses or CNAME records.
  • Complement MX records with SPF, DKIM, and DMARC for email security.
  • After changing MX records, propagation can take up to 48 hours depending on TTL values.

Video: How MX Records Work

Related Tools and Guides

Frequently Asked Questions

What happens if a domain has no MX records?

If no MX records exist, sending servers will attempt to deliver email to the domain's A record as a fallback (per RFC 5321). However, many modern mail servers reject this approach, and email delivery becomes unreliable. Always configure explicit MX records for any domain that receives email.

Can I have multiple MX records with the same priority?

Yes. When multiple MX records share the same priority value, sending servers randomly choose between them. This provides basic load balancing across your mail servers, which is how providers like Google distribute traffic across their infrastructure.

How long does it take for MX record changes to propagate?

Propagation depends on the TTL (Time To Live) value of the existing records. If the TTL is 3600 seconds (1 hour), most DNS resolvers will pick up the change within an hour. In practice, full global propagation can take up to 48 hours. Lowering TTL before a migration helps speed this up.

Do MX records affect my website?

No, MX records only affect email routing. Your website is served based on A and AAAA records. However, both record types exist in the same DNS zone, so be careful when editing your DNS records not to accidentally modify the wrong entries.

Why are my emails going to spam after changing MX records?

Changing MX records alone shouldn't cause spam issues. However, if you forgot to update your SPF record to include the new mail server's IP addresses, receiving servers may flag your emails as unauthorized. Use our SPF Record Checker to verify your SPF configuration is correct.

Can MX records point to an IP address instead of a hostname?

No. Per RFC 1035 and RFC 7505, MX records must contain a fully qualified domain name (FQDN), not an IP address. The hostname in the MX record must itself resolve to an A or AAAA record. This is a common misconfiguration that breaks email delivery.

What is a null MX record?

A null MX record (RFC 7505) explicitly declares that a domain does not accept email. It uses priority 0 and a single dot (.) as the hostname: example.com. IN MX 0 . This tells sending servers not to attempt delivery, which is useful for domains used only for web services.

About Tommy N.

Tommy is the founder of RouterHax and a network engineer with 10+ years of experience in home and enterprise networking. He specializes in router configuration, WiFi optimization, and network security. When not writing guides, he's testing the latest mesh WiFi systems and helping readers troubleshoot their home networks.

Promotion for FREE Gifts. Moreover, Free Items here. Disable Ad Blocker to get them all.

Once done, hit any button as below