Skip to content

Page Rules migration guide

Cloudflare recommends that you consider using modern Rules features for your new implementations instead of Page Rules. Follow the recommendations in this migration guide to learn about the new Rules products and how you can start adopting them today.

Page Rules migration

Cloudflare plans to migrate your existing Page Rules during 2025. You do not need to migrate your own rules, as Cloudflare will handle this process for you. However, it is beneficial to understand the correspondence between the different Page Rules settings and new Rules features ahead of the migration. This will help you familiarize yourself with implementing the new types of rules in your Cloudflare account.

We encourage you to explore and start using the new Rules products to take advantage of their enhanced capabilities and features. This migration guide will be updated in the coming months with additional information about the Page Rules migration. Some instructions may also change as we simplify configuration deployment and release new features as part of this project. Cloudflare users will receive email updates about the migration of the Page Rules configured on their Cloudflare account before the migration occurs. We will not perform any migration or changes on your behalf without prior notification.

Context

Cloudflare Page Rules has several fundamental limitations, such as triggering solely based on URL patterns and being limited to 125 rules per zone for performance reasons. These rules are also complex to debug when multiple page rules apply to the same incoming request.

In 2022, we announced in our blog post The future of Page Rules that Page Rules would be replaced with a suite of dedicated products, each built to be best-of-breed and put more power into the hands of our users. The new Rules products — Configuration Rules, Compression Rules, Origin Rules, Redirects, and Transform Rules — are now generally available (GA) and have already been adopted by tens of thousands of Cloudflare customers.

Improvements in modern Rules features include:

  • New engine: New Rules features are powered by the Ruleset Engine, which offers versatile configuration with a robust language that supports many HTTP request and response fields.
  • Improved scalability: Thanks to the improved scalability, Cloudflare plans now have increased quotas.
  • Easier troubleshooting: Rule execution is more predictable, since each rule operates independently, simplifying troubleshooting. Additionally, Cloudflare Trace helps understand rule interactions.
  • Improved consistency: New Rules features also ensure consistency, with common fields and capabilities shared across products, offering a seamless experience and predictable Terraform configurations.

Important differences

The evaluation and execution order of Rules features is different from Page Rules:

  • Requests handled by Workers will suppress Page Rules actions, but they will not suppress actions from modern Rules features.
  • The first Page Rule to match is applied (also called first match). In contrast, other rules like Cache Rules are stackable. This means that multiple matching rules can be combined and applied to the same request (last match). For example, if multiple cache rules match the same URL, then the features set in those cache rules will all be applied in order. For more information, refer to Order and priority in the Cache documentation and the Origin Rules FAQ.
  • A Page Rule may include multiple configurations for different products that are applied in a sequence selected by the customer. In contrast, modern Rules features are evaluated in a fixed sequence, with a customer being able to define the rule order within a product phase. Refer to the Ruleset Engine documentation for more information.
  • Modern Rules features will take precedence over Page Rules. For example, if you have Page Rules and Cache Rules defining caching settings for the same path, Cache Rules will take precedence.

Behavior change in Cache Rules

There is a behavior change between Page Rules and Cache Rules: when you select Eligible for cache in a cache rule, the Cache Everything feature is now enabled by default.

If you need to keep the exact same behavior you had with Page Rules, you will need to make some additional configurations. For details, refer to Migration from Page Rules in the Cache documentation.

Convert Page Rules URLs to filter expressions

When migrating a Page Rule you will need to write a filter expression equivalent to your Page Rules URL using the Rules language.

Rule filter expressions are built differently from Page Rules URLs. You can use different elements of the Rules language in a filter expression, including fields, functions, and operators.

You will need to adapt your Page Rules URLs when migrating them to modern rules. In the Rules language, use the wildcard and strict wildcard operators (case insensitive and case sensitive operator, respectively) for wildcard matching. Enterprise and Business customers can use regular expressions, but it will also require adapting the original URLs in your Page Rules to regular expressions.

Matching full URIs with wildcards

