Digging DNS (DNS Tools)


Cheat sheet

CommandDescription
dig domain.comPerforms a default A record lookup for the domain.
dig domain.com ARetrieves the IPv4 address (A record) associated with the domain.
dig domain.com AAAARetrieves the IPv6 address (AAAA record) associated with the domain.
dig domain.com MXFinds the mail servers (MX records) responsible for the domain.
dig domain.com NSIdentifies the authoritative name servers for the domain.
dig domain.com TXTRetrieves any TXT records associated with the domain.
dig domain.com CNAMERetrieves the canonical name (CNAME) record for the domain.
dig domain.com SOARetrieves the Start of Authority (SOA) record for the domain.
dig @1.1.1.1 domain.comSpecifies a specific name server to query; in this case 1.1.1.1 (Cloudflare).
dig +trace domain.comShows the full path of DNS resolution from root servers down to authoritative servers.
dig -x 192.168.1.1Performs a reverse lookup on the IP to find the associated domain name (PTR record).
dig +short domain.comProvides a short, concise answer to the query.
dig +noall +answer domain.comDisplays only the answer section of the output.
dig domain.com ANYAttempts to retrieve all available DNS records (often restricted due to RFC 8482).

DNS Tools

ToolKey FeaturesUse Cases
digVersatile DNS lookup tool that supports various query types (A, MX, NS, TXT, etc.) with detailed output.Manual DNS queries, zone transfers (if allowed), troubleshooting DNS issues, and deep DNS analysis.
nslookupBasic DNS lookup tool, good for quick queries (A, AAAA, MX).Fast checks of domain resolution and mail server records.
hostStreamlined command-line DNS tool with concise results.Quick lookups for A, AAAA, MX, and CNAME records.
dnsenumAutomated enumeration with support for dictionary-based subdomain brute-forcing and zone transfers.Discovering subdomains and mapping DNS infrastructure.
fierceRecursive DNS recon tool with wildcard detection and subdomain discovery.DNS reconnaissance and identifying hidden or wildcard subdomains.
dnsreconCombines multiple recon techniques (brute force, zone transfers, cache snooping) into one tool.Full-scope DNS enumeration with optional output formats for reports or automation.
theHarvesterOSINT tool that pulls data like emails and DNS records from search engines and public sources.Gathering emails, names, and hostnames associated with a domain during recon.
Online DNS ToolsBrowser-based interfaces like MXToolbox, DNSDumpster, etc.Easy DNS queries without terminal; good for domain availability checks or quick lookups when on a restricted system.