To enforce a web scraping policy for a web application, perform the following steps:
- Add a Bot to the Allowed Bots List
- Create a Web Scraping Policy
- Associate the Web Scraping Policy with a Service
Step 1 - Add a Bot to the Allowed Bots List
- Go to the BOT MITIGATION > Libraries page, and click Add Bot in the Allowed Bots section.
- In the Add Bot page, specify values for the parameters (Parent Name, User Agent and Host).
- Click Save.
Step 2 - Create a Web Scraping Policy
- Go to the BOT MITIGATION > Bot Mitigation page, and click Add Policy in the Web Scraping Policies section.
- In the Add Web Scraping Policy page:
- Specify values for the parameters under Honey Traps and Bot Detection.
- Select the allow-listed bot created in Step 1 - Add a Bot to the Allowed Bots List.
- Select the categories that you want to block.
- Click Save.
Step 3 - Associate the Web Scraping Policy with a Service
- Go to the BOT MITIGATION > Bot Mitigation page.
- In the Bot Mitigation Policy section:
- Identify the service that you want to associate the web scraping policy to.
- Click Edit next to the URL policy associated with the service.
- In the Edit URL Policy page:
- Set Status to On.
- From the Bot Detection section, select the policy created in Step 2 - Create a Web Scraping Policy from the Web Scraping Policy list.
- Specify values for other parameters as required and click Save.