You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can define custom [Error Pages](/rules/custom-errors/#error-pages) for the following errors and challenges:
11
+
12
+
- WAF block
13
+
- IP/Country block
14
+
- IP/Country challenge
15
+
- 500 class errors
16
+
- 1000 class errors
17
+
- Managed challenge / I'm Under Attack Mode
18
+
- Rate limiting block
19
+
20
+
<Detailsheader="Older error page types">
21
+
22
+
You can only customize the error pages for the following error page types if you have customized their error pages in the past:
23
+
24
+
- Interactive Challenge
25
+
- JavaScript Challenge
26
+
27
+
These types of challenges are being discouraged in favor of managed challenges.
28
+
29
+
</Details>
30
+
31
+
For more information on the different types of Error Pages, refer to [Error page types](/rules/custom-errors/reference/error-page-types/).
32
+
33
+
To return custom error responses for requests that match specific conditions, use [Custom Error Rules](/rules/custom-errors/#custom-error-rules) instead.
34
+
35
+
## 1. Design your custom error page
11
36
12
37
Before defining a custom error page in your Cloudflare account, you will need to design and code that page. It can be hosted on your own web server or using a Cloudflare product like [Snippets](/rules/snippets/).
13
38
@@ -55,45 +80,49 @@ The following HTML code is an example error page for 5XX errors without styling:
55
80
56
81
---
57
82
58
-
## Update an error page in the dashboard
83
+
## 2. Update an error page in the dashboard
59
84
60
-
### Account-level custom error page
85
+
You can define an error page at the zone level or for your entire account. Zone-level error pages have priority over account-level error pages.
61
86
62
-
To update an account-level custom error page:
87
+
<Tabs> <TabItemlabel="Zone level">
88
+
89
+
To edit a zone-level custom error page:
63
90
64
91
<Steps>
65
92
66
-
1. In the Cloudflare dashboard, go to the **Settings** page.
93
+
1. In the Cloudflare dashboard, go to the **Error Pages** page.
2.Go to **Error Pages** and identify your desired custom error page type.
97
+
2.Identify your desired custom error page type.
71
98
3. (Optional) To preview the current error page (default or custom), select the link in the **Show** column.
72
99
4. To edit the error page, select the three dots > **Edit** next to the page type you previously identified.
73
100
5. To use Cloudflare's default page, select **Cloudflare default page.** To provide a custom error page, select **Custom page** and enter the URL of the custom error page you created.
74
101
6. Select **Confirm**.
75
102
76
103
</Steps>
77
104
78
-
### Zone-level custom error page
105
+
</TabItem> <TabItemlabel="Account level">
79
106
80
-
To edit a zone-level custom error page:
107
+
To update an account-level custom error page:
81
108
82
109
<Steps>
83
110
84
-
1. In the Cloudflare dashboard, go to the **Error Pages** page.
111
+
1. In the Cloudflare dashboard, go to the **Settings** page.
2.Go to **Error Pages** and identify your desired custom error page type.
89
116
3. (Optional) To preview the current error page (default or custom), select the link in the **Show** column.
90
117
4. To edit the error page, select the three dots > **Edit** next to the page type you previously identified.
91
118
5. To use Cloudflare's default page, select **Cloudflare default page.** To provide a custom error page, select **Custom page** and enter the URL of the custom error page you created.
92
119
6. Select **Confirm**.
93
120
94
121
</Steps>
95
122
96
-
### Fetch custom error page again
123
+
</TabItem> </Tabs>
124
+
125
+
## Fetch custom error page again
97
126
98
127
After successfully setting the content of the custom error page in **Error Pages**, you can remove the page from your origin server.
Copy file name to clipboardExpand all lines: src/content/docs/rules/custom-errors/index.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,4 +84,4 @@ A custom error asset corresponds to a web resource such as an HTML web page (inc
84
84
85
85
Once the custom error asset is stored in Cloudflare's global network, the URL you initially provided no longer needs to be available. You can update an existing custom error asset by fetching it again. The metadata associated with each custom error asset includes the timestamp when the last fetch occurred, and this information is displayed in the dashboard.
86
86
87
-
You can use a custom error asset in one or more custom error rules in the same scope where you defined the asset (zone or account).
87
+
You can use a custom error asset in one or more [custom error rules](#custom-error-rules) in the same scope where you defined the asset (zone or account).
Custom error rules define when a custom error gets triggered and the content that is served to visitors. Rule parameters are the following:
15
+
[Custom error rules](/rules/custom-errors/#custom-error-rules) define when a custom error gets triggered and the content that is served to visitors. Rule parameters are the following:
16
16
17
17
### Response type
18
18
@@ -71,7 +71,7 @@ If you create an HTML error response, make sure the `referrer` meta tag is not p
71
71
72
72
## Custom error assets
73
73
74
-
A custom error asset corresponds to a web resource such as an HTML web page (including any referenced images, CSS, and JavaScript code) that Cloudflare fetches and saves based on a URL you provide, to be served to visitors as an error page.
74
+
A [custom error asset](/rules/custom-errors/#custom-error-assets) corresponds to a web resource such as an HTML web page (including any referenced images, CSS, and JavaScript code) that Cloudflare fetches and saves based on a URL you provide, to be served to visitors as an error page.
75
75
76
76
Custom error assets have the following parameters:
0 commit comments