Related Documentation
Made by
Kong Inc.
Supported Gateway Topologies
hybrid db-less traditional
Supported Konnect Deployments
hybrid cloud-gateways serverless
Compatible Protocols
grpc grpcs http https
Tags

Using the Bot Detection plugin, you can protect your a Gateway Service or a Route from bots. It automatically detects common bots on every request from the associated Gateway Service or Route using regex.

You can also configure custom regex patterns to either allow or deny additional bots.

How it works

Once the Bot Detection plugin is enabled on a Gateway Service or Route, it checks the User-Agent header of incoming requests. If the header matches a default common bot or any custom denied bot regex you’ve configured, the request is immediately blocked with a 403 response.

If the User-Agent header doesn’t match any common or specifically denied bots, the request is processed. This also applies when a configured allowed bot matches.

Use case

If you suspect bot traffic you can use a logging plugin on a Gateway Service to track down unusual User-Agent headers in incoming requests.

Once you’ve identified the offending User-Agent header, you can block it using the Bot Detection plugin.

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!