dnsx
Resolve DNS queries for multiple hostnames
TLDR
Query the A record of a (sub)domain and show [re]sponse received
Query all the DNS records (A, AAAA, CNAME, NS, TXT, SRV, PTR, MX, SOA, AXFR, CAA)
Query a specific type of DNS record
Output response only (do not show the queried domain or subdomain)
Display raw response of a query, specifying resolvers to use and retry attempts for failures
Brute force DNS records using a placeholder
Brute force DNS records from a list of domains and wordlists, appending output to a file with no color codes
Extract CNAME records for the given list of subdomains, with rate limiting DNS queries per second
SYNOPSIS
dnsx [-l list] [-d domain] [-r resolvers] [-t threads] [-probe record_types] [-o output] [global flags]
PARAMETERS
-l, --list string
File containing list of domains/subdomains to process
-d, --domain stringArray
Comma-separated domains to query directly
-r, --resolvers stringArray
Resolver file or comma-separated list (e.g., 8.8.8.8:53)
-resp, --resolvers-profile string
Public resolver profile (default: fastest)
-t, --threads int
Number of concurrent threads (default: 25)
-probe stringArray
DNS record types to probe (a,aaaa,cname,ns,mx,txt,ptr,soa)
-probe-all
Probe all supported record types
-a
Resolve A records
-aaaa
Resolve AAAA records
-cname
Resolve CNAME records
-ns
Resolve NS records
-mx
Resolve MX records
-txt
Resolve TXT records
-ptr
Resolve PTR records
-soa
Resolve SOA records
-rc, --recursion
Enable recursive CNAME resolution
-depth int
Recursion depth limit (default: 3)
-wildcard
Manual wildcard domain for filtering
-fwf, --filter-wildcard
Auto-detect and filter wildcard responses
-validate
Validate responses against detected wildcard
-o, --output string
Output file path
-json
Output as JSON lines
-silent
Suppress banner and only show results
-c, --clear
Clear screen before output
-v, --verbose
Verbose logging
-cn, --config string
Configuration file path
-rl, --rate-limit int
Max requests per second per resolver (default: 50000)
DESCRIPTION
dnsx is a high-performance, multi-threaded DNS resolution toolkit developed by ProjectDiscovery. Designed for security researchers, bug bounty hunters, and network analysts, it excels at resolving large lists of domains/subdomains to IP addresses, detecting wildcard DNS responses, and probing various DNS record types like A, AAAA, CNAME, NS, MX, TXT, PTR, and SOA.
It supports input from files, stdin, or direct domains, with customizable resolvers from files or public profiles. Key strengths include recursion for CNAME chains, wildcard filtering/validation, and output in plain text or JSONL formats. Optimized for speed with thread control and rate-limiting avoidance, dnsx handles millions of queries efficiently.
Common use cases: subdomain enumeration validation, wildcard detection in bug bounties, and passive reconnaissance. It's part of the ProjectDiscovery suite alongside tools like nuclei and subfinder, making it ideal for automated workflows.
CAVEATS
Not a standard Linux utility; requires Go installation or binary download from GitHub. High thread counts may overwhelm public resolvers leading to rate-limits. Wildcard detection assumes consistent server behavior. Stdin input must be one host per line.
INSTALLATION
curl -sfL https://i.projectdiscovery.io/dnsx/install.sh | sh
or go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest
EXAMPLE USAGE
cat subdomains.txt | dnsx -silent -a -aaaa -cname -o resolved.txt
dnsx -l hosts.txt -r resolvers.txt -fwf -probe-all -json
HISTORY
Developed by ProjectDiscovery starting 2021 as open-source tool on GitHub. Evolved from needs in bug bounty automation, integrated with subfinder/nuclei. Latest v1.2+ adds enhanced recursion and resolver profiles.


