Skip to content

Commit c61c28e

Browse files
authored
[Rules] Update dashboard instructions (#18047)
* Update URL normalization * Update Bulk Redirects * Update Single Redirects
1 parent 99a1683 commit c61c28e

File tree

14 files changed

+107
-131
lines changed

14 files changed

+107
-131
lines changed
-9.63 KB
Loading

src/content/docs/firewall/troubleshooting/required-changes-to-enable-url-normalization.mdx

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,35 @@
22
pcx_content_type: troubleshooting
33
source: https://support.cloudflare.com/hc/en-us/articles/360057896851-Required-Firewall-Rule-changes-to-enable-URL-normalization
44
title: Required firewall rule changes to enable URL normalization
5-
65
---
76

8-
import { Render } from "~/components"
7+
import { Render } from "~/components";
98

109
<Render file="deprecation-notice" />
1110

1211
On 2021-04-08, Cloudflare announced [URL normalization](/rules/normalization/), a feature that protects zones by normalizing HTTP request URI paths.
1312

14-
Malicious users can craft specific URIs that could be interpreted differently by firewall systems and origin systems. When you enable **Normalize incoming URLs**, all rules filtering on the URI path will receive the URL in a canonical form, which provides an extra layer of protection against these malicious users. 
13+
Malicious users can craft specific URIs that could be interpreted differently by firewall systems and origin systems. When you enable **Normalize incoming URLs**, all rules filtering on the URI path will receive the URL in a canonical form, which provides an extra layer of protection against these malicious users.
1514

16-
Cloudflare gradually enabled URL normalization for all Cloudflare zones except for those that could be impacted by this change. We determined the impacted zones by analyzing all firewall rules, looking for patterns in HTTP fields that would no longer match when using URL normalization techniques.
15+
Cloudflare gradually enabled URL normalization for all Cloudflare zones except for those that could be impacted by this change. We determined the impacted zones by analyzing all firewall rules, looking for patterns in HTTP fields that would no longer match when using URL normalization techniques.
1716

1817
These fields are the following:
1918

20-
* `http.request.uri.path`
21-
* `http.request.full_uri`
22-
* `http.request.uri`
19+
- `http.request.uri.path`
20+
- `http.request.full_uri`
21+
- `http.request.uri`
2322

2423
Cloudflare did not enable URL normalization automatically for zones that would be impacted by these changes to prevent any change in behavior of your existing firewall rules.
2524

2625
## Why URL normalization is important
2726

28-
Cloudflare strongly recommends that you enable **Normalize incoming URLs** in **Rules** > **Settings** to strengthen your zone's security posture. Not doing so leaves your zone at greater risk of a successful attack. Malicious parties could craft the URL in a way that the rules are not accounting for.
27+
Cloudflare strongly recommends that you enable **Normalize incoming URLs** in **Rules** > **URL Normalization** to strengthen your zone's security posture. Not doing so leaves your zone at greater risk of a successful attack. Malicious parties could craft the URL in a way that the rules are not accounting for.
2928

3029
For example, a firewall rule with an expression such as `http.request.uri.path contains "/login"` could be bypassed if the malicious actor has encoded the `l` character as `%6C`. In this scenario, and with URL normalization disabled, traffic would not be matched by the firewall rule.
3130

3231
Refer to [How URL normalization works](/rules/normalization/how-it-works/) for more information and additional examples.
3332

34-
***
33+
---
3534

3635
## Recommended procedure
3736

@@ -46,23 +45,23 @@ These steps will ensure a stronger security posture on your zone(s).
4645

4746
Before enabling URL normalization, you should review the affected firewall rules on your zone(s) and take one of the following approaches:
4847

49-
* Edit these firewall rules to remove the parts which will no longer trigger once normalized — for example, any rules that look for `//` or `../` in URL paths. Administrators previously created these rules to perform a limited URL normalization, and these rules can now be safely disabled and then deleted.
48+
- Edit these firewall rules to remove the parts which will no longer trigger once normalized — for example, any rules that look for `//` or `../` in URL paths. Administrators previously created these rules to perform a limited URL normalization, and these rules can now be safely disabled and then deleted.
5049

51-
* If you wish to identify visitors with non-normalized URI paths with these firewall rules, you should update them to use the original (or raw) non-normalized fields. These fields are the following:
50+
- If you wish to identify visitors with non-normalized URI paths with these firewall rules, you should update them to use the original (or raw) non-normalized fields. These fields are the following:
5251

53-
* `raw.http.request.uri.path`
54-
* `raw.http.request.full_uri`
55-
* `raw.http.request.uri`
52+
- `raw.http.request.uri.path`
53+
- `raw.http.request.full_uri`
54+
- `raw.http.request.uri`
5655

5756
### 2. Enable URL normalization
5857

59-
Once you have updated the affected firewall rules, enable URL normalization in **Rules** > **Settings**.
58+
Once you have updated the affected firewall rules, enable URL normalization in **Rules** > **URL Normalization**.
6059

6160
A Cloudflare user must have the [Firewall role](/fundamentals/setup/manage-members/roles/) or one of the Administrator roles to access URL normalization settings in the dashboard.
6261

63-
***
62+
---
6463

6564
## Related resources
6665

67-
* [URL normalization](/rules/normalization/)
68-
* [Transform Rules](/rules/transform/)
66+
- [URL normalization](/rules/normalization/)
67+
- [Transform Rules](/rules/transform/)
Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,31 @@
11
---
2-
title: Examples
2+
title: URL normalization examples
33
pcx_content_type: configuration
44
sidebar:
55
order: 6
6-
head:
7-
- tag: title
8-
content: URL normalization examples
6+
label: Examples
97
description: Examples of the impact of different URL normalization settings in
108
the URLs of incoming requests.
11-
9+
tableOfContents: false
1210
---
1311

1412
The following table shows how different [URL normalization settings](/rules/normalization/settings/) affect request URLs before they pass to other Cloudflare features and to the origin server:
1513

16-
17-
1814
| Incoming URL | Normalization type | Normalize incoming URLs | Normalize URLs to origin | URL at Cloudflare's network | URL passed to origin server |
1915
| ---------------------------- | ------------------ | ----------------------- | ------------------------ | ------------------------------ | ------------------------------ |
20-
| `www.example.com/hello` | (any) | *Off* | *Off* | `www.example.com/hello` | `www.example.com/hello` |
21-
| `www.example.com/hello` | (any) | *On* | *Off* | `www.example.com/hello` | `www.example.com/hello` |
22-
| `www.example.com/hello` | (any) | *On* | *On* | `www.example.com/hello` | `www.example.com/hello` |
23-
| `example.com/%68ello` | (any) | *Off* | *Off* | `example.com/%68ello` | `example.com/%68ello` |
24-
| `example.com/%68ello` | (any) | *On* | *Off* | `example.com/hello` | `example.com/%68ello` |
25-
| `example.com/%68ello` | (any) | *On* | *On* | `example.com/hello` | `example.com/hello` |
26-
| `example.com/%68ello//pa\th` | *RFC-3986* | *Off* | *Off* | `example.com/%68ello//pa\th` | `example.com/%68ello//pa\th` |
27-
| `example.com/%68ello//pa\th` | *RFC-3986* | *On* | *Off* | `example.com/hello//pa%5Cth` | `example.com/%68ello//pa\th` |
28-
| `example.com/%68ello//pa\th` | *RFC-3986* | *On* | *On* | `example.com/hello//pa%5Cth` | `example.com/hello//pa%5Cth` |
29-
| `example.com/%68ello//pa\th` | *Cloudflare* | *Off* | *Off* | `example.com/%68ello//pa\th` | `example.com/%68ello//pa\th` |
30-
| `example.com/%68ello//pa\th` | *Cloudflare* | *On* | *Off* | `example.com/hello/pa/th` | `example.com/%68ello//pa\th` |
31-
| `example.com/%68ello//pa\th` | *Cloudflare* | *On* | *On* | `example.com/hello/pa/th` | `example.com/hello/pa/th` |
32-
| `example.com/hello//../path` | *RFC-3986* | *On* | *On* | `example.com/hello/path` | `example.com/hello/path` |
33-
| `example.com/hello//../path` | *Cloudflare* | *On* | *On* | `example.com/path` | `example.com/path` |
34-
| `example.com/hello/\../path` | *RFC-3986* | *On* | *On* | `example.com/hello/%5C../path` | `example.com/hello/%5C../path` |
35-
| `example.com/hello/\../path` | *Cloudflare* | *On* | *On* | `example.com/path` | `example.com/path` |
36-
16+
| `www.example.com/hello` | (any) | _Off_ | _Off_ | `www.example.com/hello` | `www.example.com/hello` |
17+
| `www.example.com/hello` | (any) | _On_ | _Off_ | `www.example.com/hello` | `www.example.com/hello` |
18+
| `www.example.com/hello` | (any) | _On_ | _On_ | `www.example.com/hello` | `www.example.com/hello` |
19+
| `example.com/%68ello` | (any) | _Off_ | _Off_ | `example.com/%68ello` | `example.com/%68ello` |
20+
| `example.com/%68ello` | (any) | _On_ | _Off_ | `example.com/hello` | `example.com/%68ello` |
21+
| `example.com/%68ello` | (any) | _On_ | _On_ | `example.com/hello` | `example.com/hello` |
22+
| `example.com/%68ello//pa\th` | _RFC-3986_ | _Off_ | _Off_ | `example.com/%68ello//pa\th` | `example.com/%68ello//pa\th` |
23+
| `example.com/%68ello//pa\th` | _RFC-3986_ | _On_ | _Off_ | `example.com/hello//pa%5Cth` | `example.com/%68ello//pa\th` |
24+
| `example.com/%68ello//pa\th` | _RFC-3986_ | _On_ | _On_ | `example.com/hello//pa%5Cth` | `example.com/hello//pa%5Cth` |
25+
| `example.com/%68ello//pa\th` | _Cloudflare_ | _Off_ | _Off_ | `example.com/%68ello//pa\th` | `example.com/%68ello//pa\th` |
26+
| `example.com/%68ello//pa\th` | _Cloudflare_ | _On_ | _Off_ | `example.com/hello/pa/th` | `example.com/%68ello//pa\th` |
27+
| `example.com/%68ello//pa\th` | _Cloudflare_ | _On_ | _On_ | `example.com/hello/pa/th` | `example.com/hello/pa/th` |
28+
| `example.com/hello//../path` | _RFC-3986_ | _On_ | _On_ | `example.com/hello/path` | `example.com/hello/path` |
29+
| `example.com/hello//../path` | _Cloudflare_ | _On_ | _On_ | `example.com/path` | `example.com/path` |
30+
| `example.com/hello/\../path` | _RFC-3986_ | _On_ | _On_ | `example.com/hello/%5C../path` | `example.com/hello/%5C../path` |
31+
| `example.com/hello/\../path` | _Cloudflare_ | _On_ | _On_ | `example.com/path` | `example.com/path` |

src/content/docs/rules/normalization/how-it-works.mdx

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
---
2-
title: How it works
2+
title: How URL normalization works
33
pcx_content_type: concept
44
sidebar:
55
order: 3
6-
head:
7-
- tag: title
8-
content: How URL normalization works
9-
6+
label: How it works
107
---
118

129
URL normalization modifies separators, encoded elements, and literal bytes in incoming URLs so that they conform to a consistent formatting standard.
@@ -15,8 +12,8 @@ For example, consider a WAF custom rule that blocks requests whose URLs match `w
1512

1613
The two available types of URL normalization are:
1714

18-
* [RFC 3986 normalization](#rfc-3986-normalization)
19-
* [Cloudflare normalization](#cloudflare-normalization)
15+
- [RFC 3986 normalization](#rfc-3986-normalization)
16+
- [Cloudflare normalization](#cloudflare-normalization)
2017

2118
The location where URL normalization will occur depends on the [configured settings](/rules/normalization/settings/).
2219

@@ -26,14 +23,14 @@ For examples of the different settings and their impact on request URLs, refer t
2623

2724
The URL normalization performed according to [RFC 3986](https://www.ietf.org/rfc/rfc3986.txt) is as follows:
2825

29-
* The following unreserved characters are [percent decoded](https://tools.ietf.org/html/rfc3986#section-2.1):
30-
* Alphabetical characters: `a`-`z`, `A`-`Z` (decoded from `%41`-`%5A` and `%61`-`%7A`)
31-
* Digit characters: `0`-`9` (decoded from `%30`-`%39`)
32-
* hyphen `-` (`%2D`), period `.` (`%2E`), underscore `_` (`%5F`), and tilde `~` (`%7E`)
33-
* These reserved characters are not encoded or decoded: `: / ? # [ ] @ ! $ & ' ( ) * + , ; =`
34-
* Other characters, for example literal byte values, are percent encoded.
35-
* Percent encoded representations are converted to upper case.
36-
* URL paths are normalized according to the [Remove Dot Segments](https://tools.ietf.org/html/rfc3986#section-5.2.4) protocol.
26+
- The following unreserved characters are [percent decoded](https://tools.ietf.org/html/rfc3986#section-2.1):
27+
- Alphabetical characters: `a`-`z`, `A`-`Z` (decoded from `%41`-`%5A` and `%61`-`%7A`)
28+
- Digit characters: `0`-`9` (decoded from `%30`-`%39`)
29+
- hyphen `-` (`%2D`), period `.` (`%2E`), underscore `_` (`%5F`), and tilde `~` (`%7E`)
30+
- These reserved characters are not encoded or decoded: `: / ? # [ ] @ ! $ & ' ( ) * + , ; =`
31+
- Other characters, for example literal byte values, are percent encoded.
32+
- Percent encoded representations are converted to upper case.
33+
- URL paths are normalized according to the [Remove Dot Segments](https://tools.ietf.org/html/rfc3986#section-5.2.4) protocol.
3734

3835
## Cloudflare normalization
3936

src/content/docs/rules/normalization/index.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,27 @@ pcx_content_type: concept
33
title: URL normalization
44
sidebar:
55
order: 11
6-
76
---
87

9-
import { GlossaryTooltip, Render } from "~/components"
8+
import { GlossaryTooltip, Render } from "~/components";
109

1110
Cloudflare provides a URL normalization feature to modify the URLs of incoming requests so that they conform to a consistent formatting standard.
1211

1312
When you enable URL normalization, all incoming URLs are normalized before they pass to subsequent global network features that accept a URL input, such as WAF custom rules, Workers, and Access. Rule expressions that filter traffic based on URLs will therefore trigger correctly, regardless of the format of the incoming URL. When URL normalization is disabled, Cloudflare forwards the URL to origin in its original form.
1413

1514
:::caution
1615

17-
When traffic is proxied via Cloudflare, essential request URL normalization is always applied regardless whether URL normalization is enabled for a specific zone. For example, you cannot disable the conversion of two or more adjacent slashes into a single slash in a request URL by turning off URL normalization.
16+
When traffic is proxied via Cloudflare, essential request URL normalization is always applied regardless whether URL normalization is enabled for a specific zone. For example, you cannot disable the conversion of two or more adjacent slashes into a single slash in a request URL by turning off URL normalization.
1817
:::
1918

2019
URL normalization does not perform any <GlossaryTooltip term="redirect">redirects</GlossaryTooltip>, and therefore it will not change the address displayed in the visitor's browser. The normalization operation, when enabled, occurs on the global network and affects Cloudflare features executed later and (optionally) the URL received at the origin server.
2120

22-
<Render file="rules-requirements" params={{ one: "URL normalization requires" }} />
21+
<Render
22+
file="rules-requirements"
23+
params={{ one: "URL normalization requires" }}
24+
/>
2325

24-
***
26+
---
2527

2628
## Availability
2729

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
---
2-
title: Configure in the dashboard
2+
title: Configure URL normalization in the dashboard
33
pcx_content_type: how-to
44
sidebar:
55
order: 4
6-
head:
7-
- tag: title
8-
content: Configure URL normalization in the dashboard
6+
label: Configure in the dashboard
97
description: How to configure URL normalization in the Cloudflare dashboard.
10-
118
---
129

1310
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and website.
1411

15-
2. Go to **Rules** > **Settings**.
12+
2. Go to **Rules** > **URL Normalization**.
1613

17-
![Available URL normalization settings in the Cloudflare dashboard](~/assets/images/rules/normalization/url-normalization-settings.png)
14+
3. Configure the [available URL normalization settings](/rules/normalization/settings/).
1815

19-
3. Under **Configure Normalization**, configure the [available URL normalization settings](/rules/normalization/settings/).
16+
![Available URL normalization settings in the Cloudflare dashboard](~/assets/images/rules/normalization/url-normalization-settings.png)
Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,35 @@
11
---
2-
title: Settings
2+
title: URL normalization settings
33
pcx_content_type: reference
44
sidebar:
55
order: 5
6-
head:
7-
- tag: title
8-
content: URL normalization settings
9-
6+
label: Settings
107
---
118

129
The Cloudflare dashboard provides the following settings to manage URL normalization:
1310

11+
- **Normalization type** (default: _RFC-3986_)
1412

13+
- Selects the type of normalization to perform:
1514

16-
* **Normalization type** (default: *RFC-3986*)
17-
18-
* Selects the type of normalization to perform:
19-
20-
* *RFC-3986* – Applies URL normalization strictly according to [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986).
21-
22-
* *Cloudflare* – In addition to what is defined in RFC 3986, applies [extra URL normalization techniques](/rules/normalization/how-it-works/#cloudflare-normalization).
23-
24-
* **Normalize incoming URLs** (default: *On*)
15+
- _RFC-3986_ – Applies URL normalization strictly according to [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986).
2516

26-
* Configures the URLs of all incoming traffic to Cloudflare:
17+
- _Cloudflare_ – In addition to what is defined in RFC 3986, applies [extra URL normalization techniques](/rules/normalization/how-it-works/#cloudflare-normalization).
2718

28-
* When enabled, all incoming URLs are normalized before they pass to subsequent Cloudflare features that can receive a URL as input, such as Page Rules, WAF custom rules, Workers, and Access.
29-
* When disabled, incoming URLs are not normalized before passing to subsequent Cloudflare features.
19+
- **Normalize incoming URLs** (default: _On_)
3020

31-
* **Normalize URLs to origin** (default: *Off*)
21+
- Configures the URLs of all incoming traffic to Cloudflare:
3222

33-
* Configures URLs sent to the origin:
23+
- When enabled, all incoming URLs are normalized before they pass to subsequent Cloudflare features that can receive a URL as input, such as Page Rules, WAF custom rules, Workers, and Access.
24+
- When disabled, incoming URLs are not normalized before passing to subsequent Cloudflare features.
3425

35-
* When enabled, requests sent to the origin are normalized.
36-
* When disabled, requests sent to the origin are not modified.
26+
- **Normalize URLs to origin** (default: _Off_)
3727

38-
* You can only view and enable this option when **Normalize incoming URLs** is enabled.
28+
- Configures URLs sent to the origin:
3929

30+
- When enabled, requests sent to the origin are normalized.
31+
- When disabled, requests sent to the origin are not modified.
4032

33+
- You can only view and enable this option when **Normalize incoming URLs** is enabled.
4134

4235
For examples of how these settings affect URL normalization, refer to the [URL normalization examples](/rules/normalization/examples/).

src/content/docs/rules/url-forwarding/bulk-redirects/create-api.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
---
22
pcx_content_type: how-to
3-
title: Create via API
3+
title: Create Bulk Redirects via API
44
sidebar:
55
order: 7
6-
head:
7-
- tag: title
8-
content: Create Bulk Redirects via API
6+
label: Create via API
97
description: Learn how to create Bulk Redirects using the Cloudflare API.
108
---
119

0 commit comments

Comments
 (0)