Checking DNS records is one of the most common tasks in web development and system administration. Whether you're troubleshooting a website that won't load, verifying email configuration, or auditing domain security, knowing how to query DNS is an essential skill. This guide covers three ways to check DNS records — from the command line, through online tools, and from your browser — with real examples for every common record type.
What Are DNS Records?
DNS (Domain Name System) records are instructions stored on authoritative nameservers that tell the internet how to handle your domain. Each record type serves a different purpose — pointing your domain to a server, routing email, verifying ownership, or enforcing security policies. If you're new to DNS, start with our What is DNS? guide for an overview of how the system works.
🔍 Quick way to check DNS records: Use our free DNS Record Lookup tool — queries A, AAAA, MX, TXT, CNAME, NS, and SOA records for any domain instantly.
Method 1: Command Line (dig & nslookup)
The command line gives you the most control and detail when querying DNS. Two standard tools come pre-installed on macOS and Linux: dig (Domain Information Groper) and nslookup (Name Server Lookup). Windows users can install dig via WSL or use nslookup which comes built-in.
Using dig
dig is the gold standard for DNS queries. It provides detailed, machine-readable output including the query time, the responding server, and full record data.
Check A records (IPv4 address):
dig example.com A
# Short output only
dig example.com A +short
Check MX records (mail servers):
dig example.com MX
# With priority values
dig example.com MX +short
Check TXT records (SPF, DKIM, verification):
dig example.com TXT
Check CNAME records (aliases):
dig www.example.com CNAME
Check NS records (nameservers):
dig example.com NS
# Query a specific nameserver
dig example.com @8.8.8.8
Check AAAA records (IPv6 address):
dig example.com AAAA
Trace DNS delegation path:
dig example.com +trace
Using nslookup
nslookup is simpler and available on all platforms including Windows. It's less feature-rich than dig but gets the job done for quick lookups.
Check A records:
nslookup example.com
# Query specific DNS server
nslookup example.com 8.8.8.8
Check MX records:
nslookup -type=MX example.com
Check TXT records:
nslookup -type=TXT example.com
Check NS records:
nslookup -type=NS example.com
Method 2: Online DNS Checker Tools
Online DNS tools are the fastest option — no terminal needed, works from any device, and often provides additional context like propagation checks and historical data. They're especially useful when you're on a mobile device, working on a machine where you can't install tools, or need to share results with non-technical team members.
Using a Web-Based DNS Lookup
Our DNS Record Lookup checks all common record types in one query:
- Enter a domain name (e.g.,
github.com) - Click "Lookup" — results appear instantly
- View A, AAAA, MX, TXT, CNAME, NS, and SOA records
- Copy results or share the link with your team
Why use an online tool: no installation, works on phones/tablets, aggregates multiple record types in one view, and provides a shareable result. Plus, you can cross-reference with our WHOIS Lookup to see registration details alongside DNS records.
Method 3: Browser Developer Tools
Modern browsers can inspect DNS resolution through their DevTools. This method is useful for debugging how a specific page loads and whether DNS is contributing to slow performance.
Chrome/Edge DevTools
- Open DevTools (
F12orCmd+Option+I) - Go to the Network tab
- Reload the page
- Click any request → Timing tab
- Look for "DNS Lookup" in the timing breakdown
This shows how long DNS resolution took but doesn't reveal the actual record values. For that, use the Security tab → "View certificate" to see which domains are covered by the SSL certificate (which must match DNS records).
Firefox Developer Tools
- Open DevTools (
F12) - Go to the Network tab
- Reload and click a request
- Check the Timings section for DNS resolution time
DNS Record Types Reference
Here's what each common DNS record type means and when you'd check it:
| Record | Purpose | When to Check |
|---|---|---|
A |
Maps domain to IPv4 address | Website not loading; verifying server IP |
AAAA |
Maps domain to IPv6 address | IPv6 connectivity issues |
CNAME |
Alias one domain to another | CDN setup (www → CDN hostname) |
MX |
Mail server routing | Email delivery problems |
TXT |
Arbitrary text; SPF, DKIM, verification | Email authentication; domain ownership verification |
NS |
Authoritative nameservers | Domain delegation; DNS provider migration |
SOA |
Start of Authority — zone metadata | DNS propagation timing; zone serial check |
PTR |
Reverse DNS — IP to hostname | Email deliverability (reverse DNS for mail servers) |
Common DNS Checking Scenarios
🔧 Troubleshooting "Site Not Loading"
- Check A records with
dig example.com A +short— confirms DNS resolves to an IP - If no A record, check NS records — confirms domain has nameservers configured
- Use our SSL Certificate Checker — a valid certificate requires correct DNS
- Check with multiple DNS servers (
@8.8.8.8,@1.1.1.1) to rule out local resolver issues
📧 Debugging Email Delivery Issues
- Check MX records —
dig example.com MX - Check SPF record —
dig example.com TXT | grep spf - Check DKIM record —
dig selector._domainkey.example.com TXT - Verify DMARC policy —
dig _dmarc.example.com TXT
🔒 Verifying Domain Ownership
- Google Search Console, GitHub, and many services verify ownership via TXT records
- Check your TXT records to confirm verification values are live —
dig example.com TXT - Remember DNS changes can take up to 48 hours to propagate (though typically 5–30 minutes)
🛠 Need to check your domain right now? Use our DNS Record Lookup — free, instant, no signup required. Also try our WHOIS Lookup to see domain registration details and our SSL Checker to verify your certificate.
FAQ
How long does it take for DNS changes to propagate?
DNS propagation typically takes 5–30 minutes for most providers, but can take up to 48 hours in worst cases. The TTL (Time To Live) value on your records determines how long resolvers cache old values. Check the SOA record's refresh and minimum TTL fields to estimate propagation time. Use our DNS Record Lookup to verify your changes are live by querying against Google's public DNS (8.8.8.8).
What's the difference between dig and nslookup?
dig provides more detailed output, better scripting support, and consistent behavior across platforms. nslookup is simpler but may use different resolvers depending on the OS. For troubleshooting, prefer dig. For quick one-off checks on Windows where dig isn't installed, nslookup works fine.
Can I check DNS records for any domain?
Yes — DNS records are public by design. Anyone can query A, MX, TXT, NS, CNAME, and other records for any domain. Use our free DNS Record Lookup tool to check any domain instantly.
Why do my DNS records show different results on different tools?
This usually happens during DNS propagation — when you've recently changed records and some DNS servers still have cached old values. It can also happen if your domain uses geo-routed DNS (different IPs for different regions). Query multiple public resolvers (Google 8.8.8.8, Cloudflare 1.1.1.1) to compare.
How do I check who owns a domain?
DNS records tell you how a domain is configured, but not who owns it. For ownership information, use a WHOIS Lookup to see the registrar, registration date, expiration date, and (if not privacy-protected) the registrant's contact details.
How do I check if my SSL certificate is valid?
SSL certificates are separate from DNS records but depend on correct DNS configuration. Use our SSL Certificate Checker to verify certificate validity, issuer, expiry date, and SAN coverage.