To detect bots by IP address, look up the client IP on sensitive endpoints and check what kind of network it comes from. Most automated traffic arrives from hosting and datacenter ranges, proxies, VPNs or Tor, so those network classes and the IP's reputation are the first filter. Crawlers that call themselves Googlebot or GPTBot are checked against the IP ranges their operators publish, and everything left gets a score.
Why IP is such a strong bot signal
Running a meaningful bot operation means making a lot of requests. To avoid trivial rate-limiting, operators route through proxies, VPNs, Tor or cloud servers. Each of those leaves an IP-level fingerprint:
- Datacenter / hosting IPs: bots love cheap cloud compute.
- Proxies: especially rotating residential proxies that mimic real users.
- VPNs: to mask origin and bypass simple geo rules.
- Tor exit nodes: for full anonymity.
A request from any of these is not automatically a bot, but it is automatically more suspicious than one from a stable residential connection.
The clearest case shows up in analytics: a spike of "users" from China or Singapore with no engagement, almost all from cloud networks. See China and Singapore bot traffic.
The same filter buys time during a vulnerability rush: the PHP2Shell guide shows how to keep scanner traffic away from PHP while you patch.
Check an IP for proxy, VPN and Tor signals
The IP signals that expose bots
- Hosting origin. Traffic from a cloud or hosting ASN that claims to be a casual visitor is the classic bot tell. ASN data surfaces this.
- Proxy type. Residential proxies are the strongest indicator of deliberate evasion; see what is a residential proxy.
- VPN usage. Common for credential stuffing and multi-accounting.
- Tor. Full anonymisation; treat with caution on sensitive endpoints.
- Reputation. Prior abuse from the IP or its range raises risk.
Turn signals into a decision
Rather than reacting to each flag separately, roll them into a score. An IP fraud score combines proxy, VPN, Tor, hosting and reputation signals into a single 0–100 value, so your rule can be as simple as:
- score < 30 → allow
- 30–70 → challenge (CAPTCHA, verification)
-
70 → block or send to review
This keeps the logic in your app simple while the heavy lifting happens in the lookup.
A practical setup
A solid IP-based bot defense looks like this:
- On sensitive endpoints (login, signup, checkout, search, API), look up the client IP via the proxy detection API.
- Allowlist known-good bots (search engine crawlers and your own monitoring) by their published ranges.
- Score everything else and apply friction proportional to the score.
- Layer behaviour for the hard cases: request velocity, missing headers, impossible interaction timing.
Don't rely on IP alone for the hardest bots
The most advanced bots buy fresh residential IPs and mimic human behaviour. IP intelligence still raises their cost and catches the majority, but pair it with behavioural analysis for defense in depth. IP is the cheapest, fastest first filter, not the whole strategy.
Bottom line
Most bots betray themselves at the network layer by routing through proxies, VPNs, Tor or hosting IPs. Check the client IP on sensitive endpoints, roll the signals into a score, and challenge or block based on that score, then add behavioural signals for the sophisticated minority.
FAQ