Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/content/docs/rules/custom-errors/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,9 @@ You can use a custom error asset in one or more [custom error rules](#custom-err
When you provide a URL for a custom error asset, Cloudflare fetches the page and inlines all referenced resources into the HTML. Images and other binary resources (including those referenced from CSS via `url(...)`) are inlined as base64-encoded data URLs. CSS and JavaScript files are inlined as plain text inside `<style>` and `<script>` tags. The processed page must not exceed approximately 1.5 MB.

If your custom error asset exceeds this size, reduce the number or size of referenced resources. You can also host large resources externally, as long as they remain accessible from Cloudflare's network when the asset is fetched.

:::caution[Large assets increase bandwidth]

Because a custom error asset is served to every visitor that triggers the associated rule, a large asset can generate significant egress traffic. To reduce bandwidth and improve load times, keep the asset small by reducing the size or number of referenced images, fonts, and other binary resources. Cloudflare inlines referenced resources when fetching the asset, so external URLs are fetched and inlined as well.

:::