Good bots vs bad bots: how to tell them apart

Basic4 min readUpdated

GET /learn/bots/good-bots-vs-bad-bots/ Accept text/html text/markdown

Short answer

A good bot says who runs it, can prove it, follows your robots.txt and gives something back, like search traffic or uptime alerts. A bad bot hides or fakes its identity and works against you or your users, for example by stuffing stolen passwords, scraping prices or buying limited stock. Verify identity first, then judge behaviour.

Most sites start with the user agent, and it is the weakest evidence available. Any script can put Googlebot in its User-Agent header, and many do, because sites often wave Googlebot through. Telling good bots from bad ones comes down to two questions: can the bot prove who runs it, and does it behave the way its operator says it will?

What counts as a good bot?

A good bot is one you would allow if you knew who ran it. It names itself in the user agent with a link to documentation, and its operator publishes a way to verify it. It follows the Robots Exclusion Protocol (RFC 9309), crawls at a rate your server can handle, and gives you something back.

Common examples:

  • Search engine crawlers such as Googlebot, Bingbot and Applebot
  • Uptime and performance monitors you set up yourself
  • Feed readers and the link preview fetchers used by chat and social apps
  • Partners you integrate with, such as payment, shipping or marketplace feeds

What makes a bot bad?

A bad bot works against you or your users, or takes far more than it returns. It usually claims to be a normal browser, rotates IP addresses and goes straight to the pages that hold value: login, signup, search, product APIs and checkout.

The OWASP project lists 21 types, including credential stuffing, card testing, scalping, scraping, fake account creation and spam. OWASP automated threats explains each one.

Which bots sit in the grey zone?

Some bots are honest about who they are but still cost you more than they give:

  • SEO tool crawlers that index your links for other companies' customers
  • AI crawlers that collect pages for model training or AI answers
  • Price comparison and aggregator bots that copy your catalogue
  • Account aggregators that log in to users' accounts for them, common in finance

These are policy decisions. Should you block AI crawlers walks through the trade-offs for the largest group. Keep in mind that robots.txt is a request. Robots.txt does not stop scraping by bots that ignore it.

How do you verify that a bot is who it claims to be?

Operators of large crawlers give you at least one of three ways to check.

The first is reverse DNS followed by forward DNS. Look up the hostname for the IP, check that it belongs to the operator's domain, then look up that hostname and confirm it returns the same IP. The example below follows Google's verification guide:

bash
$ host 66.249.66.1
1.66.249.66.in-addr.arpa domain name pointer crawl-66-249-66-1.googlebot.com.
$ host crawl-66-249-66-1.googlebot.com
crawl-66-249-66-1.googlebot.com has address 66.249.66.1

For Bingbot the hostname must end in search.msn.com, as Bing describes.

The second is a published IP list. Google publishes its crawler ranges as JSON, and Bing publishes bingbot.json. Fetch the lists daily and match against them, which is faster than a DNS lookup per request.

The third is a cryptographic signature. Web Bot Auth lets a bot sign its requests with HTTP Message Signatures (RFC 9421), using Signature, Signature-Input and Signature-Agent headers. The site checks the signature against the operator's published keys. It is newer, and fewer bots support it, but it works when the bot's IPs change often.

Cache every result. DNS lookups on each request slow your site and can be abused to flood your resolver. How to verify Googlebot and other good bots has code for each method.

What should you do with each kind of bot?

Use the table as a starting point and adjust it per endpoint.

What you see Likely meaning Starting action
Known crawler name, identity verifies The real crawler Allow, apply robots.txt and a generous rate limit
Known crawler name, verification fails An impostor using a trusted name Block
Unknown bot name with a contact URL A small crawler, tool or research project Allow on public pages, rate limit, review monthly
Browser user agent plus automation signals A bot hiding as a person Challenge or block, strictest on login, signup and checkout

Watch the cost of each allowed bot as well. A verified bot that sends thousands of requests a minute to your search endpoint can still be rate limited.

Tools that help

StopBots is published by Kairal, which is one of the tools listed. The list is not a ranking.

  • Cloudflare Bot Management scores requests at the edge and exposes a verified bot flag (cf.client.bot) you can use in rules, a fit if your site already sits behind Cloudflare.
  • CrowdSec is an open-source agent that reads your logs, blocks IPs that match attack patterns and shares a community blocklist, which is enough for many small sites.
  • Kairal Agent Traffic Intelligence shows which AI agents and crawlers reach your site and lets you control them, alongside Kairal's bot detection on login, signup and checkout.
  • Cloudflare Radar publishes free data on bot traffic trends and on verified bots, useful for looking up an unfamiliar crawler name.

Common questions

Is Googlebot a good bot?

Yes, when the request really comes from Google. Google's verification guide also covers its special-case crawlers, such as AdsBot, and its user-triggered fetchers. These resolve to google.com or googleusercontent.com hostnames in place of googlebot.com and have their own published IP lists.

Are AI crawlers good bots or bad bots?

It depends on your business. The large AI companies publish their crawler names and many respect robots.txt, so they pass the identity test. Whether their use of your content is a fair trade is a policy decision for you, and you can allow some and block others.

Should I block all bots?

No. Blocking search crawlers removes you from search results, and blocking monitors or payment and shipping partners breaks your own services. Block by behaviour and failed verification, and keep an allowlist of the bots you rely on.