Cloudflare Docs
Rules
Rules
Edit this page on GitHub
Set theme to dark (⇧+D)

Cloudflare Rules

Available on all plans

Cloudflare Rules allows you to make adjustments to requests and responses, configure Cloudflare settings, and trigger specific actions for matching requests.

Rules features require that you proxy the DNS records of your domain (or subdomain) through Cloudflare.


​​ Features

​​ Transform Rules

Adjust the URI path, query string, and HTTP headers of requests and responses on the Cloudflare global network.

​​ URL normalization

Modify the URLs of incoming requests so that they conform to a consistent formatting standard.

​​ Redirects

Redirect visitors from a source URL to a target URL with a specific HTTP status code. Use Single Redirects or Bulk Redirects depending on your use case.

​​ Origin Rules

Customize where the incoming traffic will go and with which parameters. Override request properties such as Host header, destination hostname, and destination port.

​​ Configuration Rules

Customize Cloudflare configuration settings for matching incoming requests.

​​ Compression Rules

Customize the compression applied to responses from Cloudflare’s global network to your website visitors, based on the file extension and content type.

​​ Snippets

Customize the behavior of your website or application using short pieces of JavaScript code.

​​ Custom error responses

Define custom responses for errors returned by an origin server or by a Cloudflare product, including Workers.

​​ Page Rules

Trigger certain actions when a request matches a URL pattern.



​​ More resources