Skip to content

Commit 6e73ad2

Browse files
[Challenges] Reorganize Fundamentals section + add new information (#22275)
* Updated Challenges PR * new tile for challenges * fix links * fix partial + tile desc * fix broken link in turnstile * update overview according to style guide
1 parent 8fef98b commit 6e73ad2

File tree

57 files changed

+587
-391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+587
-391
lines changed

public/__redirects

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
/support/other-languages/deutsch/cloudflare-bot/ /bots/troubleshooting/ 301
219219
/bots/reference/verified-bot-categories/ /bots/concepts/bot/verified-bots/categories/ 301
220220
/bots/reference/verified-bot-policy/ /bots/concepts/bot/verified-bots/policy/ 301
221-
/bots/concepts/challenge-solve-rate/ /fundamentals/security/cloudflare-challenges/challenge-solve-rate/ 301
221+
/bots/concepts/challenge-solve-rate/ /cloudflare-challenges/reference/challenge-solve-rate/ 301
222222
/bots/concepts/detection-ids/ /bots/additional-configurations/detection-ids/ 301
223223
/bots/concepts/ja3-ja4-fingerprint/ /bots/additional-configurations/ja3-ja4-fingerprint/ 301
224224
/bots/concepts/signals-intelligence/ /bots/additional-configurations/ja3-ja4-fingerprint/signals-intelligence/ 301
@@ -502,7 +502,7 @@
502502
/firewall/cf-rulesets/custom-rules/rate-limiting/ /waf/rate-limiting-rules/ 301
503503
/support/page-rules/required-firewall-rule-changes-to-enable-url-normalization/ /firewall/troubleshooting/required-changes-to-enable-url-normalization/ 301
504504
/firewall/known-issues-and-faq/ /waf/troubleshooting/faq/ 301
505-
/firewall/cf-firewall-rules/cloudflare-challenges/ /fundamentals/security/cloudflare-challenges/ 301
505+
/firewall/cf-firewall-rules/cloudflare-challenges/ /cloudflare-challenges/ 301
506506

507507
# fundamentals
508508
/fundamentals/account-and-billing/account-setup/ /fundamentals/subscriptions-and-billing/ 301
@@ -554,7 +554,7 @@
554554
/fundamentals/global-configurations/ /fundamentals/ 301
555555
/fundamentals/customizations/ /fundamentals/ 301
556556
/fundamentals/security/cybersafe/ /fundamentals/reference/policies-compliances/cybersafe/ 301
557-
/fundamentals/security/challenge-passage/ /fundamentals/security/cloudflare-challenges/challenge-passage/ 301
557+
/fundamentals/security/challenge-passage/ /cloudflare-challenges/challenge-types/challenge-pages/#challenge-passage 301
558558
/fundamentals/glossary/ /fundamentals/reference/glossary/ 301
559559
/fundamentals/account-and-billing/login/ /fundamentals/setup/account/login/ 301
560560
/fundamentals/account-and-billing/account-maintenance/delete-account/ /fundamentals/subscriptions-and-billing/delete-account/ 301
@@ -591,7 +591,7 @@
591591
/fundamentals/get-started/setup/minimize-downtime/ /fundamentals/performance/minimize-downtime/ 301
592592
/fundamentals/basic-tasks/maintenance-mode/ /fundamentals/performance/minimize-downtime/ 301
593593
/fundamentals/get-started/concepts/what-is-cloudflare/ https://www.cloudflare.com/learning/what-is-cloudflare/ 301
594-
/fundamentals/get-started/concepts/cloudflare-challenges/ /fundamentals/security/cloudflare-challenges/ 301
594+
/fundamentals/get-started/concepts/cloudflare-challenges/ /cloudflare-challenges/ 301
595595
/fundamentals/get-started/concepts/accounts-and-zones/ /fundamentals/setup/accounts-and-zones/ 301
596596
/fundamentals/get-started/concepts/cloudflare-ip-addresses/ /fundamentals/concepts/cloudflare-ip-addresses/ 301
597597
/fundamentals/get-started/concepts/network-layers/ /fundamentals/reference/network-layers/ 301
@@ -673,6 +673,9 @@
673673
/fundamentals/concepts/the-internet/ https://www.cloudflare.com/learning/network-layer/how-does-the-internet-work/ 301
674674
/fundamentals/concepts/free-plan/ /fundamentals/subscriptions-and-billing/free-plan/ 301
675675
/fundamentals/setup/manage-domains/connect-your-domain/ /fundamentals/setup/manage-domains/add-site/ 301
676+
/fundamentals/security/cloudflare-challenges/challenge-passage/ /cloudflare-challenges/challenge-types/challenge-pages/#challenge-passage 301
677+
/fundamentals/security/cloudflare-challenges/challenge-solve-rate/ /cloudflare-challenges/reference/challenge-solve-rate/ 301
678+
/fundamentals/security/cloudflare-challenges/challenge-solve-issues/ /cloudflare-challenges/troubleshooting/challenge-solve-issues/ 301
676679

677680
# gateway
678681
/gateway/about/ /cloudflare-one/policies/gateway/ 301
@@ -1338,7 +1341,7 @@
13381341
/turnstile/migration/migrating-from-hcaptcha/ /turnstile/migration/hcaptcha/ 301
13391342
/turnstile/concepts/widget-types/ /turnstile/concepts/widget/ 301
13401343
/turnstile/concepts/domain-management/ /turnstile/concepts/hostname-management/ 301
1341-
/turnstile/troubleshooting/challenge-solve-issues/ /fundamentals/security/cloudflare-challenges/challenge-solve-issues/ 301
1344+
/turnstile/troubleshooting/challenge-solve-issues/ /cloudflare-challenges/troubleshooting/challenge-solve-issues/ 301
13421345

13431346
# waf
13441347
/waf/about/ /waf/concepts/ 301
@@ -1375,8 +1378,8 @@
13751378
/waf/analytics/security-events/free-plan/ /waf/analytics/security-events/ 301
13761379
/waf/analytics/security-events/paid-plans/ /waf/analytics/security-events/ 301
13771380
/waf/analytics/security-events/additional-information/ /waf/tools/validation-checks/ 301
1378-
/waf/reference/cloudflare-challenges/ /fundamentals/security/cloudflare-challenges/ 301
1379-
/waf/tools/challenge-passage/ /fundamentals/security/cloudflare-challenges/challenge-passage/ 301
1381+
/waf/reference/cloudflare-challenges/ /cloudflare-challenges/ 301
1382+
/waf/tools/challenge-passage/ /cloudflare-challenges/challenge-types/challenge-pages/#challenge-passage 301
13801383

13811384
# waiting-room
13821385
/waiting-room/how-to/mobile-traffic/ /waiting-room/how-to/json-response/ 301

src/content/docs/analytics/account-and-zone-analytics/status-codes.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Users may also see `100x` errors which are not reported. These will be displayed
3232
## Common edge status codes
3333

3434
- `400` - Bad Request intercepted at the Cloudflare Edge (for example, missing or bad HTTP header)
35-
- `403` - Security functionality (for example, Web Application Firewall, Browser Integrity Check, [Cloudflare challenges](/fundamentals/security/cloudflare-challenges/), and most 1xxx error codes)
35+
- `403` - Security functionality (for example, Web Application Firewall, Browser Integrity Check, [Cloudflare challenges](/cloudflare-challenges/), and most 1xxx error codes)
3636
- `409` - DNS errors typically in the form of 1000 or 1001 error code
3737
- `413` - File size upload exceeded the maximum size allowed (configured in the dashboard under **Network** > **Maximum Upload Size**.)
3838
- `444` - Used by Nginx to indicate that the server has returned no information to the client, and closed the connection. This error code is internal to Nginx and is **not** returned to the client.

src/content/docs/analytics/account-and-zone-analytics/threat-types.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ A /24 IP range that was blocked based on the [user configuration](/waf/tools/ip-
5252

5353
## New Challenge (user)
5454

55-
[Challenge](/fundamentals/security/cloudflare-challenges/) based on user configurations set for visitor’s IP in either WAF managed rules or custom rules, configured in **Security** > **WAF**.
55+
[Challenge](/cloudflare-challenges/) based on user configurations set for visitor’s IP in either WAF managed rules or custom rules, configured in **Security** > **WAF**.
5656

5757
## Challenge error
5858

src/content/docs/analytics/account-and-zone-analytics/total-threats-stopped.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: Total threats stopped
77
Total Threats Stopped measures the number of “suspicious” and “bad” requests that were aimed at your site. Requests receive these labels as they enter Cloudflare’s network:
88

99
- **Legitimate:** Request passed directly to your site.
10-
- **Suspicious:** Request has been challenged with a [Cloudflare challenge](/fundamentals/security/cloudflare-challenges/).
10+
- **Suspicious:** Request has been challenged with a [Cloudflare challenge](/cloudflare-challenges/).
1111
- **Bad:** Request has been blocked because our Browser Integrity Check, or because of user configured settings like WAF rules or IP Access rules.
1212

1313
In addition to threat analytics you can also monitor search engine crawlers going to your websites. For most websites, threats and crawlers make up 20% to 50% of traffic.

src/content/docs/bots/additional-configurations/detection-ids.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ and not any(cf.bot_management.detection_ids[*] in {3355446 12577893})
8888

8989
### Challenges for account takeover detections
9090

91-
Cloudflare's [Managed Challenge](/fundamentals/security/cloudflare-challenges/) can limit brute-force attacks on your login endpoints.
91+
Cloudflare's [Managed Challenge](/cloudflare-challenges/challenge-types/challenge-pages/#managed-challenge-recommended) can limit brute-force attacks on your login endpoints.
9292

9393
To access account takeover detections:
9494

src/content/docs/bots/get-started/bot-management.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Cloudflare has [default templates](https://dash.cloudflare.com/?to=/:account/:zo
6969
(cf.bot_management.score ge 2 and cf.bot_management.score le 29 and not cf.bot_management.verified_bot and not cf.bot_management.static_resource)
7070
```
7171

72-
- (Optional) [JavaScript detections template](https://dash.cloudflare.com/?to=/:account/:zone/security/security-rules/custom-rules/create?template=JavaScript%20Verified%20URLs): If you enabled JavaScript detections, then set up a [managed challenge](/fundamentals/security/cloudflare-challenges/#managed-challenge-recommended), make sure to add a method and URI path. JavaScript detections improves security for URLs that should only expect JavaScript-enabled clients.
72+
- (Optional) [JavaScript detections template](https://dash.cloudflare.com/?to=/:account/:zone/security/security-rules/custom-rules/create?template=JavaScript%20Verified%20URLs): If you enabled JavaScript detections, then set up a [managed challenge](/cloudflare-challenges/challenge-types/challenge-pages/#managed-challenge-recommended), make sure to add a method and URI path. JavaScript detections improves security for URLs that should only expect JavaScript-enabled clients.
7373

7474
```txt wrap
7575
(not cf.bot_management.js_detection.passed and http.request.method eq "" and http.request.uri.path in {""})

src/content/docs/bots/troubleshooting/frequently-asked-questions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Cloudflare uses data from millions of requests and re-train the system on a peri
5959

6060
When you choose to challenge different bot categories with Bot Fight Mode or Super Bot Fight Mode, you will see Security Events with an **Action Taken** of **Managed Challenge**.
6161

62-
You may also see Managed Challenge due to a triggered [WAF custom rule](/fundamentals/security/cloudflare-challenges/#managed-challenge-recommended).
62+
You may also see Managed Challenge due to a triggered [WAF custom rule](/cloudflare-challenges/challenge-types/challenge-pages/#managed-challenge-recommended).
6363

6464
This does not mean that your traffic was blocked. It is the challenge sent to your user to determine whether they are likely human or likely bot.
6565

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
---
2+
pcx_content_type: concept
3+
title: Challenge pages
4+
sidebar:
5+
order: 1
6+
---
7+
8+
The types of available challenge pages function similarly. The main difference between the challenges are when and if an interaction is presented to the visitor.
9+
10+
- Managed challenges will rarely present the visitor with an interactive challenge, except in cases where Cloudflare cannot verify the legitimacy of the visitor.
11+
- JavaScript challenges never present the visitor with an interactive challenge.
12+
- Interactive challenges present the visitor with a simple and solvable challenge, such as selecting a checkbox, to verify their legitimacy.
13+
14+
Refer to the information below for more details on available challenges.
15+
16+
## Available challenges
17+
18+
### Managed challenge (recommended)
19+
20+
Managed challenges are where Cloudflare dynamically chooses the appropriate type of challenge based on the characteristics of a request. This helps avoid [CAPTCHAs](https://www.cloudflare.com/learning/bots/how-captchas-work/), which also reduces the lifetimes of human time spent solving CAPTCHAs across the Internet.
21+
22+
Unless there are specific compatibility issues or other reasons to use other types of challenges, you should use managed challenges for your various custom rules.
23+
24+
:::caution
25+
Using Cloudflare challenges along with Rules features may cause challenge loops. Refer to [Rules troubleshooting](/rules/reference/troubleshooting/) for more information.
26+
:::
27+
28+
### JavaScript challenge
29+
30+
With a JavaScript (JS) challenge, Cloudflare presents a challenge page that requires no interaction from a visitor except the JavaScript processed by their browser.
31+
32+
The visitor must wait until their browser finishes processing the JavaScript, which should be less than five seconds.
33+
34+
### Interactive challenge
35+
36+
Interactive challenges require a visitor to interact with the interstitial challenge page, presenting the visitor with an interactive challenge to solve. Cloudflare does not recommend using Interactive Challenges.
37+
For more on why Cloudflare does not recommend using Interactive Challenge, in favor of Managed Challenge, refer to our [blog post](https://blog.cloudflare.com/end-cloudflare-captcha/).
38+
39+
---
40+
41+
## Detect a challenge page response
42+
43+
When a request encounters a Cloudflare challenge page instead of the originally anticipated response, the challenge page response (regardless of the challenge page type) will have the `cf-mitigated` header present and set to `challenge`. This header can be leveraged to detect if a response was challenged when making fetch/XHR requests. This header provides a reliable way to identify whether a response is a challenge or not, enabling a web application to take appropriate action based on the result. For example, a front-end application encountering a response from the backend may check the presence of this header value to handle cases where challenge pages encountered unexpectedly.
44+
45+
:::note
46+
Regardless of the requested resource-type, the content-type of a challenge will be `text/html`.
47+
:::
48+
49+
For the `cf-mitigated` header, `challenge` is the only valid value. The header is set for all challenge page types.
50+
51+
To illustrate, here is a JavaScript code snippet that demonstrates how to use the `cf-mitigated` header to detect whether a response was challenged:
52+
53+
```js
54+
fetch("/my-api-endpoint").then((response) => {
55+
if (response.headers.get("cf-mitigated") === "challenge") {
56+
// Handle challenged response
57+
} else {
58+
// Process response as usual
59+
}
60+
});
61+
```
62+
63+
For additional help, refer to our [FAQ](/cloudflare-challenges/troubleshooting/frequently-asked-questions/).
64+
65+
---
66+
67+
## Resolve a challenge
68+
69+
If a visitor encounters a challenge, Cloudflare employees cannot remove that challenge. Only the website owner can configure their Cloudflare settings to stop the challenge being presented.
70+
71+
When observing a Cloudflare Challenge page, a visitor could:
72+
73+
- Successfully pass the challenge to visit the website.
74+
- Request the website owner to allow their IP address.
75+
- Scan their computer for malicious programs (it may be infected).
76+
- Check their antivirus or firewall service to make sure it is not blocking access to the challenge resources (for example, images).
77+
78+
:::note
79+
Visitors must enable JavaScript and cookies on their browser to be able to pass any type of challenge.
80+
:::
81+
82+
---
83+
84+
## Challenge Passage
85+
86+
When a visitor solves a [Cloudflare challenge](/cloudflare-challenges/) - as part of a [WAF custom rule](/waf/custom-rules/) or [IP Access rule](/waf/tools/ip-access-rules/) - you can set the **Challenge Passage** to prevent them from having to solve future challenges for a specified period of time.
87+
88+
### How it works
89+
90+
When a visitor successfully solves a challenge, Cloudflare sets a [`cf_clearance` cookie](/fundamentals/reference/policies-compliances/cloudflare-cookies/#additional-cookies-used-by-the-challenge-platform) in their browser. This cookie specifies the duration your website is accessible to that visitor.
91+
92+
When that visitor tries to access other parts of your website, Cloudflare evaluates the cookie before presenting another challenge. If the cookie is still valid, no challenges will be shown.
93+
94+
When Cloudflare evaluates a `cf_clearance` cookie, a few extra minutes are included to account for clock skew. For XmlHTTP requests, an extra hour is added to the validation time to prevent breaking XmlHTTP requests for pages that set short lifetimes.
95+
96+
### Customize the Challenge Passage
97+
98+
By default, the `cf_clearance` cookie has a lifetime of 30 minutes. Cloudflare recommends a setting between 15 and 45 minutes.
99+
100+
To update the Challenge Passage (and the value of the `cf_clearance` cookie):
101+
102+
1. Log into the [Cloudflare dashboard](https://dash.cloudflare.com).
103+
2. Select your account and domain.
104+
3. Go to **Security** > **Settings**.
105+
4. For **Challenge Passage**, select a duration.
106+
107+
### Limitations
108+
109+
The Challenge Passage does not apply to challenges issued by WAF managed rules. Also, Challenge Passage does not apply to rate limiting rules unless the rate limit is configured to issue a challenge.
110+
111+
---
112+
113+
## Additional configuration
114+
115+
### Multi-language support
116+
117+
Refer to [supported languages](/cloudflare-challenges/reference/supported-languages/) for more information.
118+
119+
### Favicon customization
120+
121+
Cloudflare challenges take the favicon of your website using `GET /favicon.ico` and displays it on the challenge page.
122+
123+
You can customize your favicon by using the HTML snippet below.
124+
125+
```html title="HTML element"
126+
<link rel="shortcut icon" href="<FAVICON_LINK>" />
127+
```
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
pcx_content_type: navigation
3+
title: Challenge types
4+
sidebar:
5+
order: 3
6+
group:
7+
hideIndex: true
8+
---
9+
10+
import { DirectoryListing } from "~/components"
11+
12+
<DirectoryListing />
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
pcx_content_type: concept
3+
title: JavaScript detections
4+
external_link: /bots/additional-configurations/javascript-detections/
5+
sidebar:
6+
order: 2
7+
---

0 commit comments

Comments
 (0)