Skip to content
Cloudflare Docs
Search
Product directory
Learning paths
Status
Support
Log in
GitHub
Twitter
YouTube
Select theme
Dark
Light
Auto
Rules
Overview
Examples
Configuration Rules
Overview
Create a rule in the dashboard
Create a rule via API
Available settings
Examples
Overview
Define a single configuration rule using Terraform
Snippets
Overview
Alpha
How it works
Create in the dashboard
Examples
Common errors
Transform Rules
Overview
Rewrite URL
Overview
Create a rule in the dashboard
Create a rule via API
Reference
URL rewrite parameters
Available fields and functions
Modify request header
Overview
Create a rule in the dashboard
Create a rule via API
Reference
Format of header names and values
Available fields and functions
API parameter reference
Modify response header
Overview
Create a rule in the dashboard
Create a rule via API
Reference
Format of header names and values
Available fields and functions
API parameter reference
Managed Transforms
Overview
Configure Managed Transforms
Available Managed Transforms
Work with Transform Rules
Troubleshooting
Examples
Overview
Add a request header with the current bot score
Add a response header with a static value
Add request header with a static value
Remove a request header
Remove a response header
Rewrite blog archive URLs
Rewrite image paths with several URL segments
Rewrite page path for visitors in specific countries
Rewrite path of archived blog posts
Rewrite path of moved section of a website
Rewrite URL query string
Set a response header with the current bot score
Set response header with a static value
Redirects
Overview
Single Redirects
Overview
Create rule in the dashboard
Create rule via API
Create rule using Terraform
Available settings
Bulk Redirects
Overview
Concepts
How it works
Create in the dashboard
Create via API
Reference
URL redirect parameters
Supported URL components
Available fields and functions
CSV file format
API JSON objects
FAQ
Examples
Overview
Perform mobile redirects
Redirect admin area requests to HTTPS
Redirect from root to WWW
Redirect from WWW to root
Redirect local visitors to specific subdomains
Redirect requests for a domain to a new domain
Redirect requests from one country to a domain
Redirect requests from one domain to another
Redirect requests to a different hostname
Redirect visitors to a new page URL
Remove locale from URL path
Origin Rules
Overview
Create a rule in the dashboard
Create a rule via API
Available settings
API parameter reference
Examples
Overview
Change URI Path and Host Header
Define a single origin rule using Terraform
FAQ
Cache Rules ↗
Cloud Connector
Overview
Beta
Configure in the dashboard
Configure via API
Supported cloud providers
Examples
Overview
Route /images to an S3 Bucket
Route /images to an S3 Bucket using Terraform
Send EU visitors to a Google Cloud Storage bucket
Serve /static-assets from Azure Blob Storage
Compression Rules
Overview
Create a rule in the dashboard
Create a rule via API
Available settings
Examples
Overview
Disable Brotli compression
Disable compression for AVIF images
Use Gzip compression for CSV files
Use only Brotli compression for a specific path
Page Rules
Overview
Manage
How to
URL forwarding
Override URL or IP address
Rewrite Host headers
Reference
Settings
Additional reference
Wildcard matching
Recommended rules
Troubleshooting
General
Billing and subscription
URL normalization
Overview
How it works
Configure in the dashboard
Settings
Examples
Custom error responses
Overview
Beta
Create via API
Parameters
Error tokens
Reference
Rules language ↗
Troubleshooting
Edge Side Code deprecation
Page Rules migration guide
Changelog
Product directory
Learning paths
Status
Support
Log in
GitHub
Twitter
YouTube
Select theme
Dark
Light
Auto
Products
…
Rules
Reference
Reference
Refer to the following pages for more information about Rules:
Rules language
Troubleshooting
Edge Side Code deprecation
Page Rules migration guide
Cloudflare Dashboard
Discord
Community
Learning Center
Support Portal