Back to blog
dnshostingdomains

How to Find DNS Records for Any Domain

Learn how to find DNS records for any domain using online tools, command line, and hosting checkers. Covers A, AAAA, CNAME, MX, NS, and TXT record types.

Piotr Kulpinski
Piotr Kulpinski
26 Mar 20268 min read
How to Find DNS Records for Any Domain

Every domain on the internet relies on DNS records to function — they're the configuration entries that tell the world where to find your website, where to deliver your email, and how to verify your domain's identity. Knowing how to find DNS records of a domain is essential for troubleshooting, migration planning, and security audits. We've used these techniques countless times when diagnosing issues for domains of all sizes.

Quick Answer: To find DNS records for any domain, use a DNS lookup tool and enter the domain name. The tool queries authoritative nameservers and returns all record types — A, AAAA, CNAME, MX, NS, TXT, and more. You can also use command line tools like dig or nslookup for the same results.

What Are DNS Records?

DNS records are entries in a domain's zone file that map domain names to various types of data. They're stored on authoritative nameservers and queried by DNS resolvers whenever someone visits a website, sends an email, or connects to any internet service.

Think of DNS records as a set of instructions. When the internet needs to interact with your domain, these records tell it exactly what to do — which server to connect to, which mail server handles your email, and how to verify your domain ownership.

For a deeper look at the system behind these records, see our guide on what DNS is and how it works.

DNS Record Types Explained

There are several DNS record types, each serving a distinct purpose. For an in-depth reference covering every record type including SOA, SRV, and PTR, see our complete guide to DNS records. Here's a breakdown of the most common ones:

RecordPurposeExample Value
AMaps domain to an IPv4 address93.184.216.34
AAAAMaps domain to an IPv6 address2606:2800:220:1:248:1893:25c8:1946
CNAMECreates an alias pointing to another domainwww.example.com → example.com
MXDirects email to the correct mail server10 mail.example.com
NSSpecifies the authoritative nameserversns1.cloudflare.com
TXTStores arbitrary text data (SPF, DKIM, verification)v=spf1 include:_spf.google.com ~all

A and AAAA Records

A records are the most fundamental DNS record type. They map a domain name directly to an IPv4 address — this is how browsers know which server to contact when you type a URL.

AAAA records serve the same purpose for IPv6 addresses. As IPv6 adoption grows (Google reports over 45% of its traffic uses IPv6), having AAAA records ensures your site is accessible on modern networks.

A domain can have multiple A and AAAA records, allowing DNS round-robin load balancing across several servers.

CNAME Records

A CNAME (Canonical Name) record creates an alias from one domain to another. The most common use is pointing www.example.com to example.com, so both addresses load the same site.

Important constraints:

  • A CNAME cannot coexist with other record types for the same name
  • The root domain (example.com) typically cannot have a CNAME — use an A record instead
  • Some DNS providers offer ALIAS or ANAME records to work around this limitation

MX Records

MX (Mail Exchange) records tell the internet which servers handle email for your domain. Each MX record has a priority value — lower numbers mean higher priority. For a detailed walkthrough, see our guide on how to check MX records.

Example MX configuration for Google Workspace:

10 aspmx.l.google.com
20 alt1.aspmx.l.google.com
30 alt2.aspmx.l.google.com

If the primary server (priority 10) is unreachable, email delivery falls back to servers with higher priority numbers.

NS Records

NS (Nameserver) records define which DNS servers are authoritative for a domain. These are set at the registrar level and determine where all other DNS queries for the domain are directed.

NS records frequently reveal the hosting provider or DNS service:

  • ns1.digitalocean.com → DigitalOcean
  • ns1.vercel-dns.com → Vercel
  • dns1.p08.nsone.net → NS1 / IBM

TXT Records

TXT records store text strings used for domain verification, email authentication, and security policies. Common uses include:

  • SPF — Defines which servers can send email on behalf of your domain
  • DKIM — Provides a cryptographic signature for email authentication
  • DMARC — Sets the policy for handling emails that fail SPF/DKIM checks
  • Domain verification — Google Search Console, Microsoft 365, and other services use TXT records to prove domain ownership

How to Look Up DNS Records

There are several ways to check DNS records for any domain, ranging from web-based tools to command line utilities.

Method 1: DNS Lookup Tool (Easiest)

The simplest approach is to use a web-based DNS lookup tool:

  1. Enter the domain name (e.g., example.com)
  2. The tool queries the domain's authoritative nameservers
  3. Results display all DNS record types with their values and TTLs

Try it yourself

Check any website's hosting

Enter a domain or IP to see hosting provider, DNS records, and more.

Our hosting checker performs a comprehensive DNS lookup alongside SSL verification, IP geolocation, and hosting provider identification — giving you the complete picture in one query.

Method 2: Using dig (Linux/macOS)

The dig command is the most versatile DNS lookup tool for the command line:

# Query all record types
dig example.com ANY
 
# Query specific record types
dig example.com A
dig example.com MX
dig example.com TXT
dig example.com NS
 
