Skip to content

Cloudflare Rules

Available on all plans

Cloudflare Rules allow 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

Configuration Rules

Customize Cloudflare configuration settings for matching incoming requests.

Snippets

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

Transform Rules

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

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.

Cloud Connector

Route matching incoming traffic from your website to a public cloud provider such as AWS, Google Cloud, and Azure.

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.

Page Rules

Trigger certain actions when a request matches a URL pattern.

URL normalization

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

Custom Error Responses

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


Custom rules

Control incoming traffic by filtering requests to a zone. You can block or challenge incoming requests according to rules you define.

Rate limiting rules

Define rate limits for requests matching an expression, and the action to perform when those rate limits are reached.

Cache rules

Customize the cache properties of your HTTP requests.

Workers

Cloudflare Workers provides a serverless execution environment that allows you to create new applications or augment existing ones without configuring or maintaining infrastructure.


More resources

Plans

Compare available Cloudflare plans