Google Dorking: How to Use Google Dorks for OSINT & Security Research
Learn Google dorking: advanced search operators, a worked OSINT example on a domain you own, GHDB dorks, a cheat sheet, and how to protect your site.
What Is Google Dorking?
Google dorking, also called Google hacking, is the use of advanced Google search operators to locate precisely indexed pages, files, and clues for OSINT or authorized security research. It helps narrow public search results by domain, URL, title, text, file type, and date; it does not bypass authentication or grant permission to access anything found.
Search Engine Intelligence Gathering
Google dorking is a methodology for extracting intelligence from search engine indexes. Search engines continually discover and index web content, including files and pages their owners may not have intended to expose publicly. Carefully constructed queries can surface documents, configuration files, directory listings, login portals, error messages, and other clues about a site's security posture.
Google dorking is:
Google dorking is not:
Throughout this guide, example.com and target.com represent a domain you own or have written permission to assess. Finding a page in Google's index does not authorize accessing or exploiting it.
A Short History of Google Hacking
Security researcher Johnny Long popularized Google hacking and launched the Google Hacking Database in 2004. The database, now maintained by Exploit-DB, organizes useful search patterns into categories such as sensitive directories, exposed files, error messages, and login portals.
The term "Google hacking" describes the precision of the searches, not necessarily illegal activity. Defensive teams can use the same techniques to find and remove their own exposed content.
Prerequisites
Before practicing Google dorking, understand:
How Google Dorking Works
Google search can be understood as a three-stage process:
A dork searches Google's index, not the target's live file system. Consequently, results can be incomplete, delayed, or stale. A live page might not yet be indexed, while a removed page might remain in search results until Google processes the change.
Plain keyword searches often mix results from unrelated domains and contexts. Operators reduce that noise. For example:
site:example.com filetype:pdf "security policy"
This query asks Google to look within example.com, prefer PDF files, and match the phrase "security policy." Each added operator expresses another constraint.
Google does not guarantee exhaustive results. Result counts are estimates, some operators behave approximately, and Google may rewrite complex queries. Treat dorking as a discovery method rather than a complete inventory.
How to Use Google Dorking in 5 Steps
Authorized use only: Run these queries against domains you own or have written permission to assess. Do not use a search result as permission to access sensitive content.
1. Pick a Clear Goal
Define what you are trying to identify before writing a query. Appropriate defensive goals include:
A precise goal makes it easier to select operators and recognize irrelevant results.
2. Start With One Operator
Begin by establishing domain scope:
site:target.com
Review the types of pages Google associates with the domain. Note important subdomains, recurring paths, and obvious sources of noise.
3. Add a Second Operator
Add one constraint that supports the goal. To review indexed PDF documents:
site:target.com filetype:pdf
To focus on titles containing a particular phrase:
site:target.com filetype:pdf intitle:"security policy"
Adding operators gradually makes it easier to identify which condition removed useful results.
4. Filter Noise With the Minus Sign
Exclude archives, templates, documentation, or other irrelevant paths:
site:target.com filetype:pdf "security policy" -inurl:archive -inurl:template
The minus sign must touch the excluded term. -inurl:archive works; - inurl:archive does not express the same filter.
5. Verify Live and Document the Result
Open only URLs that fall within the authorized scope. Confirm whether each page is still live, whether it matches the snippet, and whether authentication is enforced. Do not attempt to guess credentials or bypass controls.
Record:
A useful refinement sequence is:
site:target.com
site:target.com filetype:pdf
site:target.com filetype:pdf intitle:"security policy"
site:target.com filetype:pdf intitle:"security policy" -inurl:archive
Google Search Operators: The Complete Table
The following operators cover the primary scope, file, relationship, date, and phrasing controls used in Google dorking. Examples are restricted to placeholder domains for authorized practice.
Scope, Field, and Relationship Operators
| Operator | Syntax | Purpose | Example |
|---|---|---|---|
site: | site:domain | Restricts results to a domain or subdomain. | site:example.com |
inurl: | inurl:term | Requires a term in the URL. | site:example.com inurl:login |
intitle: | intitle:term | Requires a term or phrase in the page title. | site:example.com intitle:"security policy" |
intext: | intext:term | Looks for a term in visible page text. | site:example.com intext:"internal use" |
allintitle: | allintitle:term1 term2 | Requires all listed terms in the title. | site:example.com allintitle:security policy |
allinurl: | allinurl:term1 term2 | Requires all listed terms in the URL. | site:example.com allinurl:account reset |
inanchor: | inanchor:term | Looks for terms used in links pointing to a page. | site:example.com inanchor:"privacy policy" |
allintitle:, allinurl:, and inanchor: can behave inconsistently in complex queries. If a query produces unexpected results, simplify it and add conditions one at a time.
File Type and Date Operators
| Operator | Syntax | Purpose | Example |
|---|---|---|---|
filetype: | filetype:extension | Filters for an indexed file extension. | site:example.com filetype:pdf |
ext: | ext:extension | Common alternative to filetype:. | site:example.com ext:xlsx |
after: | after:YYYY-MM-DD | Prefers results after a date. | site:example.com after:2024-01-01 |
before: | before:YYYY-MM-DD | Prefers results before a date. | site:example.com before:2025-01-01 |
| Combined dates | after:DATE before:DATE | Searches within a date range. | site:example.com after:2024-01-01 before:2025-01-01 |
Date filters are useful for refinement, but they are not reliable proof of a document's publication or modification date.
Phrasing and Query Logic
| Control | Syntax | Purpose | Example |
|---|---|---|---|
| Exact phrase | "phrase" | Keeps words together in the stated order. | site:example.com "annual report" |
| Exclusion | -term | Excludes a word, phrase, or operator match. | site:example.com filetype:pdf -inurl:archive |
| OR | term1 OR term2 | Accepts either condition; use uppercase OR. | site:example.com (inurl:login OR inurl:signin) |
| Parentheses | (condition OR condition) | Groups alternatives and prevents accidental scope changes. | site:example.com (filetype:pdf OR filetype:docx) |
Retired Operators
Do not build current workflows around these retired operators:
cache: no longer works. Google removed its cached-page feature in 2024.link: was discontinued and no longer provides backlink searches.info: was discontinued.daterange: with Julian dates is effectively unsupported. Use before: and after: instead.Worked Example: Mapping a Domain You Own
This walkthrough is for a domain you own or are authorized to assess. Replace example.com with that domain. Every output described below is illustrative and does not claim that a corresponding page exists.
Step 1: Establish an Index Census
site:example.com
Illustrative output: A collection of indexed home pages, subdomain pages, documents, and older URLs associated with the domain.
Record recurring subdomains and paths, but do not treat Google's estimated result count as an exact inventory.
Step 2: Identify Indexed Documents
site:example.com filetype:pdf
site:example.com filetype:pdf (intitle:policy OR intitle:report)
Illustrative output: Zero or more PDF result titles and snippets that may represent policies, reports, forms, or archived material.
Verify each candidate URL within scope. Check whether it is still publicly available and whether its content was intended for public distribution.
Step 3: Locate Login Portals
site:example.com (inurl:login OR inurl:signin)
Illustrative output: Candidate authentication pages, help documentation, or unrelated pages that happen to contain the selected URL terms.
Confirm only that the page exists and requires appropriate authentication. Do not attempt passwords, credential stuffing, or authentication bypasses.
Step 4: Check for Directory Listings
site:example.com intitle:"index of"
Illustrative output: Potential directory index pages or ordinary documents using a similar title.
A matching title is a lead, not proof of an exposed directory. If a live directory listing appears, stop after the minimum validation allowed by the assessment. Do not download its contents unless the written scope explicitly permits it.
Step 5: Verify and Document Every Hit
For each candidate, compare the Google result with the live URL.
Illustrative verification record:
| Field | Illustrative entry |
|---|---|
| Query | site:example.com filetype:pdf |
| Search observation | A PDF title appeared in the result list |
| Live check | URL returned a public document, redirect, authentication page, or not-found response |
| Evidence | URL, title, status, and non-sensitive screenshot |
| Next action | Keep, remove, authenticate, or request deindexing |
Search snippets can lag behind a site. Verification should be minimal, authorized, and limited to determining whether the reported exposure still exists.
Practical Google Dorks by Goal
Use every query in this section only on a domain you own or have written authorization to test. These searches identify candidates for review; they do not prove a vulnerability or authorize further access.
Exposed Config Files
These patterns look for filenames or text commonly associated with configuration files:
site:target.com inurl:db_config.php
site:target.com inurl:config.php intext:password
site:target.com filetype:env intext:DB_PASSWORD
site:target.com inurl:wp-config.php intext:DB_PASSWORD
A filename match does not mean Google can read the underlying source. If a snippet reveals an actual secret, stop, avoid copying it unnecessarily, report it, and rotate the affected credential.
Exposed Documents
Use file and title filters to audit documents intended for public download:
filetype:xls site:target.com inurl:password
filetype:pdf intitle:"confidential" site:target.com
filetype:sql intext:password intext:INSERT site:target.com
site:target.com (filetype:docx OR filetype:xlsx) "internal use"
Words such as "confidential" can also appear in harmless policies and templates. Review context before assigning severity.
Open Directories
Directory listing searches preserve several useful patterns from traditional dorking workflows:
site:target.com intitle:"index of" admin
site:target.com intitle:"index of" password
site:target.com intitle:"index of" backup
site:target.com intitle:"index of" (config OR logs)
Do not browse or download files merely because a listing is public. Validate only what the authorized assessment permits.
Login Pages & Admin Panels
These queries help inventory authentication and management surfaces:
site:target.com (inurl:login OR inurl:signin)
site:target.com (inurl:admin OR inurl:dashboard) (intitle:login OR intitle:signin)
site:target.com inurl:phpmyadmin intitle:phpMyAdmin
site:target.com inurl:"/wp-admin/" intitle:"WordPress Admin"
An indexed login page is not automatically a vulnerability. Review whether it has strong authentication, appropriate access restrictions, and current software through separate authorized testing.
Error Messages & Debug Info
Verbose errors can disclose paths, technologies, or implementation details:
site:target.com intext:"stack trace" (intext:"Exception" OR intext:"Error")
site:target.com (intext:"debug" OR intext:"traceback") -inurl:docs
site:target.com inurl:phpinfo.php intitle:"phpinfo()"
A search snippet may be stale or may quote documentation rather than a live error. Verify context before reporting it.
Cameras & IoT
Google only finds device interfaces that are represented in its web index:
site:target.com (intitle:"network camera" OR intitle:"webcam")
site:target.com (inurl:viewer OR inurl:video) intitle:camera
site:target.com inurl:snapshot filetype:jpg
Shodan is generally better suited to authorized IoT and service discovery because it focuses on internet-facing service metadata. Google dorking should remain a supplementary, domain-scoped check.
People & Social Profiles
Public staff, author, and profile pages can support legitimate organizational mapping:
site:target.com (inurl:team OR inurl:staff OR inurl:people)
site:target.com (inurl:author OR inurl:profile)
site:target.com (intext:"LinkedIn" OR intext:"GitHub")
site:target.com filetype:pdf ("curriculum vitae" OR "biography")
Collect only information relevant to the authorized goal. Avoid compiling unnecessary personal data or using it for harassment, impersonation, or credential attacks.
Combining Operators: Building Precise Dorks
Apply combined queries only to authorized assets. More operators create more precision, but they can also hide useful results or be ignored by Google.
A precise dork commonly combines scope, location, content, and exclusion controls:
site:target.com filetype:pdf intitle:"security policy" -inurl:archive
For alternative paths, group OR conditions:
site:target.com (inurl:admin OR inurl:dashboard) (intitle:login OR intitle:signin) -inurl:docs
Parentheses are important. Without them, an OR branch may be interpreted more broadly than intended.
Multiple file types and phrases can also be grouped:
site:target.com (filetype:xls OR filetype:xlsx) ("internal" OR "confidential") -inurl:template
A useful date refinement starts with a broad document query:
site:target.com filetype:pdf "annual report"
It can then be narrowed to a time window:
site:target.com filetype:pdf "annual report" after:2024-01-01 before:2025-01-01
Finally, remove known noise:
site:target.com filetype:pdf "annual report" after:2024-01-01 before:2025-01-01 -inurl:draft -inurl:archive
If a complex query unexpectedly returns nothing, remove the newest condition and test again. This identifies whether a date, quote, exclusion, or field operator was too restrictive.
The Google Hacking Database (GHDB)
The Google Hacking Database is an Exploit-DB collection of search queries organized by security-relevant goals. Johnny Long launched GHDB in 2004, and it remains a useful source for learning how operators can be combined.
GHDB entries are patterns, not guarantees. Some are product-specific, some become outdated, and some contain retired syntax. Never run a broad GHDB query against unrelated organizations.
What Dorking Has Exposed
GHDB documents recurring categories of indexed exposure rather than proving particular breaches or incidents.
| GHDB category | What it can identify | Authorized example |
|---|---|---|
| Footholds | Setup pages or exposed management surfaces that require review. | site:target.com (inurl:setup OR inurl:install) intitle:"setup" |
| Files Containing Usernames | Documents or listings containing username-related text. | site:target.com filetype:txt intext:"username" |
| Sensitive Directories | Indexed backup, configuration, log, or administrative directories. | site:target.com intitle:"index of" backup |
| Web Server Detection | Default pages and server-identification clues. | site:target.com intitle:"default page" intext:"server" |
| Vulnerable Files | Files or paths associated with potentially risky components. | site:target.com inurl:phpinfo.php |
| Error Messages | Verbose errors, traces, and implementation details. | site:target.com intext:"stack trace" |
| Login Portals | Authentication and management entry points. | site:target.com (inurl:login OR inurl:signin) |
These categories show what dorking can surface: foothold indicators, username-containing files, sensitive directories, web server clues, potentially vulnerable files, error messages, and login portals. A category match does not prove compromise or authorize interaction.
How to Browse and Adapt a GHDB Dork Responsibly
site:target.com intitle:"index of" backup
Automating Google Dorks
Automate only an authorized, domain-scoped query list. Respect Google's terms and stop when Google presents a CAPTCHA or other blocking response.
Pagodo can run GHDB-derived dorks against a specified domain. A domain-scoped invocation is:
python pagodo.py -d target.com -g dorks.txt -l 50 -s 1.0
Here, -d supplies the authorized domain and -g supplies the dork file. The invocation also applies Pagodo's -l 50 limit and -s 1.0 sleep setting. Check the installed release's help before use because command-line interfaces can change.
A delay does not guarantee that Google will accept automated requests. Aggressive querying can trigger CAPTCHAs, temporary blocks, or incomplete results. Do not evade those controls with proxy rotation or CAPTCHA bypass services.
For small reviews, a manual workflow is usually easier to validate:
Google Dorking Cheat Sheet
Every starter below is scoped to target.com. Replace it only with a domain you own or have written permission to assess.
Operator Quick Reference
| Need | Operator or pattern |
|---|---|
| Restrict a domain | site:target.com |
| Match URL text | inurl:login |
| Match title text | intitle:"index of" |
| Match page text | intext:"internal use" |
| Require all title terms | allintitle:security policy |
| Require all URL terms | allinurl:account reset |
| Match link text | inanchor:"privacy policy" |
| Select a file type | filetype:pdf or ext:pdf |
| Match an exact phrase | "security policy" |
| Exclude a condition | -inurl:archive |
| Accept alternatives | (inurl:login OR inurl:signin) |
| Filter by date | after:2024-01-01 before:2025-01-01 |
Goal to Dork Starter
| Goal | Starter query |
|---|---|
| Domain census | site:target.com |
| PDF inventory | site:target.com filetype:pdf |
| Configuration review | site:target.com inurl:config.php |
| Spreadsheet review | site:target.com (filetype:xls OR filetype:xlsx) |
| Directory listings | site:target.com intitle:"index of" |
| Login portals | site:target.com (inurl:login OR inurl:signin) |
| Error messages | site:target.com intext:"stack trace" |
| Profile pages | site:target.com (inurl:author OR inurl:profile) |
| Camera pages | site:target.com intitle:"network camera" |
| Recent PDFs | site:target.com filetype:pdf after:2025-01-01 |
Troubleshooting Google Dorking Problems
Troubleshoot only within the same authorized scope. Do not respond to blocks by attempting to bypass Google's controls.
| Problem | Likely cause | Corrective action |
|---|---|---|
| No results | Exact phrases or combined operators are too restrictive. | Remove one quote, exclusion, or operator at a time and retry. |
| Too many results | The query lacks domain scope or a distinguishing field. | Add site:target.com, then add inurl:, intitle:, or filetype:. |
| CAPTCHA or blocks | Too many manual or automated searches were sent quickly. | Stop, wait, reduce volume, increase delays, and prefer a manual workflow. |
| Operator ignored | The query is overly complex, malformed, or uses a retired operator. | Test the operator alone, confirm colon placement, and rebuild gradually. |
| Cached or stale result | Google's index still contains an old title or snippet. | Check the live URL. The retired cache: operator cannot retrieve an old Google copy. |
| Dork finds nothing on target | The content may not be indexed, may require authentication, or may not exist. | Confirm scope and indexing through the site owner's Search Console data. Do not assume no result means no asset. |
site: returns the whole web | A space, missing colon, or ungrouped OR changed the query. | Use site:target.com (inurl:login OR inurl:signin) with no space after the colon. |
filetype: ignored | The extension is mislabeled, rendered through an HTML viewer, or the query was rewritten. | Verify syntax, try ext:, simplify the query, and inspect result URLs carefully. |
Protecting Your Own Site Against Dorking
Dorking is possible because content was made crawlable or otherwise exposed. The strongest defense is to prevent sensitive data from being publicly accessible in the first place.
Require Authentication and Remove Sensitive Files
401, 403, 404, or 410 responses instead of displaying sensitive content.Use robots.txt Carefully
A defensive robots.txt file might include:
User-agent: *
Disallow: /admin/
Disallow: /config/
Disallow: /backup/
Disallow: /private/
Disallow: /logs/
Disallow: *.sql
Disallow: *.env
Disallow: *.bak
However, robots.txt is not access control. It is public, compliant crawlers may obey it while others may not, and a blocked URL can sometimes remain known to a search engine. Do not rely on it to protect secrets.
A crawler blocked by robots.txt may also be unable to see a noindex directive on the blocked response. Plan crawling and removal rules carefully.
Add Noindex Directives
For non-HTML files and server responses, use:
X-Robots-Tag: noindex, nofollow
For an HTML page, an equivalent robots meta tag can be used:
<meta name="robots" content="noindex, nofollow">
These directives control indexing; they do not prevent a person from opening a publicly accessible URL. Authentication remains the primary control.
Disable Directory Listings
For Apache, directory indexing can be disabled with:
# .htaccess
Options -Indexes
Use the equivalent setting for other web servers. Also verify that default pages, backup directories, and object storage listings are not publicly enumerable.
Remove Sensitive URLs From Search
After fixing the underlying exposure:
noindex response.Search Console removal is not a substitute for deleting, protecting, or deindexing the underlying content.
Is Google Dorking Legal?
Submitting a query to a public search engine is different from accessing or exploiting what the query finds. Laws, contracts, policies, and search engine terms vary by jurisdiction and context, so no single answer applies everywhere.
Use Google dorking only for your own assets, public-interest research with an appropriate legal basis, or systems covered by written authorization. Stay within the stated scope and stopping conditions.
An indexed page is not an invitation to:
If you encounter sensitive information accidentally, stop, minimize further access, preserve only necessary evidence, and follow an approved reporting process. This guide is not legal advice.
Common Mistakes
site:target.com.or, or operators such as cache:, link:, and info: can produce misleading results.Best Practices
Summary
Google dorking uses advanced search operators to find precisely indexed information for OSINT and authorized security research. Useful operators include site:, inurl:, intitle:, intext:, filetype:, before:, after:, quotes, exclusions, OR, and parentheses.
A safe workflow starts with a defined goal, adds operators gradually, verifies results against the live site, and documents evidence. GHDB can provide query patterns, while Pagodo can assist with carefully limited automation.
Organizations should remove sensitive files, require authentication, disable directory listings, use indexing controls, and request removal of remediated URLs. Most importantly, appearing in Google's index does not authorize access or exploitation.
Knowledge Check
site: and inurl:?daterange: approach?robots.txt not an access-control mechanism?Answers: 1) site: restricts a domain, while inurl: matches URL text. 2) Quotes match a phrase, while minus excludes a condition. 3) after: and before:. 4) GHDB is Exploit-DB's dork collection; add an authorized domain scope and update stale syntax. 5) Index entries can be stale or misleading. 6) It is a voluntary crawling directive, not authentication. 7) Stop, wait, and reduce query volume without bypassing the block. 8) No.
Keep Learning
Frequently Asked Questions
Continue Learning
OSINT Tools: Best Free Tools, Techniques & Worked Examples for Beginners
The best OSINT tools for beginners — Maltego, theHarvester, Amass, Shodan, Sherlock and more — with real Kali Linux commands, a worked domain investigation, Google dorking and a cheat sheet. Learn what OSINT is and how to use it.
OSINT · BeginnerOSINT Introduction: Open Source Intelligence Gathering Techniques
Learn the fundamentals of OSINT including data sources, essential tools, the intelligence gathering methodology, and ethical considerations for open source investigations.
OSINT · IntermediateShodan Guide: Searching the Internet of Things
Learn to use Shodan for discovering internet-connected devices, analyzing exposed services, and identifying vulnerable systems through search queries.
OSINT · IntermediateAmass Guide: Open Source Attack Surface Mapping
Learn to use Amass for comprehensive attack surface mapping including DNS enumeration, subdomain discovery, integration with APIs, and visualizations.
Related Security Tools
theHarvester
Learn how to use theHarvester in Kali Linux: gather emails, subdomains, employee names, open ports, and banners from public sources with a step-by-step first scan, API keys, and worked examples for authorized OSINT recon.
Information GatheringMaltego
Learn how to use Maltego, the graphical OSINT and link analysis tool: install the free Community Edition, add entities to a graph, run transforms and read the relationships between domains, IP addresses, organizations, people, and other entities.
Information GatheringRecon-ng
Recon-ng is a full-featured Web Reconnaissance Framework focused on open source intelligence. It provides a powerful environment to conduct web-based reconnaissance quickly and thoroughly via community modules.
Information GatheringEnum4linux
Learn how to use Enum4linux to enumerate Windows and Samba systems over SMB: install it on Kali Linux, run your first scan, read the users, shares, groups and password policy it returns, and switch to enum4linux-ng for modern hosts that block null sessions.