Skip to main content

Custom Error Pages: edge rules

BunnyCDN doesn't fully support custom error pages, but there is a workaround whereby you can redirect any user receiving a given status code to a URL of your choice, i.e. an error page.

You need to create an edge rule that redirects to a given URL depending on the HTTP status code. You can also use this to redirect users with an invalid Referer header, like so:

image.png

Note the header value syntax carefully. Missing slashes will stop the edge rule working as expected.

Block Direct Url File Access setting

Note that if this setting is on, users will get redirected to your given URL after refreshing a CDN-hosted page (like an image file), since the new request won't have a Referer header.