The Page Rules URL matching does not take into account the URI scheme (for example, https://) and the query string of incoming requests, unless included in the rule URL. However, the http.request.full_uri field used in filter expressions includes the URI scheme and the query string (when the incoming request includes one). When writing a filter expression equivalent to a Page Rule URL, you may want to perform wildcard matching on the full URI. To check for a match regardless of the URI scheme and query string, you can add a * wildcard at the beginning and at the end of the literal string with wildcards.

For example, if you were using the Page Rules URL example.com/*/downloads/*.txt, in modern Rules features you could use an expression such as http.request.full_uri wildcard *example.com/*/downloads/*.txt* to make sure it matches any scheme and any query string.

Alternatively, you could match on individual hostname and URI path fields instead of the full URI field. For example, http.host eq "example.com" and http.request.uri.path wildcard "/*/downloads/*.txt". This was the conversion method followed in the table with example conversions from Page Rules URLs to filter expressions.

Example conversions from Page Rules URLs to filter expressions

The following table lists the most common Page Rule URLs and their equivalent filters:

Target and components
Page Rule URL example
Filter expression using Rules language
Index page of root domain only
(Domain + Path)
example.com/http.host eq "example.com" and http.request.uri.path eq "/"
Everything on a specific domain
(Domain)
example.com/*http.host eq "example.com"
All subdomains and URLs on a specific domain
(Domain)
*example.com/*http.host contains "example.com"
Only subdomains and their URLs
(Domain)
*.example.com/*http.host contains ".example.com"
Specific file on subdomains of a specific domain
(Domain + Path)
*.example.com/*wp-login.phpends_with(http.host, ".example.com") and ends_with(http.request.uri.path, "wp-login.php")
Specific file extension in a directory or its subdirectories of a domain
(Domain + Path)
example.com/archives/*.ziphttp.host eq "example.com" and starts_with(http.request.uri.path, "/archives/") and http.request.uri.path.extension eq "zip"
Specific file extension in any subdirectory of a domain
(Domain + Path)
example.com/*/downloads/*.txthttp.host eq "example.com" and not starts_with(http.request.uri.path, "/downloads/") and http.request.uri.path contains "/downloads/" and http.request.uri.path.extension eq "txt"
Specific directory and all its contents on all subdomains of a specific subdomain
(Domain + Path)
*cdn.example.com/file/*http.request.full_uri contains "cdn.example.com/file/"
Specific URL on all domains
(Path)
*/images
(required Cloudflare for SaaS)
http.request.uri.path eq "/images"
Specific directory and its subdirectories on all domains
(Path)
*/images/*
(required Cloudflare for SaaS)
starts_with(http.request.uri.path, "/images/")
Specific file in any directory
(Path)
*/wp-login.php
(required Cloudflare for SaaS)
ends_with(http.request.uri.path, "/wp-login.php")
Specific query string on all domains
(Path)
*/*?country=GB
(required Cloudflare for SaaS)
http.request.uri.query eq "country=GB"
Part of a query string on all domains
(Path)
*/*?*country=GB*
(required Cloudflare for SaaS)
http.request.uri.query contains "country=GB"

Feature correspondence table

The following table summarizes how different Page Rules settings will be migrated to other Rules features. You can refer to this table and the next sections to learn more about the new way of implementing a given Page Rules setting, and also to learn how you can manually migrate your existing Page Rules.

Page Rules settingNew implementation uses…Migration/Replacement instructions
Always Use HTTPSRedirect Rules (Single Redirects)Migrate Always Use HTTPS
Browser Cache TTLCache RulesMigrate Browser Cache TTL
Browser Integrity CheckConfiguration RulesMigrate Browser Integrity Check
Bypass Cache on CookieCache RulesMigrate Bypass Cache on Cookie
Cache By Device TypeCache RulesMigrate Cache By Device Type
Cache Deception ArmorCache RulesMigrate Cache Deception Armor
Cache LevelCache RulesMigrate Cache Level
Cache on CookieCache RulesMigrate Cache on Cookie
Cache TTL by status codeCache RulesMigrate Cache TTL by status code
Custom Cache KeyCache RulesMigrate Custom Cache Key
Disable AppsConfiguration RulesMigrate Disable Apps
Disable PerformanceN/A (deprecated)Replace Disable Performance
Disable RailgunN/A (deprecated)N/A
Disable SecurityN/A (deprecated)Replace Disable Security
Disable ZarazConfiguration RulesMigrate Disable Zaraz
Edge Cache TTLCache RulesMigrate Edge Cache TTL
Email ObfuscationConfiguration RulesMigrate Email Obfuscation
Forwarding URLRedirect Rules (Single Redirects)Migrate Forwarding URL
Host Header OverrideOrigin RulesMigrate Host Header Override
IP Geolocation HeaderTransform Rules (Managed Transforms)Migrate IP Geolocation Header
MirageConfiguration RulesMigrate Mirage
Opportunistic EncryptionConfiguration RulesMigrate Opportunistic Encryption
Origin Cache ControlCache RulesMigrate Origin Cache Control
Origin Error Page Pass-thruCache RulesMigrate Origin Error Page Pass-thru
PolishConfiguration RulesMigrate Polish
Query String SortCache RulesMigrate Query String Sort
Resolve OverrideOrigin RulesMigrate Resolve Override
Respect Strong ETagsCache RulesMigrate Respect Strong ETags
Response BufferingN/A (deprecated)N/A
Rocket LoaderConfiguration RulesMigrate Rocket Loader
Security LevelConfiguration RulesMigrate Security Level
True Client IP HeaderTransform Rules (Managed Transforms)Migrate True Client IP Header
SSLConfiguration RulesMigrate SSL
Web Application FirewallN/A (deprecated)N/A

Migrate Always Use HTTPS

Context:

You configured a Page Rule to perform an automatic redirect from HTTP to HTTPS for all subdomains of example.com and the example.com domain itself:

  • URL *example.com/*
  • Setting: Always Use HTTPS

How to migrate:

  1. Create a single redirect to always redirect HTTP requests to HTTPS for any hostname that contains example.com:

    • When incoming requests match: Custom filter expression

      • Using the Expression Builder:
        Hostname contains "example.com" AND SSL/HTTPS is off
      • Using the Expression Editor:
        (http.host contains "example.com" and not ssl)
    • Then:

      • Type: Dynamic
      • Expression: concat("https://", http.host, http.request.uri.path)
      • Status code: 301
  2. Turn off your existing Page Rule and validate the behavior of the redirect you created.

  3. If your tests succeed, delete the existing Page Rule.

Migrate Automatic HTTPS Rewrites

Context:

You configured a Page Rule turning on Automatic HTTPS Rewrites for all subdomains of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Automatic HTTPS Rewrites
  • Value: On

How to migrate:

  1. Create a configuration rule to always rewrite HTTP links to HTTPS 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")
    • Then the settings are:

      • Setting: Automatic HTTPS Rewrites
      • Value: On
  2. Turn off your existing Page Rule and validate the behavior of the configuration rule you created.

  3. If your tests succeed, delete the existing Page Rule.

Migrate Browser Cache TTL

Context:

You configured a Page Rule adjusting browser cache TTL to one day for all subdomains of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Browser Cache TTL
  • Enter Browser Cache TTL: a day

How to migrate:

  1. Create a cache rule to adjust browser cache TTL for caching resources in the browser to one day 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")
    • Then:

      • Cache eligibility: Eligible for cache
      • Browser TTL: Override origin and use this TTL
      • Input time-to-live (TTL): 1 day
  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.

Migrate Browser Integrity Check

Context:

You configured a Page Rule turning on Browser Integrity Check for all subdomains of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Browser Integrity Check
  • Value: On

How to migrate:

  1. Create a configuration rule to turn on Browser Integrity Check for protecting against bots and threats 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")
    • Then the settings are:

      • Setting: Browser Integrity Check
      • Value: On
  2. Turn off your existing Page Rule and validate the behavior of the configuration rule you created.

  3. If your tests succeed, delete the existing Page Rule.

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:

  1. Create a cache rule to bypass cache for requests containing cookie test_cookie for any hostname containing example.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")
    • Then:

      • Cache eligibility: Bypass cache
  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.

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:

  1. 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")
    • Then:

      • Cache eligibility: Eligible for cache
      • Setting: Cache key
        • Cache by device type: On
  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.

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:

  1. 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")
    • Then:

      • Cache eligibility: Eligible for cache
      • Setting: Cache key
        • Cache deception armor: On
  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.

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:

  1. 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")
    • Then:

      • Cache eligibility: Eligible for cache
  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.

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:

  1. Create a cache rule to cache responses containing cookie test_cookie for any hostname containing example.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")
    • Then:

      • Cache eligibility: Eligible for cache
  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.

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:

  1. Create a cache rule to cache responses with status code between 200 and 599 for one day 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")
    • 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
  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.

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:

  1. 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")
    • Then:

      • Cache eligibility: Eligible for cache
      • Setting: Cache key
        • Query string: All query string parameters
  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.

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:

  1. 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")
    • Then the settings are:

      • Setting: Disable Apps
  2. Turn off your existing Page Rule and validate the behavior of the configuration rule you created.

  3. If your tests succeed, delete the existing Page Rule.

Replace Disable Performance

This Page Rules setting turned off Mirage, 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:

  1. Create a configuration rule to disable Mirage, 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")
    • Then the settings are:

      • Mirage: Off
      • Polish: Off
      • Rocket Loader: Off
  2. Turn off your existing Page Rule and validate the behavior of the configuration rule you created.

  3. If your tests succeed, delete the existing Page Rule.

Replace Disable Security

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).

How to replace:

  1. Create a configuration rule to turn off one or more security features:

  2. If required, create a WAF exception to skip one or more rules of WAF managed rulesets for requests coming from IP addresses in an allowlist.

  3. Turn off your existing Page Rule and validate the behavior of the rules you created.

  4. If your tests succeed, delete the existing Page Rule.

Migrate Disable Zaraz

Context:

You configured a Page Rule turning off Zaraz for all subdomains of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Disable Zaraz

How to migrate:

  1. Create a configuration rule to turn off Zaraz 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")
    • Then the settings are:

      • Setting: Disable Zaraz
  2. Turn off your existing Page Rule and validate the behavior of the configuration rule you created.

  3. If your tests succeed, delete the existing Page Rule.

Migrate Edge Cache TTL

Context:

You configured a Page Rule adjusting Edge Cache TTL for all subdomains of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Edge Cache TTL
  • Enter Edge Cache TTL: a day

How to migrate:

  1. Create a cache rule to adjust edge cache TTL for caching resources on Cloudflare edge to one day, 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")
    • Then:

      • Cache eligibility: Eligible for cache
      • Setting: Edge TTL
        • Ignore cache-control header and use this TTL
        • Input time-to-live (TTL): 1 day
  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.

Migrate Email Obfuscation

Context:

You configured a Page Rule turning off Email Obfuscation for all subdomains of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Email Obfuscation
  • Value: Off

How to migrate:

  1. Create a configuration rule to turn off Email Obfuscation 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")
    • Then the settings are:

      • Setting: Email Obfuscation
        • Value: Off
  2. Turn off your existing Page Rule and validate the behavior of the configuration rule you created.

  3. If your tests succeed, delete the existing Page Rule.

Migrate Forwarding URL

Example #1: Redirect www to root domain

Context:

You configured a Page Rule permanently redirecting www.example.com to example.com on all URI paths:

  • URL: www.example.com/*
  • Setting: Forwarding URL
  • Select Status code: 301 - Permanent Redirect
  • Destination URL: https://example.com/$1

How to migrate:

  1. Create a single redirect to permanently redirect requests from www.example.com to example.com:

    • When incoming requests match: Custom filter expression

      • Using the Expression Builder:
        Hostname equals "www.example.com"
      • Using the Expression Editor:
        (http.host eq "www.example.com")
    • Then:

      • Type: Dynamic
      • Expression: concat("https://example.com", http.request.uri.path)
      • Status code: 301
  2. Turn off your existing Page Rule and validate the behavior of the redirect you created.

  3. If your tests succeed, delete the existing Page Rule.

Example #2: Redirect all pages under old path to new path

Context:

You configured a Page Rule permanently redirecting example.com/old-path to example.com/new-path:

  • URL: example.com/old-path/*
  • Setting: Forwarding URL
  • Select Status code: 301 - Permanent Redirect
  • Destination URL: https://example.com/new-path/$1

How to migrate:

  1. Create a single redirect to permanently redirect requests for example.com/old-path to example.com/new-path:

    • When incoming requests match: Custom filter expression

      • Using the Expression Builder:
        Hostname equals "example.com" AND URI Path starts with "/old-path/"
      • Using the Expression Editor:
        (http.host eq "example.com" and starts_with(http.request.uri.path, "/old-path/"))
    • Then:

      • Type: Dynamic
      • Expression: concat("/new-path/", substring(http.request.uri.path, 10))
        (where 10 (start byte value) is the length of /old-path/)
      • Status code: 301
  2. Turn off your existing Page Rule and validate the behavior of the redirect you created.

  3. If your tests succeed, delete the existing Page Rule.

Migrate Host Header Override

Context:

You configured a Page Rule changing the Host HTTP header to example.saas-provider.com, for all requests addressed at any subdomain of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Host Header Override
  • Enter value: example.saas-provider.com

How to migrate:

  1. Create an origin rule changing the Host header to example.saas-provider.com 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")
    • Then:

      • Set origin parameters:
        • Host Header > Rewrite to: example.saas-provider.com
  2. Turn off your existing Page Rule and validate the behavior of the origin rule you created.

  3. If your tests succeed, delete the existing Page Rule.

Migrate IP Geolocation Header

Context:

You configured a Page Rule adding a CF-IPCountry HTTP header, for all requests addressed at any subdomain of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: IP Geolocation Header
  • Value: On

How to migrate:

  1. Turn on the Add visitor location headers Managed Transform — a Transform Rules feature — to add the CF-IPCountry and other location headers to all requests.
  2. Turn off your existing Page Rule and validate the behavior of the Managed Transform.
  3. If your tests succeed, delete the existing Page Rule.

Migrate Mirage

Context:

You configured a Page Rule turning off Mirage for all subdomains of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Mirage
  • Value: Off

How to migrate:

  1. Create a configuration rule to turn off Mirage 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")
    • Then the settings are:

      • Setting: Mirage
        • Value: Off
  2. Turn off your existing Page Rule and validate the behavior of the configuration rule you created.

  3. If your tests succeed, delete the existing Page Rule.

Migrate Opportunistic Encryption

Context:

You configured a Page Rule turning off Opportunistic Encryption for all subdomains of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Opportunistic Encryption
  • Value: Off

How to migrate:

  1. Create a configuration rule to turn off Opportunistic Encryption 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")
    • Then the settings are:

      • Setting: Opportunistic Encryption
        • Value: Off
  2. Turn off your existing Page Rule and validate the behavior of the configuration rule you created.

  3. If your tests succeed, delete the existing Page Rule.

Migrate Origin Cache Control

Context:

You configured a Page Rule turning off Origin Cache Control for all subdomains of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Origin Cache Control
  • Value: Off

How to migrate:

  1. Create a cache rule to determine edge cache behavior 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")
    • Then:

      • Cache eligibility: Eligible for cache
      • Setting: Origin Cache Control
        • Enable Origin Cache Control: Off
  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.

Migrate Origin Error Page Pass-thru

Context:

You configured a Page Rule turning on Origin Error Page Pass-thru for all subdomains of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Origin Error Page Pass-thru
  • Value: On

How to migrate:

  1. Create a cache rule to determine edge cache behavior 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")
    • Then:

      • Cache eligibility: Eligible for cache
      • Setting: Origin error page pass-thru
        • Use Origin error page pass-thru: On
  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.

Migrate Polish

Context:

You configured a Page Rule turning off Polish for all subdomains of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Polish
  • Value: Off

How to migrate:

  1. Create a configuration rule to turn off Polish 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")
    • Then the settings are:

      • Setting: Polish
        • Select value: Off
  2. Turn off your existing Page Rule and validate the behavior of the configuration rule you created.

  3. If your tests succeed, delete the existing Page Rule.

Migrate Query String Sort

Context:

You configured a Page Rule turning on Query String Sort for all subdomains of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Query String Sort
  • Value: On

How to migrate:

  1. Create a cache rule to sort query string parameters for caching purposes, 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")
    • Then:

      • Cache eligibility: Eligible for cache
      • Setting: Cache key
        • Sort query string: On
  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.

Migrate Resolve Override

Context:

You configured a Page Rule changing the origin to example.saas-provider.com, for all requests addressed at any subdomain of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Resolve Override
  • Enter value: example.saas-provider.com

How to migrate:

  1. Create an origin rule overriding the origin to example.saas-provider.com 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")
    • Then:

      • DNS Record > Override to: example.saas-provider.com
  2. Turn off your existing Page Rule and validate the behavior of the origin rule you created.

  3. If your tests succeed, delete the existing Page Rule.

Migrate Respect Strong ETags

Context:

You configured a Page Rule turning on byte-for-byte equivalency checks for all subdomains of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Respect Strong ETags
  • Value: On

How to migrate:

  1. Create a cache rule to respect strong ETags 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")
    • Then:

      • Cache eligibility: Eligible for cache
      • Setting: Respect strong ETags
        • Use strong ETag headers: On
  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.

Migrate Rocket Loader

Context:

You configured a Page Rule turning off Rocket Loader for all subdomains of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Rocket Loader
  • Value: Off

How to migrate:

  1. Create a configuration rule to turn off 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")
    • Then the settings are:

      • Setting: Rocket Loader
        • Value: Off
  2. Turn off your existing Page Rule and validate the behavior of the configuration rule you created.

  3. If your tests succeed, delete the existing Page Rule.

Migrate Security Level

Context:

You configured a Page Rule setting Security Level to I’m Under Attack for all subdomains of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: Security Level
  • Select Security Level: I’m Under Attack

How to migrate:

  1. Create a configuration rule to set Security Level to I’m Under Attack, 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")
    • Then the settings are:

      • Setting: Security Level
        • Select Security Level: I’m Under Attack
  2. Turn off your existing Page Rule and validate the behavior of the configuration rule you created.

  3. If your tests succeed, delete the existing Page Rule.

Migrate True Client IP Header

Context:

You configured a Page Rule adding a True-Client-IP HTTP header for all requests addressed at any subdomain of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: True Client IP Header
  • Value: On

How to migrate:

  1. Turn on the Add “True-Client-IP” header Managed Transform — a Transform Rules feature — to add the True-Client-IP header to all requests.
  2. Turn off your existing Page Rule and validate the behavior of the Managed Transform.
  3. If your tests succeed, delete the existing Page Rule.

Migrate SSL

Context:

You configured a Page Rule setting SSL to Strict for all subdomains of example.com and the example.com domain itself:

  • URL: *example.com/*
  • Setting: SSL
  • Select SSL/TLS encryption mode: Strict

How to migrate:

  1. Create a configuration rule to set SSL to Strict, 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")
    • Then the settings are:

      • Setting: SSL
        • Select SSL/TLS encryption mode: Strict
  2. Turn off your existing Page Rule and validate the behavior of the configuration rule you created.

  3. If your tests succeed, delete the existing Page Rule.

Settings that will not be migrated

The following Page Rules settings will not be migrated to other types of rules:

  • Disable Performance (this setting is deprecated)
  • Disable Railgun (this setting is deprecated, since Railgun is no longer available)
  • Disable Security (this setting is deprecated)
  • Response Buffering (this setting is deprecated)
  • Web Application Firewall (this setting is deprecated, since the previous version of WAF managed rules is deprecated)

All other Page Rules settings will be migrated during 2025.

More resources

If you have feedback to share, refer to our Community thread.