Skip to content
Cloudflare Docs
Search
Docs Directory
APIs
SDKs
Help
Log in
Select theme
Dark
Light
Auto
Rules
No results found. Try a different search term, or use our
global search
.
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
How it works
Create in the dashboard
Configure via API
Configure using Terraform
Examples
Troubleshooting
When to use Snippets vs Workers
Transform Rules
Overview
Rewrite URLs
Overview
Create a rule in the dashboard
Create a rule via API
Create a rule using Terraform ↗
Reference
URL rewrite parameters
Available fields and functions
Modify request headers
Overview
Create a rule in the dashboard
Create a rule via API
Create a rule using Terraform ↗
Reference
Format of header names and values
Available fields and functions
API parameter reference
Modify response headers
Overview
Create a rule in the dashboard
Create a rule via API
Create a rule using Terraform ↗
Reference
Format of header names and values
Available fields and functions
API parameter reference
Managed Transforms
Overview
Configure Managed Transforms
Available Managed Transforms
Troubleshooting
Examples
Overview
Add a request header for subrequests from other zones
Add a request header with the current bot score
Add a response header with a static value
Add request header with a static value
Normalize encoded slashes in URL path
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 for object storage bucket
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
Configure using Terraform
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
Examples
Overview
Change the destination port
Change the HTTP Host header and DNS record
Define a single origin rule using Terraform
Tutorials
Overview
Change URI path and Host header
Point to Pages with a custom domain
Point to R2 bucket with a custom domain
Available settings
API parameter reference
FAQ
Cache Rules ↗
Cloud Connector
Beta
Overview
Configure in the dashboard
Configure via API
Configure using Terraform
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
Custom Errors
Overview
Edit Error Pages
Create custom error rules
Example rules
Common API calls
Reference
Parameters