To view all DNS records for a domain, query its authoritative name servers using DNS lookup tools like dig, nslookup, or online services such as DNSChecker.org. This reveals all record types-A, AAAA, MX, TXT, CNAME, NS, SOA, and more-associated with the domain.
DNS records map domain names to IP addresses and define email routing, security policies, and subdomain behavior. Each record type serves a specific function. For example, an A record points a domain to an IPv4 address, while an MX record specifies mail servers. Viewing all records shows the complete configuration behind a domain's internet presence.
Use dig @resolver.example.com -t ANY example.com to retrieve all record types from a specified DNS resolver. The ANY query type returns every available record type. On Linux or macOS, install bind-tools or use brew install bind to access dig. Windows users can use WSL or install dig via Git Bash.
DNS resolution begins when a client requests a domain's IP address. The request travels through recursive resolvers, which contact authoritative name servers. These servers hold the actual DNS records for a domain. A query for all records bypasses filtering and returns every entry configured in the zone file.
When you run dig example.com ANY, the tool sends a query to the root servers, then to the .com TLD servers, and finally to the authoritative servers for example.com. The response includes all records stored in the domain's DNS zone. This process takes milliseconds and requires no authentication.
For example, running dig google.com ANY returns over 20 records including A, AAAA, MX, TXT, and CAA entries. The output shows Google's load-balanced IPs, mail server settings, and SPF/DKIM alignment details. This level of visibility helps diagnose connectivity issues, verify email deliverability, or detect misconfigurations.
DNS supports multiple record types. The most common include:
| Type | Purpose | Example Value |
|---|---|---|
| A | Maps domain to IPv4 address | 142.250.180.206 |
| AAAA | Maps domain to IPv6 address | 2607:f8b0:4004:801::200e |
| MX | Specifies mail servers | 10 mail.google.com. |
| TXT | Stores text-based data | "v=spf1 include:_spf.google.com ~all" |
| CNAME | Aliases one name to another | www.example.com. IN CNAME example.com. |
| NS | Lists authoritative name servers | ns1.example.com. |
| SOA | Contains zone metadata | example.com. IN SOA ns1.example.com. admin.example.com. 2024040101 3600 1800 604800 300 |
Some records have specialized uses. For instance, TXT records store SPF, DKIM, and DMARC policies that prevent email spoofing. A domain with google.com might have a TXT record like v=spf1 include:_spf.google.com ~all to authorize Gmail servers to send emails on its behalf.
Non-standard record types exist too. The SRV record defines service locations, often used in VoIP or gaming. The CAA record restricts which certificate authorities can issue SSL certificates for a domain. Misconfigured CAA records can block certificate issuance, causing website downtime.
The dig command is the most precise way to view all DNS records. Run dig example.com ANY to see every record type. Use dig +short to reduce output to just values. For example:
dig google.com ANY +short
google.com. 300 IN A 142.250.180.206
google.com. 300 IN AAAA 2607:f8b0:4004:801::200e
google.com. 300 IN MX 10 aspmx.l.google.com.
google.com. 300 IN TXT "v=spf1 include:_spf.google.com ~all"
google.com. 300 IN NS ns1.google.com.
google.com. 300 IN NS ns2.google.com.
...
Alternatively, use nslookup in interactive mode: type set type=any, then google.com. The output includes all record types but lacks the structured format of dig.
Online tools like DNSChecker.org or MXToolbox.com provide web-based queries. Enter a domain and select "All Records" to see results across multiple global DNS resolvers. These tools are useful for verifying propagation status after changes.
When troubleshooting, compare results from different resolvers. A delay in propagation may show inconsistent records across regions. For example, a new A record might appear instantly in North America but take 12 hours to update in Asia due to TTL settings.
Many assume that viewing all DNS records requires administrative access to the domain's hosting control panel. That's incorrect. Anyone with a command-line tool or web browser can query public DNS records. No login or API key is needed.
Another misconception is that dig ANY returns all records from every server. It doesn't. It queries the authoritative name servers for the domain. If a domain uses a CDN like Cloudflare, the records returned reflect the CDN's configuration-not the origin server's.
Also, ANY queries can trigger rate limits on some DNS providers. Google Public DNS blocks repeated ANY queries from the same IP within 10 seconds. Use dig with a specific resolver like @8.8.8.8 to avoid hitting quotas.
One non-obvious fact: some domains hide records behind DNSSEC. While DNSSEC protects against cache poisoning, it doesn't hide records from public queries. However, invalid signatures can cause resolution failures even if records exist.
I once debugged a failed email delivery for a client whose domain had a missing SPF record. Using dig example.com TXT, I found no SPF entry. The domain used mail.example.com as a mail server, but no SPF policy existed. I added v=spf1 mx -all to the TXT record. After 15 minutes, the email flow resumed.
Another time, a site showed a mixed-content warning because HTTP resources loaded over insecure connections. Running dig example.com A revealed the domain pointed to an old IP. Updating the A record to the current server IP resolved the issue.
These cases show that viewing all DNS records is essential for diagnosing connectivity, security, and performance problems. You don't need to own the domain to inspect its DNS setup. Public queries reveal everything from routing paths to email security configurations.