# Query a specific nameserver
dig @8.8.8.8 example.com A
 
# Get a short answer
dig +short example.com A

The dig output includes the answer section (the actual records), authority section (nameservers), and additional section (IP addresses of nameservers). The +short flag strips this down to just the values.

Method 3: Using nslookup (All Platforms)

The nslookup command is available on Windows, macOS, and Linux:

# Basic lookup
nslookup example.com
 
# Query specific record type
nslookup -type=MX example.com
 
# Use a specific DNS server
nslookup example.com 8.8.8.8

While nslookup is more widely available, dig is generally preferred for its more detailed output and scripting capability. When we run bulk DNS audits, dig with the +short flag is our go-to for clean, parseable output.

Method 4: Using PowerShell (Windows)

On Windows, PowerShell provides a native DNS lookup command:

# Query all records
Resolve-DnsName example.com
 
# Query specific type
Resolve-DnsName example.com -Type MX

Reading DNS Lookup Results

Understanding the output of a DNS lookup is as important as running one. Here's what each part means:

TTL (Time to Live)

The TTL value (in seconds) tells DNS resolvers how long to cache the record. Common values:

TTLDurationUse Case
3005 minutesRecords that change frequently
36001 hourStandard for most records
8640024 hoursStable records (NS, MX)

Lower TTLs mean changes propagate faster but generate more DNS queries. When planning a migration, reduce TTLs to 300 seconds 24–48 hours in advance so the switch happens quickly.

Record priority

MX and SRV records include a priority number. Lower values indicate higher priority. If multiple records exist with the same priority, traffic is distributed between them.

Multiple records

A domain can have multiple records of the same type. Multiple A records enable load balancing. Multiple MX records provide email delivery redundancy. Multiple TXT records are common since different services each require their own verification entry.

Common DNS Issues and How to Spot Them

When DNS records are misconfigured, the symptoms can range from a website not loading to emails bouncing. Here are common issues a DNS lookup can reveal:

Missing A record

If a domain has no A or AAAA record, browsers can't resolve it to a server IP. The site will display a DNS_PROBE_FINISHED_NXDOMAIN or similar error.

Wrong MX records

Incorrect MX records cause email delivery failures. After changing email providers (e.g., from Google Workspace to Microsoft 365), old MX records must be removed and new ones added.

Missing SPF/DKIM/DMARC

Without proper email authentication TXT records, emails from your domain are more likely to be flagged as spam or rejected entirely. A DNS lookup that shows no SPF record is a red flag for email deliverability.

Propagation delays

After changing DNS records, the old values may persist in caches worldwide until the previous TTL expires. In our experience, using dig @8.8.8.8 example.com to query Google's resolver directly is the fastest way to confirm your changes are live.

Frequently Asked Questions

How long does it take for DNS changes to propagate?

DNS propagation typically takes 15 minutes to 48 hours, depending on the TTL of the previous record. Records with a 300-second TTL propagate within minutes, while records with a 86400-second TTL can take up to 24 hours.

Can I see DNS records for any domain?

Yes. DNS records are public by design — that's how the internet works. Any domain's A, AAAA, CNAME, MX, NS, and TXT records can be queried by anyone using standard DNS lookup tools.

What's the difference between authoritative and recursive DNS?

An authoritative nameserver holds the actual DNS records for a domain. A recursive resolver (like Google's 8.8.8.8 or Cloudflare's 1.1.1.1) queries authoritative servers on your behalf and caches the results.

How do I check if my DNS changes are live?

Query the authoritative nameserver directly using dig @ns1.your-provider.com example.com A. If the authoritative server returns the new value but your browser still shows the old site, the issue is caching at the recursive resolver or browser level.

What's Changing in DNS Lookups

The way we query and analyze DNS records is evolving. DNS-over-HTTPS (DoH) is making some traditional query methods less reliable, as encrypted DNS traffic bypasses conventional monitoring and inspection tools. On the security side, DNSSEC adoption is steadily improving, adding cryptographic signatures that verify record integrity and protect against spoofing. Encrypted SNI (ESNI) and its successor Encrypted Client Hello (ECH) are also changing the landscape — once widely deployed, they'll limit the DNS and TLS metadata available for analysis, requiring new approaches to domain infrastructure inspection.

Wrapping Up

DNS records are the foundation of every domain's internet presence. Whether you're troubleshooting a down website, migrating to a new host, or setting up email authentication, knowing how to find and read DNS records gives you the information you need to diagnose and fix issues quickly.

Use our DNS lookup tool or enter any domain into the hosting checker to see DNS records alongside SSL certificates, IP geolocation, and hosting provider details — all in a single query.

Piotr Kulpinski

Written by

Piotr Kulpinski

Founder of Hosting Checker and a web developer with over a decade of experience in DNS, hosting infrastructure, and domain management. Piotr builds tools that help developers and site owners understand their web stack.

Free lookup tool

Check any website's hosting

Enter a domain or IP to uncover hosting details, DNS records, and server location.