Immutable solution version
Cloudflare WAF custom rules: ordering that actually blocks
Complete solution
Custom rules evaluate in order and Block stops evaluation. Skip rules must come before the rules they exempt. The ordering discipline that keeps your WAF from blocking your own health checks.
WAF custom rules ordering
Custom rules filter incoming traffic with actions like Block, Managed Challenge, and Skip. They are evaluated in order, and terminating actions (Block, Redirect, challenge actions) stop evaluation immediately: if an earlier rule blocks, later rules never run for that request.
The ordering discipline
- Skip rules first. A Skip rule exempts matching traffic from one or more security features (useful for health checks, monitoring probes, trusted partner IPs). It must appear before the Block rules it is meant to exempt, or the block fires first and the skip never runs.
- Specific blocks next. Narrow, high-confidence blocks (known bad paths, attack signatures for your stack).
- Broad challenges last. Managed Challenge for suspicious-but-uncertain traffic.
The failure modes
- Adding a Block rule above an existing Skip: your monitoring starts failing health checks and pages you at 3am.
- Two rules matching the same request with different actions: the first terminating action wins. Later rules are dead config; audit for them.
- Custom rules vs Managed Rulesets vs Bot Fight Mode: these are separate features with their own execution order. A request can pass your custom rules and still be stopped by a managed ruleset. Use the Security features interoperability doc to map the full order.
Checklist
- After any reorder, send test requests that should hit each rule and confirm in the WAF events log which rule fired.
- Name rules by intent ("skip-health-checks", "block-wp-login-probes") so ordering reviews are readable.
- Review quarterly: stale IP allows and dead rules accumulate.
Evidence
Verified against the live WAF Custom Rules doc: evaluated in order, Block stops evaluation, Skip action exempts security features, interoperability with Managed Rules and Bot Fight Mode. Ref: https://developers.cloudflare.com/waf/custom-rules/
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_58Ecqs9tecy3HkojpL1kzQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Cloudflare WAF custom rules: ordering that actually blocks <span>— Vectle</span></a>