Fake Googlebot in Your Access Log: How to Tell It From the Real Crawler
Published
The Googlebot user agent copied by a client that is not Google's crawler — on our server nearly every request that claimed to be Googlebot, and mostly after files that hold secrets — which only the request's source address can tell apart from the real thing.
What it looks like
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Chrome/130.0.0.0 Safari/537.36
The User-Agent header as an access log records it — in nginx's and Apache's combined format, the last quoted field.
On our own server, the 30 days to 1 November 2026
8,355
requests from outside Google's published crawler ranges · about 279 a day
11
source addresses
16
from Google's own ranges
| Most requested paths | Requests |
|---|---|
| /.env | 27 |
| /.aws/credentials | 26 |
| /.ssh/id_rsa | 26 |
| /.npmrc | 26 |
| /config/database.yml | 26 |
| /.env.production | 25 |
| /.env.save | 25 |
| /www/.env | 25 |
LogTriage's production API server (Hetzner, Germany): port 22 open to the internet, key-only since 6 October 2026 (password and keyboard-interactive authentication off); nginx in front of the API on ports 80 and 443. Requests nobody asked for (API traffic and our own monitoring left out); paths as requested, query strings dropped and identifiers redacted; counted weekly from the nginx access log. Linked paths are scanner probes explained on their own pages. More in the monthly attack report, and you can check the addresses in your own log against free blocklists.
Sources on who sends it
- developers.google.com/crawling/docs/crawlers-fetchers/verify-google-requests ↗︎
- developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers ↗︎
- developers.google.com/static/crawling/ipranges/common-crawlers.json ↗︎
The operator's or the researchers' own pages; what this page says about the sender comes from them.
What it is
Googlebot is the user agent of Google’s web crawler, and one of the most copied: any client can send it, because the User-Agent header is whatever the sender writes. The strings above are two of the forms Google documents for Googlebot (the rarer short form, and the desktop crawler with a Chrome version in place of Google’s W.X.Y.Z); a fake one is byte-for-byte the same. Google’s crawler documentation says it plainly: the user agent string can be spoofed.
On our own server the difference is stark. In the last 30 days, thousands of requests carried a Googlebot user agent from addresses outside Google’s published crawler ranges, while only a handful came from Google itself (the counts are above). The impostors did not crawl pages. The paths they asked for most were /.env and copies of it such as /.env.production and /www/.env, /.aws/credentials, /.ssh/id_rsa, /.npmrc and /config/database.yml — files that hold secrets when a deployment leaves them inside the web root. Even the most requested of these was asked for only a couple of dozen times, so the thousands of requests were spread over hundreds of different paths: a wordlist, not a crawl.
Who sends it
Two different parties. The real Googlebot is Google’s crawler, and Google documents how to confirm it. Its common crawlers, Googlebot among them, resolve to names in googlebot.com; for a manual check, a reverse DNS lookup of the address must give a name in googlebot.com, google.com or googleusercontent.com, and a forward lookup of that name must return the same address. For automated checks Google publishes its ranges as JSON files, Googlebot’s in common-crawlers.json. Our counter uses that file.
Everyone else using the string is pretending. On our server the spoofed requests came from about ten addresses, hundreds of requests per address on average, which is the pattern of scanning scripts rather than of many independent clients.
Is it a threat?
The request itself is reconnaissance (MITRE ATT&CK T1595.003, wordlist scanning). The risk is in what it finds: a readable .env or credentials file hands over keys at once (T1552.001, credentials in files), and the sender does not need to be clever to use them. A fake Googlebot that only received 404 responses learned nothing; one that received a 200 for a secret file is an incident.
How to handle it
- Find requests that claim to be Googlebot and check their addresses against Google’s ranges, or with reverse and forward DNS.
- For every address that fails, look at the paths and the status codes. Any 200 for a file such as
/.envor/.aws/credentialsmeans the file was served: move it out of the web root and rotate every secret in it. - Block the impostors by address check, never by user agent alone, so Google’s crawler keeps working.
List the addresses that sent a Googlebot user agent, busiest first, then check one of them:
grep -i 'googlebot' /var/log/nginx/access.log | awk '{print $1}' | sort | uniq -c | sort -rn | head
host 203.0.113.9 # real Googlebot: a name in googlebot.com, google.com or googleusercontent.com
Build an nginx include from Google’s published ranges and refuse a Googlebot user agent from anywhere else:
curl -s https://developers.google.com/static/crawling/ipranges/common-crawlers.json \
| jq -r '.prefixes[] | (.ipv4Prefix // .ipv6Prefix) + " 1;"' > /etc/nginx/google-crawler-ranges.conf
# http block: 1 when the client address is in Google's published crawler ranges
geo $google_crawler {
default 0;
include /etc/nginx/google-crawler-ranges.conf;
}
map "$http_user_agent|$google_crawler" $fake_googlebot {
default 0;
"~*googlebot.*\|0$" 1;
}
# server block
if ($fake_googlebot) {
return 403;
}
Refresh the include on a schedule, since the file carries its own creationTime and Google’s ranges change. The free log analyzer groups an access log’s scanners by source and flags any secret-file probe that got a 200.
Probes it sends
- GET /.env Requests in Your Logs: Scanners Hunting for App Secrets An automated scan for application .env files, which hold database passwords, API keys and other secrets in plain text whenever the web server hands one back.
- GET /.aws/credentials Requests in Your Logs: Scanners Hunting AWS Keys An automated scan for the AWS shared credentials and config files, which hold long-lived access keys and profile settings in plain text whenever a web server hands one back.
Detect it
Frequently Asked Questions
- How do I verify that a Googlebot request really comes from Google?
- Google documents two ways. For one-off checks, run a reverse DNS lookup on the address with the host command, check that the name is in googlebot.com, google.com or googleusercontent.com, then run a forward lookup on that name and confirm it returns the same address. For checks at scale, match the address against the IP ranges Google publishes as JSON; Googlebot's are in common-crawlers.json.
- Why do scanners pretend to be Googlebot?
- Few site owners want to block Google's crawler, so a request that looks like it is less likely to be refused, and the header costs nothing to fake. Google's own crawler documentation warns that the user agent string can be spoofed. On our server nearly every request that claimed to be Googlebot came from outside Google's ranges.
- Will blocking fake Googlebots hurt my search ranking?
- Not if the rule checks the address and not just the user agent. Google's real crawler comes from the ranges Google publishes, so a rule that refuses a Googlebot user agent only from other addresses leaves Google's crawling untouched. Blocking every request that says Googlebot, without the address check, would stop the real crawler too.
- What do fake Googlebots ask for?
- In the last 30 days on our own server, the paths they requested most were /.env and its variants, /.aws/credentials, /.ssh/id_rsa, /.npmrc and /config/database.yml, files that hold API keys, cloud credentials, SSH keys, package-registry tokens and database passwords. Google's common crawlers respect robots.txt and follow links; guessing at secret files is not crawling.
See which scanners are hitting your server
Drop an nginx or Apache access log into the free browser analyzer: scanners and probes are grouped by source with the evidence lines, any probe that got a 200 back is flagged, and known user agents and probes link back here. Nothing is uploaded.
Investigating something right now? LogTriage checks every address in the file against threat intelligence and writes the incident report: 10 analyses a month free. The incident pack adds the in-depth AI analysis and files up to 100 MB: 25 analyses for $19, one payment, no subscription. Pricing