Skip to content
Rules
Visit Rules on GitHub
Set theme to dark (⇧+D)

About Transform Rules

Transform Rules allow you to make adjustments to incoming requests at the edge before they go through any other Cloudflare products.

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.

Create a URL Rewrite RuleCreate a Request Header Modification Rule


Availability

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:

FeatureFreeProBusinessEnterprise
Active Transform Rules251020
Regular expression supportNoNoYesYes

A Cloudflare user must have the Firewall role or one of the Administrator roles to access Transform Rules.


Get started

To get started building your own Transform Rules, see:

You can also create Transform Rules via API:

Check Firewall Rules language for more information on building expressions for Transform Rules, since the language is the same as the Firewall Rules language.