About Transform Rules
Transform Rules allow you to adjust the URI path, query string, and HTTP headers of incoming requests at the edge.
There are two types of Transform Rules:
URL Rewrite Rules:
- Rewrite the path of the URL of an HTTP request
- Rewrite the query string of the URL of an HTTP request
HTTP Request Header Modification Rules:
- Set the value of an HTTP request header
- Remove an HTTP request header
To configure Transform Rules in the dashboard, use the Transform Rules tab in Rules.
Transform Rules evaluation
Transform Rules run in order. Rules that appear later in the list of Transform Rules can overwrite changes done by previous rules. You can define the rule order in the dashboard or via API.
All request fields are immutable while evaluating Transform Rules for a request. For example, if a URL Rewrite Rule #1 updates the URI path or the query string, URL Rewrite Rule #2 will not take these previous changes into consideration.
Cloudflare Transform Rules are available to all customers. Keep in mind that support for regular expressions is based on your plan type.
This table outlines the Transform Rules features available with each customer plan:
|Active Transform Rules||2||5||10||20|
|Regular expression support||No||No||Yes||Yes|
To get started building your own Transform Rules, see:
You can also create Transform Rules via API: