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
Copy file name to clipboardExpand all lines: src/content/docs/bots/concepts/feedback-loop.mdx
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ If Cloudflare is unable to detect a portion of automated traffic on your site, s
41
41
42
42
## Submit a report
43
43
44
-
<TabssyncKey="dashNewNav">
44
+
<TabssyncKey="dashNewNav">
45
45
<TabItemlabel="Old dashboard">
46
46
<Steps>
47
47
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.
@@ -50,7 +50,7 @@ If Cloudflare is unable to detect a portion of automated traffic on your site, s
50
50
4. Select **Report incorrect data** and fill out the form.
51
51
5. Select **Submit**.
52
52
</Steps>
53
-
</TabItem>
53
+
</TabItem>
54
54
<TabItemlabel="New dashboard"icon="rocket">
55
55
<Steps>
56
56
1. In the Cloudflare dashboard, go to the **Security Analytics** page.
@@ -61,7 +61,7 @@ If Cloudflare is unable to detect a portion of automated traffic on your site, s
61
61
4. Select **Report incorrect data** and fill out the form.
62
62
5. Select **Submit**.
63
63
</Steps>
64
-
</TabItem>
64
+
</TabItem>
65
65
</Tabs>
66
66
67
67
## Via the API
@@ -224,17 +224,15 @@ We appreciate any comments you wish to leave in the description field that might
224
224
## Recommendations after submitting a false positive
225
225
226
226
:::note
227
-
228
-
The instructions below apply to Enterprise subscription with Bot Management only.
227
+
The instructions below apply to Enterprise subscription with Bot Management only.
229
228
:::
230
229
231
-
After submitting a false positive, you can explicitly allow the traffic if you are confident that this traffic source cannot be used for abuse in the future. To allow traffic, you can create a WAF custom rule with a [Skip the remaining custom rules](/waf/custom-rules/skip/options/) action that matches the characteristics of your false positive report. We recommend any skip rule that you create uses the most narrow possible scope, including restricting the request methods and URIs that the expected traffic has access to, to limit potential abuse.
230
+
After submitting a false positive, you can explicitly allow the traffic if you are confident that this traffic source cannot be used for abuse in the future. To allow traffic, you can create a WAF custom rule with a [Skip the remaining custom rules](/waf/custom-rules/skip/options/#skip-the-remaining-custom-rules-current-ruleset) action that matches the characteristics of your false positive report. We recommend any skip rule that you create uses the most narrow possible scope, including restricting the request methods and URIs that the expected traffic has access to, to limit potential abuse.
232
231
233
232
* Allowing a **[JA3/JA4 fingerprint](/bots/additional-configurations/ja3-ja4-fingerprint/)**: If you want to allow access to a stable software client that does not come from a dedicated IP, you can do so by looking up the JA3 fingerprint(s) used by that client in the Bot Analytics dashboard, and creating a WAF custom rule to allow traffic based on that JA3 fingerprint. JA3 fingerprints will only match a client’s TLS library, so be cautious in looking for both overlap with other clients and with variation based on the operating system. <br/><br/>Cloudflare does not recommend relying on JA3 rules for mobile applications that may be abused. If you have questions about how to securely allow traffic from your mobile application, please contact your account team.
234
233
235
234
:::note
236
-
237
-
The instructions below apply to Enterprise subscription with Bot Management, Bot Fight Mode and Super Bot Fight Mode.
235
+
The instructions below apply to Enterprise subscription with Bot Management, Bot Fight Mode and Super Bot Fight Mode.
238
236
:::
239
237
240
238
* Allowing an **IP address**: Only use an IP address to allow traffic if the IP is a dedicated resource that belongs only to the traffic source you wish to allow. <br/>If the traffic you want to allow shares an IP with other traffic sources, or if the IP changes frequently, consider an alternative to allowing by IP address.
Copy file name to clipboardExpand all lines: src/content/docs/ruleset-engine/about/phases.mdx
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,12 @@ sidebar:
7
7
8
8
A phase defines a stage in the life of a request where you can execute [rulesets](/ruleset-engine/about/rulesets/). Phases are defined by Cloudflare and cannot be modified.
9
9
10
-
Phases exist at two levels: at the account level and at the zone level. For the same phase, rules defined at the account level are evaluated before the rules defined at the zone level.
10
+
Phases exist at two levels:
11
+
12
+
- At the [account](/fundamentals/concepts/accounts-and-zones/#accounts) level
13
+
- At the [zone](/fundamentals/concepts/accounts-and-zones/#zones) level
14
+
15
+
For the same phase, rules defined at the account level are evaluated before the rules defined at the zone level.
11
16
12
17
Each phase has at most one [entry point ruleset](/ruleset-engine/about/rulesets/#entry-point-ruleset) at the account and zone level.
Copy file name to clipboardExpand all lines: src/content/docs/ruleset-engine/basic-operations/add-rule-phase-rulesets.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
@@ -12,7 +12,7 @@ A [phase entry point ruleset](/ruleset-engine/about/rulesets/#entry-point-rulese
12
12
13
13
To add one or more rules to a phase entry point ruleset, use one of the [ruleset update operations](/ruleset-engine/rulesets-api/update/) of the [Rulesets API](/ruleset-engine/rulesets-api/). When you add a rule to an entry point ruleset, the entry point ruleset is created automatically if it does not exist. This API method requires that you include in the request all rules you want to keep in the ruleset, or else they will be removed.
14
14
15
-
If you are adding a **single** rule to a ruleset, consider using one of the [rule creation operations](/ruleset-engine/rulesets-api/add-rule/) instead. In this case, the request will only include the definition of the new rule.
15
+
If you are adding a single rule to a ruleset, consider using one of the [rule creation operations](/ruleset-engine/rulesets-api/add-rule/) instead. In this case, the request only includes the definition of the new rule.
16
16
17
17
:::note[Creating an entry point ruleset]
18
18
Instead of relying on the automatic creation of an entry point ruleset, you can also create this ruleset explicitly using one of the [ruleset creation operations](/ruleset-engine/rulesets-api/create/).
Copy file name to clipboardExpand all lines: src/content/docs/ruleset-engine/custom-rulesets/add-rules-ruleset.mdx
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,16 +7,16 @@ sidebar:
7
7
8
8
import { APIRequest, Render } from"~/components";
9
9
10
-
To add rules to an existing custom ruleset, use the [Update an account ruleset](/api/resources/rulesets/methods/update/) operation and pass the rules in an array. Each rule has an expression and an action.
10
+
To add rules to an existing custom ruleset, use the [Update an account or zone ruleset](/api/resources/rulesets/methods/update/) operation and pass the rules in an array. Each rule has an expression and an action.
11
11
12
12
:::note[Choosing the appropriate API method]
13
13
14
-
When you add rules to a custom ruleset using the [Update an account ruleset](/api/resources/rulesets/methods/update/) operation, you replace all the rules in the ruleset with the rules in the request. Use this API method when adding or updating several rules at once. This method will update the ruleset version number only once.
14
+
When you add rules to a custom ruleset using the [Update an account or zone ruleset](/api/resources/rulesets/methods/update/) operation, you replace all the rules in the ruleset with the rules in the request. Use this API method when adding or updating several rules at once. This method will update the ruleset version number only once.
15
15
16
16
You can use other API operations depending on the type of operation:
17
17
18
-
- Add a single rule to an existing custom ruleset: Use the [Create an account ruleset rule](/api/resources/rulesets/subresources/rules/methods/create/) operation.
19
-
- Update a single rule in a custom ruleset: Use the [Update an account ruleset rule](/api/resources/rulesets/subresources/rules/methods/edit/) operation.
18
+
- Add a single rule to an existing custom ruleset: Use the [Create an account or zone ruleset rule](/api/resources/rulesets/subresources/rules/methods/create/) operation.
19
+
- Update a single rule in a custom ruleset: Use the [Update an account or zone ruleset rule](/api/resources/rulesets/subresources/rules/methods/edit/) operation.
20
20
21
21
:::
22
22
@@ -26,7 +26,7 @@ You can use other API operations depending on the type of operation:
26
26
27
27
## Add rules
28
28
29
-
The following request adds two rules to a custom ruleset with ID `$RULESET_ID`. These will be the only two rules in the ruleset.
29
+
The following request adds two rules to a custom ruleset at the account level with ID `$RULESET_ID`. These will be the only two rules in the ruleset.
30
30
31
31
The response will include the rule ID of the new rules in the `id` field.
32
32
@@ -90,9 +90,9 @@ The response will include the rule ID of the new rules in the `id` field.
90
90
91
91
## Update rules
92
92
93
-
To update one or more rules in a custom ruleset, use the [Update an account ruleset](/api/resources/rulesets/methods/update/) operation. Include the ID of the rules you want to modify in the rules array and add the fields you wish to update. The request replaces the entire ruleset with a new version. Therefore, you must include the ID of all the rules you wish to keep.
93
+
To update one or more rules in a custom ruleset, use the [Update an account or zone ruleset](/api/resources/rulesets/methods/update/) operation. Include the ID of the rules you want to modify in the rules array and add the fields you wish to update. The request replaces the entire ruleset with a new version. Therefore, you must include the ID of all the rules you wish to keep.
94
94
95
-
The following `PUT` request edits one rule in a custom ruleset and updates the execution order of the rules.
95
+
The following `PUT` request edits one rule in a custom ruleset at the account level and updates the execution order of the rules.
96
96
97
97
The response will include the modified custom ruleset. Note that the updated rule and ruleset version number increment.
The following request creates a new custom ruleset. The response will include the ID of the new custom ruleset in the `id` field.
21
+
## Example A - Custom ruleset at the account level
22
+
23
+
The following request creates a new custom ruleset at the account level. The response will include the ID of the new custom ruleset in the `id` field.
22
24
23
25
<APIRequest
24
26
path="/accounts/{account_id}/rulesets"
25
27
method="POST"
26
28
json={{
27
29
name: "Custom Ruleset 1",
28
-
description: "My First Custom Ruleset",
30
+
description: "My First Custom Ruleset (account)",
31
+
kind: "custom",
32
+
phase: "http_request_firewall_custom",
33
+
}}
34
+
/>
35
+
36
+
```json output {3}
37
+
{
38
+
"result": {
39
+
"id": "f82ccda3d21f4a02825d3fe45b5e1c10",
40
+
"name": "Custom Ruleset 1",
41
+
"description": "My First Custom Ruleset (account)",
42
+
"kind": "custom",
43
+
"version": "1",
44
+
"last_updated": "2025-08-09T10:27:30.636197Z",
45
+
"phase": "http_request_firewall_custom"
46
+
},
47
+
"success": true,
48
+
"errors": [],
49
+
"messages": []
50
+
}
51
+
```
52
+
53
+
You can include a list of rules in the custom ruleset creation request. If you have not added any rules, refer to [Add rules to a custom ruleset](/ruleset-engine/custom-rulesets/add-rules-ruleset/) for more information.
54
+
55
+
56
+
## Example B - Custom ruleset at the zone level
57
+
58
+
The following request creates a new custom ruleset at the zone level. The response will include the ID of the new custom ruleset in the `id` field.
59
+
60
+
<APIRequest
61
+
path="/zones/{zone_id}/rulesets"
62
+
method="POST"
63
+
json={{
64
+
name: "Custom Ruleset 1",
65
+
description: "My First Custom Ruleset (zone)",
29
66
kind: "custom",
30
67
phase: "http_request_firewall_custom",
31
68
}}
@@ -36,10 +73,10 @@ The following request creates a new custom ruleset. The response will include th
36
73
"result": {
37
74
"id": "f82ccda3d21f4a02825d3fe45b5e1c10",
38
75
"name": "Custom Ruleset 1",
39
-
"description": "My First Custom Ruleset",
76
+
"description": "My First Custom Ruleset (zone)",
40
77
"kind": "custom",
41
78
"version": "1",
42
-
"last_updated": "2021-03-09T10:27:30.636197Z",
79
+
"last_updated": "2025-08-09T10:27:30.636197Z",
43
80
"phase": "http_request_firewall_custom"
44
81
},
45
82
"success": true,
@@ -49,3 +86,6 @@ The following request creates a new custom ruleset. The response will include th
49
86
```
50
87
51
88
You can include a list of rules in the custom ruleset creation request. If you have not added any rules, refer to [Add rules to a custom ruleset](/ruleset-engine/custom-rulesets/add-rules-ruleset/) for more information.
Copy file name to clipboardExpand all lines: src/content/docs/ruleset-engine/custom-rulesets/deploy-custom-ruleset.mdx
+83-4Lines changed: 83 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,21 +8,27 @@ description: Learn how to deploy a custom ruleset to your Cloudflare account.
8
8
9
9
import { APIRequest, Render } from"~/components";
10
10
11
-
To deploy a custom ruleset, add a rule with `execute` action to the list of rules of a phase [entry point ruleset](/ruleset-engine/about/rulesets/#entry-point-ruleset) at the account level. The expression of the new rule will define when the custom ruleset will run.
11
+
To deploy a custom ruleset, add a rule with `execute` action to the list of rules of a phase [entry point ruleset](/ruleset-engine/about/rulesets/#entry-point-ruleset) at the account or zone level. The expression of the new rule will define when the custom ruleset will run.
12
+
13
+
You can only deploy custom rulesets in an entry point ruleset with the same scope. For example, a custom ruleset defined at the account level can only be deployed at the account level.
1. Obtain the name of the [phase](/ruleset-engine/reference/phases-list/) where you want to deploy the custom ruleset.
20
24
2.[Create a custom ruleset](/ruleset-engine/custom-rulesets/create-custom-ruleset/) and keep the ID of the new custom ruleset.
21
25
3.[Fetch the rules already present in the phase entry point ruleset](/ruleset-engine/basic-operations/view-rulesets/#view-the-rules-included-in-a-ruleset). You must include in the `PUT` request all existing rules you want to keep.
22
26
23
-
## Example
27
+
## Example A - Account-level deployment
24
28
25
-
The following `PUT` request adds a rule that executes a custom ruleset when the zone name matches `example.com`. The response will include all the rules in the phase entry point ruleset.
29
+
The following `PUT` request adds a rule that executes a custom ruleset when the zone name matches `example.com`.
30
+
31
+
In the `PUT` request, you must include the IDs of all existing rules you want to keep. The response will include all the rules in the phase entry point ruleset after the update.
@@ -110,5 +116,78 @@ The following `PUT` request adds a rule that executes a custom ruleset when the
110
116
```
111
117
112
118
:::caution
113
-
Regarding the expression of the rule deploying the ruleset, you must use parentheses to enclose any custom conditions and end your expression with `and cf.zone.plan eq "ENT"` or else the API operation will fail.
119
+
When deploying the custom ruleset at the account level, you must use parentheses to enclose any custom conditions and end your expression with `and cf.zone.plan eq "ENT"` like in the example above, or else the API operation will fail.
114
120
:::
121
+
122
+
## Example B - Zone-level deployment
123
+
124
+
The following `PUT` request adds a rule to a zone-level entry point ruleset that executes a custom ruleset with ID `"<CUSTOM_RULESET_ID>"` for requests targeting the `/login` URI path.
125
+
126
+
You must include in the `PUT` request the IDs of all existing rules you want to keep. The response will include all the rules in the phase entry point ruleset after the update.
Copy file name to clipboardExpand all lines: src/content/docs/ruleset-engine/custom-rulesets/index.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,15 @@ sidebar:
5
5
order: 7
6
6
---
7
7
8
-
Use the following workflow to deploy a custom ruleset at the account level:
8
+
Use the following workflow to deploy a custom ruleset:
9
9
10
10
1.[Create a custom ruleset](/ruleset-engine/custom-rulesets/create-custom-ruleset/).
11
11
2.[Add rules to your custom ruleset](/ruleset-engine/custom-rulesets/add-rules-ruleset/).
12
-
3.[Add a rule to an account-level phase entry point ruleset that executes the custom ruleset](/ruleset-engine/custom-rulesets/deploy-custom-ruleset/).
12
+
3.[Add a rule to a phase entry point ruleset that executes the custom ruleset](/ruleset-engine/custom-rulesets/deploy-custom-ruleset/).
13
13
14
14
You must create a rule with `execute` action in an entry point ruleset to execute the custom ruleset (step 3 in the previous procedure). If you skip this step, the rules of the custom ruleset will not run.
15
15
16
-
Currently, custom rulesets are only supported by the [Cloudflare WAF](/waf/).
16
+
Currently, custom rulesets are only supported by the [Cloudflare WAF](/waf/), both at the account and the zone level.
17
17
18
18
:::note
19
19
You cannot execute a custom ruleset from another custom ruleset, only from an entry point ruleset.
0 commit comments