How to find all subdomains of a domain (for your own site)
TL;DR: To list the subdomains of a domain you own, start with your DNS zone in your hosting or DNS panel, then check Certificate Transparency logs (crt.sh), Google search with site: operators and a passive tool such as Amass. Zone transfers (AXFR) are usually disabled. Finding forgotten subdomains protects you from subdomain takeover and exposed staging sites. Only scan domains you own or have permission to test.
Why list your subdomains
Old subdomains such as staging., dev., old. or test. are often forgotten and can expose outdated software or data. A subdomain that points to a service you cancelled can be claimed by someone else, which is called a subdomain takeover. A regular inventory also helps with SSL coverage and migrations.
Method 1: your DNS zone
The most complete list for your own domain is the zone file. Open your DNS manager and look at A, AAAA and CNAME records. Names like blog, shop and mail are subdomains. See DNS record types explained. Wildcard records (*) match any name, so check them too.
Method 2: Certificate Transparency logs
Public certificate logs list certificates issued for a domain. Search crt.sh for %.yourdomain.com and you will see names that had certificates, including ones you forgot. It shows subdomains with HTTPS only.
Method 3: Google search
Search site:yourdomain.com -www to see indexed subdomains, or site:*.yourdomain.com. It misses subdomains that are not indexed.
Method 4: passive scanning tools
Tools such as Amass or Sublist3r combine search engines, certificate logs and public data sources to enumerate subdomains. Use them only on your own domains or with written permission. Active brute-forcing of other people's domains may be illegal.
What to do with the list
- Remove DNS records for services you no longer use.
- Put staging sites behind a password or IP restriction. See IP allowlisting for WordPress.
- Check that every subdomain has valid HTTPS.
- Decide whether blog content should live on a subdomain or folder. See subdomain vs subdirectory.
FAQs
How do I find all subdomains of a domain?
Check your DNS zone, certificate logs, Google search and passive tools.
Can I see subdomains with a normal lookup?
Not all of them. A basic lookup shows only the names you ask for.
What is a zone transfer?
A way to copy a full DNS zone. It is normally disabled for security.
What is a wildcard DNS record?
A record that answers for any subdomain name that does not have its own record.
What is subdomain takeover?
When a subdomain points to a service you no longer control and someone else claims it.
Is scanning someone else's subdomains legal?
Not without permission, so only test your own.
Do subdomains need their own SSL?
Each needs coverage from a certificate, either individually or via a wildcard.
How often should I audit subdomains?
At least every few months and after any migration.
Conclusion
Use your DNS zone as the source of truth, then compare with Certificate Transparency logs and search results to catch forgotten names. Remove what you do not need and protect the rest.
HostCloud helps Indian websites with reliable hosting, domains and support. See the options at https://hostcloud.in.
Sources: