How to Compare DNS Records Between Two Domains
Whether you are migrating to a new domain, replicating a configuration across environments, or debugging why email works on one domain but not another, comparing DNS records side by side is the fastest way to find the problem. This guide shows you how to run a thorough comparison and act on the differences.
Compare two domains instantly
Use our free DNS Compare tool to see a side-by-side diff of all DNS records for any two domains.
Step 1: Gather the Domains You Want to Compare
Identify the two domains you need to compare. Common scenarios include comparing a production domain with a staging domain, comparing your old domain with a new one during migration, or comparing your domain against a competitor or reference configuration. Make sure you have the exact hostnames including any subdomains.
Step 2: Query All Record Types
A complete comparison should cover all major record types. You can query them using dig on the command line:
dig example.com A +short
dig example.com AAAA +short
dig example.com MX +short
dig example.com TXT +short
dig example.com CNAME +short
dig example.com NS +short
dig example.com SOA +shortRun the same set of queries for the second domain, then compare the results. Pay special attention to MX records for email routing and TXT records for authentication policies.
Step 3: Compare TXT Records for Email Authentication
TXT records carry your SPF, DKIM, and DMARC configurations. A missing or mismatched SPF record is one of the most common causes of email delivery differences between domains. Use the SPF Checker and DMARC Checker to validate each domain individually.
Step 4: Check MX Record Priorities
MX records determine where email is delivered. Compare not just the hostnames but also the priority values. A domain with 10 mail.example.com routes email differently than one with 20 mail.example.com. Use the MX Lookup tool to inspect each domain's mail exchange configuration.
Step 5: Document and Fix Mismatches
List every difference you find and categorize them as intentional or unintentional. Unintentional mismatches should be corrected in your DNS provider's dashboard. After making changes, allow time for propagation based on the record's TTL, then re-run the comparison to confirm everything matches.
Frequently Asked Questions
Why would I need to compare DNS records between two domains?
Comparing DNS records is useful during domain migrations, when cloning a configuration to a new domain, or when troubleshooting why one domain works and another does not. It helps you spot missing or mismatched records quickly.
Which DNS record types should I compare?
At minimum, compare A, AAAA, MX, CNAME, TXT, and NS records. TXT records are especially important because they contain SPF, DKIM, and DMARC policies that affect email deliverability.
How long does it take for DNS changes to propagate after fixing a mismatch?
DNS propagation depends on the TTL value of the record. Most changes propagate within one to 24 hours. Lower TTL values propagate faster but increase query load on your authoritative nameserver.