Page Rules migration guide·续1
| Page Rules configuration | Migrate to a configuration rule |
|---|---|
![]() |
![]() |
Migrate Bypass Cache on Cookie
Context:
You configured a Page Rule turning on Bypass Cache on Cookie for all subdomains of example.com and the example.com domain itself:
- URL:
*example.com/* - Setting: Bypass Cache on Cookie
- Enter value:
test_cookie
How to migrate:
- Create a cache rule to bypass cache for requests containing cookie
test_cookiefor any hostname containingexample.com: - When incoming requests match: Custom filter expression
- Using the Expression Builder:
Hostname contains "example.com" AND Cookie contains "test-cookie" - Using the Expression Editor:
(http.host contains "example.com" and http.cookie contains "test-cookie")
- Using the Expression Builder:
- Then:
- Cache eligibility: Bypass cache
Caution
The default behavior of Cache Rules is different from Page Rules. Refer to Key differences for more information. 2. Turn off your existing Page Rule and validate the behavior of the cache rule you created. 3. If your tests succeed, delete the existing Page Rule.
| Page Rules configuration | Migrate to a cache rule |
|---|---|
![]() |
![]() |
Migrate Cache By Device Type
Context:
You configured a Page Rule turning on Cache By Device Type for all subdomains of example.com and the example.com domain itself:
- URL:
*example.com/* - Setting: Cache By Device Type
- Value: On
How to migrate:
- Create a cache rule to cache content based on user agent or device type for any hostname containing
example.com: - When incoming requests match: Custom filter expression
- Using the Expression Builder:
Hostname contains "example.com" - Using the Expression Editor:
(http.host contains "example.com")
- Using the Expression Builder:
- Then:
- Cache eligibility: Eligible for cache
- Setting: Cache key
- Cache by device type: On
Caution
The default behavior of Cache Rules is different from Page Rules. Refer to Key differences for more information. 2. Turn off your existing Page Rule and validate the behavior of the cache rule you created. 3. If your tests succeed, delete the existing Page Rule.
| Page Rules configuration | Migrate to a cache rule |
|---|---|
![]() |
![]() |
Migrate Cache Deception Armor
Context:
You configured a Page Rule turning on Cache Deception Armor for all subdomains of example.com and the example.com domain itself:
- URL:
*example.com/* - Setting: Cache Deception Armor
How to migrate:
- Create a cache rule to protect against cache deception attacks for any hostname containing
example.com: - When incoming requests match: Custom filter expression
- Using the Expression Builder:
Hostname contains "example.com" - Using the Expression Editor:
(http.host contains "example.com")
- Using the Expression Builder:
- Then:
- Cache eligibility: Eligible for cache
- Setting: Cache key
- Cache deception armor: On
Caution
The default behavior of Cache Rules is different from Page Rules. Refer to Key differences for more information. 2. Turn off your existing Page Rule and validate the behavior of the cache rule you created. 3. If your tests succeed, delete the existing Page Rule.
| Page Rules configuration | Migrate to a cache rule |
|---|---|
![]() |
![]() |
Migrate Cache Level (Cache Everything)
Context:
You configured a Page Rule turning on caching of all assets for all subdomains of example.com and the example.com domain itself:
- URL:
*example.com/* - Setting: Cache Level
- Select Cache Level: Cache Everything
How to migrate:
- Create a cache rule to adjust cache level for any hostname containing
example.com: - When incoming requests match: Custom filter expression
- Using the Expression Builder:
Hostname contains "example.com" - Using the Expression Editor:
(http.host contains "example.com")
- Using the Expression Builder:
- Then:
- Cache eligibility: Eligible for cache
Caution
The default behavior of Cache Rules is different from Page Rules. Refer to Key differences for more information. 2. Turn off your existing Page Rule and validate the behavior of the cache rule you created. 3. If your tests succeed, delete the existing Page Rule.
| Page Rules configuration | Migrate to a cache rule |
|---|---|
![]() |
![]() |
Migrate Cache on Cookie
Context:
You configured a Page Rule turning on caching for responses that contained cookie test-cookie for all subdomains of example.com and the example.com domain itself:
- URL:
*example.com/* - Setting: Cache on Cookie
- Enter value:
test-cookie
How to migrate:
- Create a cache rule to cache responses containing cookie
test_cookiefor any hostname containingexample.com: - When incoming requests match: Custom filter expression
- Using the Expression Builder:
Hostname contains "example.com" AND Cookie contains "test-cookie" - Using the Expression Editor:
(http.host contains "example.com" and http.cookie contains "test-cookie")
- Using the Expression Builder:
- Then:
- Cache eligibility: Eligible for cache
Caution
The default behavior of Cache Rules is different from Page Rules. Refer to Key differences for more information. 2. Turn off your existing Page Rule and validate the behavior of the cache rule you created. 3. If your tests succeed, delete the existing Page Rule.
| Page Rules configuration | Migrate to a cache rule |
|---|---|
![]() |
![]() |
Migrate Cache TTL by status code
Context:
You configured a Page Rule turning on caching of every response with status code between 200 and 599 for one day, for all subdomains of example.com and the example.com domain itself:
- URL:
*example.com/* - Setting: Cache TTL by status code
- Status code or enter range:
200-599 - Select option: a day
How to migrate:
- Create a cache rule to cache responses with status code between
200and599for one day for any hostname containingexample.com: - When incoming requests match: Custom filter expression
- Using the Expression Builder:
Hostname contains "example.com" - Using the Expression Editor:
(http.host contains "example.com") - Then:
- Cache eligibility: Eligible for cache
- Setting: Edge TTL
- Use cache-control header if present, use default Cloudflare caching behavior if not
- Status code TTL:
- Scope: Range
- From: 200
- To: 599
- Duration: 1 day
- Using the Expression Builder:
Caution
The default behavior of Cache Rules is different from Page Rules. Refer to Key differences for more information. 2. Turn off your existing Page Rule and validate the behavior of the cache rule you created. 3. If your tests succeed, delete the existing Page Rule.
| Page Rules configuration | Migrate to a cache rule |
|---|---|
![]() |
![]() |
Migrate Custom Cache Key
Context:
You configured a Page Rule setting a custom cache key for all query string parameters, for all subdomains of example.com and the example.com domain itself:
- URL:
*example.com/* - Setting: Custom Cache Key
- Query String: All query string parameters
How to migrate:
- Create a cache rule to set a custom cache key for all query string parameters, for any hostname containing
example.com: - When incoming requests match: Custom filter expression
- Using the Expression Builder:
Hostname contains "example.com" - Using the Expression Editor:
(http.host contains "example.com")
- Using the Expression Builder:
- Then:
- Cache eligibility: Eligible for cache
- Setting: Cache key
- Query string: All query string parameters
Caution
The default behavior of Cache Rules is different from Page Rules. Refer to Key differences for more information. 2. Turn off your existing Page Rule and validate the behavior of the cache rule you created. 3. If your tests succeed, delete the existing Page Rule.
| Page Rules configuration | Migrate to a cache rule |
|---|---|
![]() |
![]() |
Migrate Disable Apps
Context:
You configured a Page Rule turning off Cloudflare Apps (deprecated) for all subdomains of example.com and the example.com domain itself:
- URL:
*example.com/* - Setting: Disable Apps
How to migrate:
- Create a configuration rule to disable Cloudflare Apps (deprecated) for any hostname containing
example.com: - When incoming requests match: Custom filter expression
- Using the Expression Builder:
Hostname contains "example.com" - Using the Expression Editor:
(http.host contains "example.com")
- Using the Expression Builder:
- Then the settings are:
- Setting: Disable Apps
- Turn off your existing Page Rule and validate the behavior of the configuration rule you created.
- If your tests succeed, delete the existing Page Rule.
| Page Rules configuration | Migrate to a configuration rule |
|---|---|
![]() |
![]() |
Replace Disable Performance
Caution
The Disable Performance setting is deprecated. Any Page Rules with this setting will not be migrated.
This Page Rules setting turned off Polish and Rocket Loader. You can still turn on or off relevant Cloudflare features one by one using Configuration Rules.
Context:
You configured a Page Rule with Disable Performance (deprecated) for all subdomains of example.com and the example.com domain itself:
- URL:
*example.com/* - Setting: Disable Performance
How to replace:
- Create a configuration rule to disable Polish and Rocket Loader for any hostname containing
example.com: - When incoming requests match: Custom filter expression
- Using the Expression Builder:
Hostname contains "example.com" - Using the Expression Editor:
(http.host contains "example.com")
- Using the Expression Builder:
- Then the settings are:
- Polish: Off
- Rocket Loader: Off
- Turn off your existing Page Rule and validate the behavior of the configuration rule you created.
- If your tests succeed, delete the existing Page Rule.
| Page Rules configuration | Migrate to a configuration rule |
|---|---|
![]() |
![]() |
Replace Disable Security
Caution
The Disable Security setting is deprecated. Any Page Rules with this setting will not be migrated.
This Page Rules setting turns off Email Obfuscation, Rate Limiting (previous version), Scrape Shield, URL (Zone) Lockdown, and WAF managed rules (previous version). You can still turn on or off relevant Cloudflare features one by one using Configuration Rules and WAF custom rules.
Context:
You configured a Page Rule with Disable Security (deprecated) for all subdomains of example.com and the example.com domain itself:
- URL:
*example.com/* - Setting: Disable Security
This setting turned off a subset of Cloudflare security features: Email Obfuscation, Rate Limiting (previous version), Scrape Shield, URL (Zone) Lockdown, and WAF managed rules (previous version).

