Docs / Rules and filters
Custom rules
Block, challenge, let through and redirect requests on your own conditions.
Custom rules decide what to do with a request on your own conditions: block it, show a check, let it past the WAF or just log it. Redirects and header changes are set up next to them.
Where to set them
In the panel: domain → Rules → Security. The same page has the Redirects, URL rewrites, Headers and Bulk redirects tabs.
Conditions
A rule is a set of conditions joined by “all of” or “any of”, with “not” to negate. One rule holds up to 10 conditions and up to two levels of nested groups.
| What is checked | Fields |
|---|---|
| Request address | Path, full URI, query string, parameter, host, method, HTTP version |
| Headers | Header, cookie, User-Agent, referer |
| Where from | IP, country, network (AS) |
| Who | JA4 fingerprint, verified bot |
| Content | Request body |
Comparisons: equals, contains, starts with, ends with, matches regex, in list, in subnet, present — each can be negated with “not”.
- Case does not matter, except for regular expressions: they are case-sensitive.
- Country and network compare only with “equals” and “in list”; “in subnet” works for IP only.
- List values are separated by commas or new lines.
Actions
| Action | What it does |
|---|---|
| Allow | Lets the request past the managed WAF rules |
| Block | Answers 403 |
| Challenge | Shows the browser check |
| Captcha | Shows the slider captcha |
| Log | Only marks the request in the log |
| Skip… | Turns off chosen layers for the request: WAF, limits, check, shared offender lists, geo — or single WAF rules by ID |
“Allow” and the browser check
“Allow” also removes the browser check only when every condition is on IP, path, URI, query, host, method, country, network or verified bot. User-Agent, headers, cookies and body are easy to fake, so with them the check stays.
Order
Rules run top to bottom; drag to reorder. The first matching Allow, Block, Challenge or Captcha decides the request. Log and Skip do not stop the following rules.
The whole path of a request through a node:
- Address allow and deny lists.
- JA4 fingerprint block.
- Your rules: blocks happen here.
- Shared offender lists, then geo rules.
- Per-address request limit.
- HTTPS redirect, redirects and rewrites.
- Browser check and captcha — from your rules and the protection mode.
- Managed WAF rules (OWASP CRS).
In Passive mode, Block, Challenge and Captcha are only logged. If the WAF is off for the site, custom rules do not run.
Test before saving
Preview runs the draft rule over the last day of the log and shows which requests it would hit. Matches on headers, cookies, parameters and body are approximate: they are not stored in full.
Plan limits
| No plan | Paid plan | |
|---|---|---|
| Security rules | 3 | 25 |
| Transform rules | 5 | 50 |
| Redirects | 20 | 10,000 |
The exact limits of your plan are on the plan page in the panel.
Rate limiting
There are no separate rate-limit rules. There is one threshold: domain → Settings → Request filter → “Per-address request threshold” — how many requests a minute one IP may send (at least 60, 0 turns it off). Above it requests from the address are limited. After the browser check the visitor is counted instead of the address, so people behind one NAT do not affect each other.
Redirects and headers
- Redirects: codes 301, 302, 307, 308 (301 by default). The first matching redirect fires, then bulk lists. A
*in the source path goes to the target as${1}…${9}. - The target can use
${host},${path},${query},${uri},${scheme},${country}and more. Loops are caught on save. - Rewrite changes the path before it goes to the server; every matching rule applies. Headers — set, add or remove, up to 20 operations per rule.
- Ready templates: www to apex and back, trailing slash, security headers, CSP report-only, CORS, noindex for staging, hide the Server header.
- Bulk redirects are uploaded as a CSV file up to 8 MB:
source,target[,status[,preserve_query]], separated by comma or semicolon. - Check a URL shows which redirects and rewrites fire for an address. It does not check security rules.
condition: Country equals KZ
action: redirect 302 to https://kz.example.com${uri}