You can enable or disable Cloudflare Under Attack Mode to provide an extra layer of security during a suspected cyberattack. This feature is available to Cloudflare customers and acts as a high-security "gate" that challenges all visitors with a JavaScript challenge before they can access your website.
Before you begin
You will need:
A Cloudflare account
Administrative access to your Cloudflare dashboard
A website currently proxied by Cloudflare (the "Orange Cloud" must be enabled for the DNS records)
Enabling and Disabling Under Attack Mode
Log in to your Cloudflare account and select the domain you wish to protect.
From the left-hand sidebar, select Security > Settings.
Locate the Under Attack section.
To enable the protection, toggle the Under Attack switch to the On position.
To disable the protection and return to normal operation, toggle the Under Attack switch to the Off position.
Note: When Under Attack mode is enabled, every visitor to your site will be presented with a "Checking your browser" page. This can significantly impact user experience and should only be used during active, high-volume attacks.
Confirm the result
When Enabled: Visitors to your site will see a Cloudflare-branded challenge page before the site loads.
When Disabled: The challenge page will disappear, and visitors will be able to access your site normally (subject to your other Cloudflare security rules).
Limitations
User Experience: Enabling this mode will likely prevent some users from accessing your site quickly, as they must complete the JavaScript challenge.
Scope: This feature only functions for traffic passing through Cloudflare's proxy. It does not protect your origin server from direct IP attacks if the origin IP is exposed.
Duration: While there is no automatic timer, it is recommended to keep the mode active only as long as the attack persists.
