dnsx
Fast, open-source DNS toolkit from ProjectDiscovery for bulk resolution, multi-record queries, subdomain brute-forcing and wildcard filtering in recon pipelines.
What it is
dnsx is a command-line DNS toolkit from ProjectDiscovery, written in Go, that runs many DNS queries in parallel. You give it a list of hostnames, domains, IP ranges or ASNs. It resolves them, pulls the record types you ask for, and can brute-force subdomains from a wordlist. It also filters out wildcard DNS answers, which otherwise fill recon results with hosts that don't really exist.
It is aimed at penetration testers, bug bounty hunters and attack-surface teams who handle thousands of names at a time. dnsx reads from stdin and writes plain text or JSON Lines, so it usually sits in the middle of a pipeline: subfinder or another passive source supplies candidate subdomains, dnsx keeps the ones that resolve, and httpx, naabu or nuclei work on the live hosts.
Key features
- Queries A, AAAA, CNAME, NS, TXT, SRV, PTR, MX, SOA, CAA, ANY and AXFR, or every type at once with
-recon - Subdomain brute-forcing with
-dand-w, includingFUZZplaceholders in the domain pattern - Wildcard filtering, either manual for one domain (
-wd) or automatic across mixed input (-auto-wildcard) - Custom resolver lists over UDP, TCP, DNS-over-HTTPS and DNS-over-TLS (
-r) - Reverse lookups on CIDR ranges and ASNs to find hostnames from PTR records
- Optional CDN and ASN tagging, response-code filtering (
-rcode) and DNS tracing - Output as plain text, JSON Lines (
-j) or a custom template (-ot '{{host}} {{a}}') - Thread count, rate limit, retries and resume support for long runs; also usable as a Go library
Install
With Go (the docs ask for a recent Go toolchain; the binary goes into $HOME/go/bin):
go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest
On macOS or Linux with Homebrew:
brew install dnsx
With Docker:
docker pull projectdiscovery/dnsx:latest
docker run --rm -i projectdiscovery/dnsx:latest -h
Prebuilt binaries for Linux, macOS and Windows are on the GitHub releases page. Download the archive for your OS, unzip it, and put dnsx on your PATH.
Getting started
Put a few hostnames you are allowed to test in a file, then resolve them and show the A records:
printf 'example.com\nwww.example.com\nnope.example.com\n' > hosts.txt
dnsx -l hosts.txt -silent -a -resp
Each line shows a host that resolved, with its addresses in brackets. Names that don't resolve are left out. To keep live hosts from a passive enumeration and drop wildcard noise, save the results to a file:
subfinder -d example.com -silent | dnsx -silent -auto-wildcard -o live.txt
Add -j to get one JSON object per host, with every record type, the TTL and the resolver used.
Good to know
- Free and open source under the MIT licence. Development is active: v1.3.1 came out in August 2026 and commits were still landing in November 2026.
- Needs no root rights. Memory use is small, but the default of 100 threads can produce a lot of UDP traffic. Use
-rland-tto stay polite and avoid dropped packets. - By default it sends queries to public resolvers (Google, Cloudflare, Quad9). Use
-rto pick your own, and use-hfif/etc/hostsentries should count. - Some VPNs throttle heavy DNS traffic, which shows up as missing results.
-l(resolve) and-w(brute-force) cannot be combined. With-wd, other record flags are ignored.- Brute-forcing and zone-transfer attempts hit third-party name servers, so run them only against domains you own or are authorised to test.
Alternatives
- massdns: a raw C stub resolver that is very fast for huge lists, but it needs more parsing and resolver tuning.
- puredns or shuffledns: wrappers around massdns that focus on brute-forcing and wildcard cleanup at scale.
- dig or kdig: best for checking one record by hand or debugging DNSSEC and transport details.
