Skip to content

Commit 162aa87

Browse files
committed
[Rules] Update Error Pages
1 parent cc1bdf9 commit 162aa87

File tree

1 file changed

+43
-14
lines changed

1 file changed

+43
-14
lines changed

src/content/docs/rules/custom-errors/edit-error-pages.mdx

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,34 @@ sidebar:
55
order: 2
66
---
77

8-
import { Details, DashButton, Steps } from "~/components";
8+
import { Details, DashButton, Steps, Tabs, TabItem } from "~/components";
99

10-
## Before you start
10+
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+
<Details header="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
1136

1237
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/).
1338

@@ -55,45 +80,49 @@ The following HTML code is an example error page for 5XX errors without styling:
5580

5681
---
5782

58-
## Update an error page in the dashboard
83+
## 2. Update an error page in the dashboard
5984

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.
6186

62-
To update an account-level custom error page:
87+
<Tabs> <TabItem label="Zone level">
88+
89+
To edit a zone-level custom error page:
6390

6491
<Steps>
6592

66-
1. In the Cloudflare dashboard, go to the **Settings** page.
93+
1. In the Cloudflare dashboard, go to the **Error Pages** page.
6794

68-
<DashButton url="/?to=/:account/configurations" />
95+
<DashButton url="/?to=/:account/:zone/error-pages" />
6996

70-
2. Go to **Error Pages** and identify your desired custom error page type.
97+
2. Identify your desired custom error page type.
7198
3. (Optional) To preview the current error page (default or custom), select the link in the **Show** column.
7299
4. To edit the error page, select the three dots > **Edit** next to the page type you previously identified.
73100
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.
74101
6. Select **Confirm**.
75102

76103
</Steps>
77104

78-
### Zone-level custom error page
105+
</TabItem> <TabItem label="Account level">
79106

80-
To edit a zone-level custom error page:
107+
To update an account-level custom error page:
81108

82109
<Steps>
83110

84-
1. In the Cloudflare dashboard, go to the **Error Pages** page.
111+
1. In the Cloudflare dashboard, go to the **Settings** page.
85112

86-
<DashButton url="/?to=/:account/:zone/error-pages" />
113+
<DashButton url="/?to=/:account/configurations" />
87114

88-
2. Identify your desired custom error page type.
115+
2. Go to **Error Pages** and identify your desired custom error page type.
89116
3. (Optional) To preview the current error page (default or custom), select the link in the **Show** column.
90117
4. To edit the error page, select the three dots > **Edit** next to the page type you previously identified.
91118
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.
92119
6. Select **Confirm**.
93120

94121
</Steps>
95122

96-
### Fetch custom error page again
123+
</TabItem> </Tabs>
124+
125+
## Fetch custom error page again
97126

98127
After successfully setting the content of the custom error page in **Error Pages**, you can remove the page from your origin server.
99128

0 commit comments

Comments
 (0)