---
title: Adding custom logos to interstitial pages
summary: null
url: >-
  https://www.fastly.com/documentation/guides/security/client-challenges/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)

Before customizing the interstitial pages, you must:

- [purchase](https://docs.fastly.com/products/bot-management) and [deploy](https://www.fastly.com/documentation/guides/security/bot-management/about-bot-management/#deploying-bot-management) 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](https://www.fastly.com/documentation/guides/security/client-challenges/getting-started-with-client-challenges/#quick-start) for the bot categories or identities you want to challenge.

### Bot Management (post-cache inspection)

Before customizing the interstitial pages, you must:

- [purchase](https://docs.fastly.com/products/bot-management) and [deploy](https://www.fastly.com/documentation/guides/security/bot-management/about-bot-management/#deploying-bot-management) 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](https://www.fastly.com/documentation/guides/security/client-challenges/serving-challenges-with-interstitial-pages) for an interstitial page.

### DDoS

Before customizing the interstitial pages, you must:

- purchase [Fastly DDoS Protection](https://docs.fastly.com/products/fastly-ddos-protection) for your account.
- configure Fastly DDoS Protection to [challenge attack traffic](https://www.fastly.com/documentation/guides/security/client-challenges/getting-started-with-client-challenges/#quick-start).

## 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](https://www.fastly.com/documentation/solutions/examples/rewrite-url-path/).

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.

```vcl
# Redirect custom logo requests to the correct paths on the customer origin
if (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";
}
```

## Related content

- [Getting started with client challenges](https://www.fastly.com/documentation/guides/security/client-challenges/getting-started-with-client-challenges)
