How to Check and Verify MX Records

Learn how to check and verify MX records for any domain. Covers dig, nslookup, web tools, priority values, and common email provider configurations.

Last updated: 2026-02-17

MX records are the DNS records that control where email is delivered for your domain. If they are wrong, email stops working. If they are missing, senders get bounce messages. If they have been tampered with, someone else could be reading your mail.

Checking MX records is a routine task for anyone managing domains, configuring email services, or troubleshooting delivery problems. This guide covers every method for looking up and verifying MX records, plus the details you need to interpret what you find.

What Are MX Records?

MX stands for Mail Exchanger. An MX record tells the world which mail servers are responsible for accepting email for your domain. When someone sends an email to user@example.com, the sending mail server queries the MX records for example.com to find out where to deliver the message.

Each MX record has two parts:

  • Priority (also called preference): A numeric value that determines the order in which mail servers are tried. Lower numbers have higher priority.
  • Mail server hostname: The fully qualified domain name of the server that accepts email.
example.com.    MX    10    mail1.example.com.
example.com.    MX    20    mail2.example.com.

In this example, mail is first attempted to mail1.example.com (priority 10). If that server is unavailable, the sender retries with mail2.example.com (priority 20).

How to Check MX Records

Using dig

dig is the most detailed command-line tool for DNS queries. It is available natively on Linux and macOS, and through WSL or BIND on Windows.

# Basic MX lookup
dig example.com MX

# Short output showing only the records
dig example.com MX +short

# Query a specific DNS server
dig @8.8.8.8 example.com MX +short

# Query the authoritative nameserver directly
dig @ns1.example-provider.com example.com MX +short

The +short flag is especially useful for MX records because it outputs clean priority and hostname pairs:

10 mail1.example.com.
20 mail2.example.com.

Using nslookup

nslookup is available on every major operating system without additional installation:

# MX record lookup
nslookup -type=MX example.com

# Query a specific DNS server
nslookup -type=MX example.com 8.8.8.8

Using Web-Based Tools

Online tools like MXToolbox, DNS Checker, and Google Admin Toolbox provide MX lookups through a browser interface. These are useful when you need to share results with non-technical colleagues or check records from a location outside your network.

Common Email Provider MX Configurations

Knowing what correct MX records look like for major providers helps you quickly verify your setup.

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

Microsoft 365 MX records are domain-specific

Microsoft 365 generates a unique MX record hostname for each domain, typically in the format your-domain-com.mail.protection.outlook.com. Check your Microsoft 365 admin portal for the exact value.

Understanding MX Priority Values

Priority values determine failover behavior, not load balancing. Here is how they work:

  • Equal priority: If two MX records have the same priority, sending servers will randomly choose between them. This provides basic load distribution.
  • Different priorities: Servers with lower numbers are tried first. Higher-priority (higher-number) servers are only used when lower-priority servers are unreachable.
  • Single MX record: Many configurations use only one MX record. This is fine for most setups, but provides no redundancy.

A common mistake is setting all MX records to the same priority when you intend to have a primary and backup server. Check that your priorities reflect your intended failover order.

Step-by-Step MX Record Verification

1

Query MX records from a public resolver

Run dig @8.8.8.8 yourdomain.com MX +short to see what the public internet sees. This avoids any local caching issues.

2

Compare against your expected configuration

Match the returned records and priorities against your email provider's documentation or your known-good configuration.

3

Verify each mail server hostname resolves

For each MX hostname, run dig mail-server-hostname A +short to confirm it resolves to a valid IP address. An MX record pointing to a hostname that does not resolve will cause delivery failures.

4

Test SMTP connectivity

Verify that the mail server is actually accepting connections on port 25. You can use telnet mail1.example.com 25 or an online SMTP test tool.

5

Check for conflicting records

Ensure there are no stale MX records from a previous email provider. Leftover records can cause intermittent delivery failures as some messages route to the old server.

Monitor Your MX Records Continuously

DNS Monitor alerts you instantly if your MX records change, protecting your email routing from unauthorized modifications.

Troubleshooting MX Record Issues

Email Not Being Delivered

If email to your domain is bouncing:

  1. Check that MX records exist: A domain without MX records will cause delivery failures. Some servers fall back to the A record, but this is unreliable.
  2. Verify the mail server hostname resolves: MX records must point to a hostname (not an IP address), and that hostname must have its own A record.
  3. Check for CNAME conflicts: The DNS specification prohibits placing an MX record on a name that also has a CNAME record. If your domain root has a CNAME (common with some CDN setups), MX records may not work correctly.

Partial Delivery Failures

If some emails arrive and others do not:

  • Check for duplicate MX records from different providers. If old MX records from a previous email service are still present, some senders may deliver to the wrong server.
  • Verify priority ordering is correct. If a decommissioned backup server still has an MX record, messages routed to it will be lost.
  • Check MX record TTL values if you recently made changes. Some resolvers may still be caching old MX records.

Wrong Mail Server Responding

If email is being delivered but to the wrong service:

  • Look for MX records with lower priority numbers than your intended primary. A record with priority 5 will be used before a record with priority 10.
  • Check for registrar-level MX records that override your DNS provider's settings. Some registrars inject their own MX records by default.

MX records cannot point to IP addresses

MX records must contain a hostname, not an IP address directly. The record MX 10 192.168.1.1 is invalid. You must point to a hostname like mail.example.com and then create an A record for that hostname pointing to the IP.

MX Records and Email Security

MX records are just the routing layer. For a complete email security setup, you also need:

  • SPF records: Authorize which servers can send email on behalf of your domain
  • DKIM records: Provide cryptographic signatures to verify email authenticity
  • DMARC records: Define policy for handling emails that fail SPF or DKIM checks

These records work together with MX records to create a secure email infrastructure. A change to any of them can affect email deliverability and security.

MX records are deceptively simple but critically important. A single wrong priority value or a stale record from an old provider can cause email delivery failures that are difficult to diagnose. Regular verification and continuous monitoring are the best protection against MX-related email disruptions.

Protect Your Email Routing

DNS Monitor watches your MX records and alerts you the moment anything changes. Never lose email to a misconfigured MX record again.