Serving challenges with interstitial pages
IMPORTANT: This guide only applies to customers who have deployed Bot Management with post-cache inspection. If you've deployed Bot Management with pre-cache inspection (ContentGuard) or are using Fastly DDoS Protection, check out our Getting started with client challenges guide instead.
With interstitial pages, you can deploy client challenges without touching your application code. Fastly serves a temporary page to run the challenge before loading the requested content. All configuration happens in the control panel, and you can choose from dynamic, non-interactive, and interactive challenge types.
HINT: Have a React or single-page application? Embed a dynamic challenge within your web application. React and single-page applications don't handle interstitial pages well.
Prerequisites
Before setting up client challenges, you must deploy Bot Management using post-cache inspection on each CDN service where you intend to use them. Compute services are not supported.
Adding challenges
To serve a challenge on an interstitial page, complete the following steps:
- Fastly control panel
- Next-Gen WAF control panel
- Log in to the Fastly control panel.
- Go to Security > Next-Gen WAF > Rules.
- From the workspaces bar, click the menu to the right of the workspace name and select a workspace.
Click Add workspace rule.
In the Type area, select Request to challenge all requests matching your conditions or Rate limit to challenge requests only when they exceed a defined threshold. For more information, check out our About rules guides.
In the Conditions area, define where the rule should send the challenge. For example, to send a challenge to all request traffic destined for
www.example.com/login, create the following conditions:Condition Field Operator Value 1 Method Equals GET 2 Domain Equals www.example.com3 Path Equals /login(Optional) In the Conditions area, add conditions to restrict when the rule should send the challenge. For example, if you don't want to send challenges to requests with the
VERIFIED-BOTsignal, add the following condition:- From the first Field menu, select Signal.
- From the first Operator menu, select Does not exist where.
- Select All to specify that a request must meet every condition.
- From the second Field menu, select Signal ID.
- From the second Operator menu, select Equals.
- From the Value menu, select Verified Bot.
In the Fastly control panel, the settings would appear like this:

In the Actions area, define the type of challenge the rule should send.
Challenge type Actions area Dynamic challenge From the Action type menu, select Dynamic challenge. Non-interactive challenge From the Action type menu, select Browser challenge and leave the Allow Interactive switch disabled. Interactive challenge From the Action type menu, select Browser challenge and enable the Allow Interactive switch. Fill out the fields in the Details area as follows:
- In the Description field, enter a description for the rule.
- Leave the Status switch for the rule enabled.
Click Create workspace rule.
- Log in to the Next-Gen WAF control panel.
- From the Sites menu, select a site if you have more than one site.
From the Rules menu, select Site Rules.
Click Add site rule.
In the Type area, select Request or Rate limit. For information about each rule type, check out our Working with request rules and Working with advanced rate limiting rules guides.
In the Conditions area, define where the rule should send the challenge. For example, to send a challenge to all request traffic destined for
www.example.com/login, create the following conditions:Condition Field Operator Value 1 Method Equals GET 2 Domain Equals www.example.com3 Path Equals /login(Optional) In the Conditions area, add conditions to restrict when the rule should send the challenge. For example, if you don't want to send challenges to requests with the
VERIFIED-BOTsignal, add the following condition:- From the first Field menu, select Signal.
- From the first Operator menu, select Does not exist where.
- Select All to specify that a request must meet every condition.
- From the second Field menu, select Signal Type.
- From the second Operator menu, select Equals.
- From the Value menu, select Verified Bot.
In the Next-Gen WAF control panel, the settings would appear like this:

In the Actions area, define the type of challenge the rule should send.
Challenge type Actions area Dynamic challenge From the Action type menu, select Dynamic challenge. Non-interactive challenge From the Action type menu, select Browser challenge and leave the Allow Interactive switch disabled. Interactive challenge From the Action type menu, select Browser challenge and enable the Allow Interactive switch. Fill out the fields in the Details area as follows:
- In the Description field, enter a description for the rule.
- Leave the Status switch for the rule enabled.
Click Create site rule.
After adding a challenge, you can optionally:
- Add a custom logo to the interstitial page where the challenge is served.
- Set up rules to block requests from clients that failed a challenge.
