About Bot Management
Fastly's Bot Management allows you to identify bots and decrease unwanted bot activity on your web applications. You can deploy Bot Management on your Fastly services using one or both of the following deployment options:
- Pre-cache inspection: Bot Management inspects all requests before they reach your cache layer, allowing you to control bot access to both cached and uncached resources. This deployment option enables ContentGuard.
- Post-cache inspection: Bot Management works alongside the Next-Gen WAF to analyze cache-miss requests, protecting your origin from bot attacks. This means that Bot Management will only inspect traffic going to your origin.
Prerequisites
Before deploying Bot Management for your services, you need to:
review the Bot Management limitations.
purchase the required products for your Bot Management deployment option. Pre-cache inspection requires Bot Management. Post-cache inspection requires Bot Management and Next-Gen WAF (Edge WAF deployment only).
IMPORTANT: The Essential platform for the Next-Gen WAF does not support Bot Management.
Deploying Bot Management
Once all prerequisites have been met, you can use the Fastly control panel or API to deploy Bot Management on your Fastly services.
WARNING: Deploying, disabling, or making changes to Bot Management on a service immediately impacts all service versions, including the active one.
Deploying Bot Management on a specific service
- Control panel
- API
To deploy Bot Management on a service using the Fastly control panel, follow these steps:
- Log in to the Fastly control panel.
- From the Home page, select the appropriate service. You can use the search box to search by ID, name, or domain.
- Click Service configuration.
- Click Security > Bot Management.
- Click the Bot Management switch to the On position.
- (Optional) If you are deploying with pre-cache inspection, click the ContentGuard switch to On.
To deploy Bot Management on a service using the Fastly API, follow these steps:
Call the Bot Management enablement API endpoint in a terminal application:
$ curl -X PUT \-H "Fastly-Key: ${FASTLY_API_TOKEN}" \-H 'Content-Type: application/json' \"https://api.fastly.com/enabled-products/v1/bot_management/services/${FASTLY_SERVICE_ID}"For pre-cache inspection only, call the Bot Management update configuration API endpoint in a terminal application:
$ curl -X PATCH \-H "Fastly-Key: ${FASTLY_API_TOKEN}" \-H 'Content-Type: application/json' \-d '{\"contentguard\":\"on\"}' \"https://api.fastly.com/enabled-products/v1/bot_management/services/${FASTLY_SERVICE_ID}/configuration"
You can then optionally configure client challenges, advanced client-side detections, and ContentGuard for those services. Note that the other Bot Management features require no additional setup.
Deploying Bot Management on multiple services at once
To deploy Bot Management on more than one service at a time, follow these steps:
- Log in to the Fastly control panel.
- Go to Account > Configuration Manager.
- Click the Bot Management tab. A table listing all services appears.
- Select the checkbox next to each of the services on which to deploy Bot Management.
- Click Set status, which appears above the table.
- From the Action menu, select Enable.
- (Optional) If you are deploying with pre-cache inspection, click the ContentGuard switch to On for each service that uses it.
Once you've deployed Bot Management, you can use the following dashboards to monitor bot traffic targeting your web applications:
- Bot overview: dashboard that displays pre-cache inspection metrics about the volume and types of bot traffic directed at your service.
- Bot Management: dashboard that displays post-cache inspection metrics about suspected bot activity and bot-related signals detected by the Next-Gen WAF.
Disabling Bot Management on a service
If you no longer need to run Bot Management for a specific service, follow these steps:
- Log in to the Fastly control panel.
- From the Home page, select the appropriate service. You can use the search box to search by ID, name, or domain.
- Click Service configuration.
- Click Security > Bot Management.
- Click the Bot Management switch to the Off position.
NOTE: Disabling Bot Management automatically disables ContentGuard, as well.