Adding custom logos to interstitial pages
By default, interstitial pages that serve client challenges display a Fastly logo. If you'd prefer to show your own branding, you can configure Fastly to load a custom logo from your origin instead.
Prerequisites
- Bot Management (pre-cache inspection)
- Bot Management (post-cache inspection)
- DDoS
Before customizing the interstitial pages, you must:
- purchase and deploy Bot Management with pre-cache inspection (ContentGuard) on each CDN service where you intend to use client challenges. Compute services are not supported.
- configure client challenges for the bot categories or identities you want to challenge.
Before customizing the interstitial pages, you must:
- purchase and deploy Bot Management with post-cache inspection on each CDN service where you intend to use client challenges. Compute services are not supported.
- configure client challenges for an interstitial page.
Before customizing the interstitial pages, you must:
- purchase Fastly DDoS Protection for your account.
- configure Fastly DDoS Protection to challenge attack traffic.
How it works
Interstitial pages follow the end user's light or dark color scheme preference. Fastly loads logos destined for light backgrounds from /fastly/logo and logos destined for dark backgrounds from /fastly/dark-logo. These paths do not need to physically exist and can be handled via URL rewrites.
If a logo path can't be loaded, the interstitial page falls back to the next option. In light mode, the page tries /fastly/logo, then the default Fastly logo. In dark mode, the page tries /fastly/dark-logo for up to 3 seconds, then /fastly/logo (displayed on a light background), and finally the default Fastly logo.
The challenge container adjusts the logo's size automatically, with the default image size being approximately 300x300 pixels. The response must have a successful status code and a Content-Type that starts with image/. We recommend serving the logo with headers that allow it to be cached, so that it doesn't need a request to your origin each time the page loads.
Adding custom logos
To display a custom logo that follows the end user's color scheme preference, add the following VCL snippet in the vcl_recv subroutine, being sure to replace "/static-assets/challenge-robot.jpg" and "/static-assets/challenge-robot-dark.jpg" with the logo URLs on your origin. This snippet rewrites both /fastly/logo and /fastly/dark-logo to load images from your origin.
# Redirect custom logo requests to the correct paths on the customer originif (req.url.path == "/fastly/logo") { set req.url = "/static-assets/challenge-robot.jpg";} elsif (req.url.path == "/fastly/dark-logo") { set req.url = "/static-assets/challenge-robot-dark.jpg";}