Cloudflare Firewall Rules

Last updated Aug 14, 2026 Cloudflare Firewall Rules allows you to create rules that inspect incoming traffic and block, challenge, log, or allow specific requests.

Deprecation notice

Cloudflare Firewall Rules has been deprecated. Cloudflare has moved existing firewall rules to WAF custom rules. For more information on this change, refer to the upgrade guide.

Main features

  • Rule-based protection: Use pre-defined rulesets provided by Cloudflare, or define your own firewall rules. Create rules in the Cloudflare dashboard or via API.
  • Complex custom rules: Each rule's expression can reference multiple fields from all the available HTTP request parameters and fields, allowing you to create complex rules.

Availability

This table outlines the Firewall Rules features and entitlements available with each customer plan:

Free Pro Business Enterprise
Availability Yes Yes Yes Yes
Number of rules 5 20 100 1,000
Supported actions All except Log All except Log All except Log All
Regex support No No Yes Yes

Next steps

Was this helpful?

YesNo

On this page

Cloudflare Firewall Rules - 图1Docs

{"@context":"https://schema.org","@type":"WebPage","@id":"https://developers.cloudflare.com/firewall/#page","headline":"Cloudflare Firewall Rules","description":"Create rules to inspect and act on incoming HTTP traffic.","url":"https://developers.cloudflare.com/firewall/","inLanguage":"en","image":"https://developers.cloudflare.com/firewall/og.png?v=57363d946c6a43f9","dateModified":"2026-08-14","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Learn how Cloudflare Firewall Rules work. title: About image: https://developers.cloudflare.com/firewall/cf-firewall-rules/og.png?v=c16c8887cf07d116


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/firewall/llms.txt
Use this file to discover all available pages before exploring further.