Configure individual Cloudflare rules for website pages
You can set up individual Cloudflare rules for website pages. The rules will be executed even if they do not match global settings for a domain zone.
Note!
The Cloudflare free license allows you to create only three sets of rules. Only one set can be created for one page.
To create a rule for the page:
- Log in to ISPmanager as the User.
- Check that the domain is connected to Cloudflare. For more information, please refer to the article Connecting a domain to Cloudflare.
- Go to Sites → Cloudflare → Page rules → Add.
- Enter the Page address that the rule will be created for.
- To redirect to another page:
- Enable the option Redirect.
- Enter the Destination.
- Enter the Return code.
- Enable the HTTPS option to configure redirection to a secure protocol. Note.You can provide the page settings only if the options Redirect and HTTPS are disabled.
- Enable the option Automatic HTTPS rewrites to rewrite links to unencrypted resources from HTTP to HTTPS.
- In the Browser TTL field select the time during which cached files will remain in the cache of users' browsers. The time is set in seconds.
- Browser integrity check — this option allows Cloudflare to detect requests with HTTP headers, which are usually used by spammers, bots and scanners, and block them. These include, for example, requests with a missing or non-standard client application (User agent).
- Set the page Caching level:
- Disabled — disable caching;
- No query string — data is cached only when the query string is missing;
- Ignore query string — regardless of the query string, the same cached data is used;
- With query parameters — new data is cached for each new query string;
- Cache all — cache all data.
- In the Disable functions field select the functions that will be disabled for the page:
- Protection — Protection — disables Mailbox obfuscation (Email Obfuscation), SSE (Server Side Excludes), Web Application Firewall (WAF), Rate Limiting, protection against Web scraping attacks (Scrape Shield);
- Performance improvement — disables Minification, Rocket Loader, Mirage, Polish;
- Applications — disables all Cloudflare applications.
- Select the checkbox Email obfuscation to hide email addresses on your web page from bots. At the same time, no visible changes are made for users.
- Select the Security level. It determines which users are considered suspicious:
- Off-user verification is disabled;
- Under attack — a level of security that is worth using only if the website is under DDoS attack;
- High — all users who have shown suspicious behavior in the last 14 days are checked;
- Medium — only users who pose a dangerous or moderate threat are checked
- Low — only users who pose a very dangerous threat are checked;
- Essentially off — only users who pose a critical threat are checked.
- Enable the option SSE if you want to hide certain content on your website from suspicious visitors. You will need to wrap the content with the following tags
. E.g.:Hidden content
<!--sse-->Hiddent content<!--/sse-->
- To set up a secure connection for a site, select the type of SSL certificate for the domain:
- Off — the site is not accessible via the secure HTTPS protocol. Redirection from HTTPS to HTTP is enabled;;
- Self-signed — the server with the website supports HTTPS, but the installed certificate does not match the domain or is self-signed;
- Flexible — visitors can access the site via HTTPS, but requests to the server with the website will be sent via HTTP protocol;
- Existing — a certificate is installed on the server with the website, valid and signed by a trusted certification authority or Cloudflare certification authority. Cloudflare will provide HTTPS access and verify the certificate with each request.
- Click Ok to save the changes in Cloudflare.