Crawling and indexing
Why do bots request .env files on my site?
A secret-file probe is a request for a file that should never be public, such as /.env, /.git/config or a backup, hoping a site exposed it. Probes usually borrow a well-known crawler's name. No real crawler needs these files, so a request for one marks the client as hostile.
How to read it
Probes scan the whole internet, so every site gets them, large or small. The risk is not the request but a file that answers it: make sure secret files return 404 or 403, never 200.
Blocking by user agent does not help, because probes use any name. Rules that block those paths, or unverified clients claiming a crawler's name, do.
Example from rankecho.io
737 probes using crawlers' names
In 30 days, 4,505 requests to rankecho.io used the name of one of the crawlers we track without Cloudflare verifying it. 737 of them asked for secret files such as /.env or compose.yml.
No verified crawler asked for any of these files. rankecho.io answers them with 404.
Source: rankecho.io's Cloudflare logs, unverified requests, 17 October to 15 November 2026.
Questions people ask
Why do bots request .env files on my site?
A secret-file probe is a request for a file that should never be public, such as /.env, /.git/config or a backup, hoping a site exposed it. Probes usually borrow a well-known crawler's name. No real crawler needs these files, so a request for one marks the client as hostile.
Is my site hacked if I see .env requests?
No. Probes are routine. Check that the files return 404 or 403; if one ever returned 200, rotate every secret in it.
Should I block these requests?
Blocking the paths at your CDN or server is cheap and safe. Blocking by user agent is not reliable.
Related terms
Read more on rankecho.io
See it on your own site
RankEcho reads your Search Console data and asks AI assistants whether they cite you, then shows each of these numbers for your pages. The audit is free.
Definition and example checked 2026-11-16.
