Why finding subdomains matters
A company rarely has just one website. There is the main site, then app., api., staging., old., vpn. and a long tail of services nobody remembers launching. Each one is part of the attack surface, and the forgotten ones are the most dangerous because nobody patches them.
That is why subdomain enumeration is usually the first step of both a bug bounty hunt and a penetration test. It is also something defenders should run against their own domains regularly. If you only want a quick answer, the free subdomain finder runs the passive methods below for you in one step.
Only test domains you own or have written permission to test.
Method 1: Certificate transparency logs
Every publicly trusted TLS certificate is recorded in public certificate transparency (CT) logs. Searching those logs for a domain reveals every hostname that has ever had a certificate, including ones that are not linked from anywhere. This is passive: you never touch the target.
The crt.sh service exposes a search over the logs. A query for %.example.com returns names under that domain:
curl -s "https://crt.sh/?q=%25.example.com&output=json" \
| jq -r '.[].name_value' | sed 's/\*\.//g' | sort -u
CT logs are the single richest passive source, and they are what the online finder queries first. Their limit is that a subdomain that never had a public certificate will not appear.
Method 2: Passive DNS and data sources with subfinder
subfinder queries many passive sources at once, including CT logs, DNS datasets and search indexes, and prints the unique names it finds:
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
subfinder -d example.com -silent -o subs.txt
Adding API keys for sources that need them, through its provider configuration file, increases coverage noticeably.
Method 3: OWASP Amass
Amass combines passive collection with optional active techniques such as DNS resolution and name alterations. A passive-only run keeps it quiet:
amass enum -passive -d example.com -o amass-subs.txt
Because each tool queries a slightly different set of sources, running both subfinder and amass and merging the output beats running either alone.
Method 4: Search engines and archives
Search engines index subdomains that are linked somewhere public. A query such as site:example.com -www surfaces them. Web archives are another source: tools like waybackurls pull every URL the archive has seen for a domain, and the hostnames in that list often include subdomains that no longer appear in search.
echo example.com | waybackurls | awk -F/ '{print $3}' | sort -u
Method 5: DNS brute-forcing
Some subdomains never had a public certificate and are not linked anywhere. A brute-force approach tries a wordlist of likely names against the domain’s DNS and keeps the ones that resolve. This is an active technique, so only use it on domains you are permitted to test and keep the request rate reasonable.
subfinder -d example.com -silent | dnsx -silent
ffuf -u https://FUZZ.example.com -w names.txt -mc all -fs 0
The first line resolves the names you already collected to confirm they are live. The second shows host-header style fuzzing with ffuf once you have a wordlist.
Method 6: Reverse lookups and related domains
Once you have a few IP addresses, reverse DNS and related-domain searches can reveal more hosts that share infrastructure. Checking the SSL certificate on a known host often lists additional names in its Subject Alternative Name field, which is a quick way to find siblings.
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null \
| openssl x509 -noout -ext subjectAltName
What to do with the list
A raw list of names is only the start. Resolve each one to find which are live, note which sit behind a CDN such as Cloudflare, and check what is running on each. Look especially for:
- Staging, test and development hosts that mirror production with weaker controls.
- Admin panels and login pages exposed to the internet.
- Subdomains whose DNS record points at a deleted cloud resource, which can allow subdomain takeover.
- Outdated software versions with known vulnerabilities.
Check the HTTP security headers and SSL configuration of anything you find. For a structured next step, the website security audit guide walks through what to review on each host.
Quick comparison
| Method | Active or passive | Finds | Misses |
|---|---|---|---|
| CT logs | Passive | Any host that had a public certificate | Hosts with no certificate |
| subfinder | Passive | Names from many public sources | Private or unindexed names |
| amass | Passive or active | Broad coverage, name alterations | Names outside its sources |
| Search and archives | Passive | Publicly linked or historic names | Never-linked hosts |
| Brute-force | Active | Unlisted names on guessable words | Names not in the wordlist |
| Reverse and SAN lookups | Passive | Sibling hosts on shared infrastructure | Isolated hosts |
Try it without installing anything
The free subdomain finder combines certificate transparency and DNS lookups, resolves each name, flags Cloudflare and lets you export the results. It is the fastest way to see what a domain exposes before you decide whether to go deeper with the command-line tools above.
If you find more exposure than you expected on your own domains, a web application penetration test will show what an attacker could do with it.