How to find all subdomains of a domain
The three ways to discover subdomains, why no method is complete, and how to spot names that can be taken over.
Search certificate transparency logs, which record every public HTTPS certificate and the names on it, then test common names such as www, mail, vpn and dev against DNS. Together they find most subdomains in use. No outside method is complete, because DNS can’t be asked to list every name in a zone.
Why DNS won’t just list them
DNS answers questions about names you already know. There is no standard query for “every name under example.com”. A zone transfer (AXFR) would hand over the whole zone, but properly run nameservers refuse it to anyone outside, so outside discovery means collecting names from other places.
The methods that work
- Certificate transparency: every certificate a public authority issues is written to public logs, names included. Search a domain in the logs and you see every name that has had a certificate, even short-lived ones.
- Common names: try the names organisations tend to use, such as www, mail, webmail, vpn, remote, dev, staging, api and portal.
- DNS records you can already see: MX, SPF includes, CNAMEs and SRV records often name other hosts.
- Wildcard certificates (*.example.com) hide the individual names, so expect gaps for domains that use them.
What to look for
- Names nobody recognises: add them to the asset list or remove them.
- Old staging and test hosts that are still reachable.
- Dangling CNAMEs: a subdomain that points at a deleted cloud resource. Anyone who claims that resource name can serve content on your subdomain.
- Expired or soon-to-expire certificates on hosts people still use.
Questions people ask
Sources and further reading
Written by the middle.network team, who build and run these tools. Last checked 2026-11-21.