Cloudflare Docs
Workers
Visit Workers on GitHub
Set theme to dark (⇧+D)

Page Rules

Page Rules trigger certain actions whenever a request matches one of the URL patterns you define. You can define a page rule to trigger one or more actions whenever a certain URL pattern is matched. Refer to the Page Rules Support article to learn more about configuring Page Rules.

​​ Page Rules with Workers

Cloudflare acts as a reverse proxy to provide services, like Page Rules, to Internet properties. Your application’s traffic will pass through a Cloudflare data center that is closest to the visitor. There are hundreds of these around the world, each of which are capable of running services like Workers and Page Rules. If your application is built on Workers and/or Pages, the Cloudflare global network acts as your origin server and responds to requests directly from the Cloudflare global network.

When using Page Rules with Workers, the following workflow is applied.

  1. Request arrives at Cloudflare data center.
  2. Cloudflare decides if this request is a Worker route. Because this is a Worker route, Cloudflare evaluates and disabled a number of features, including some that would be set by Page Rules.
  3. Page Rules run as part of normal request processing with some features now disabled.
  4. Worker executes.
  5. Worker makes a same-zone or other-zone subrequest. Because this is a Worker route, Cloudflare disables a number of features, including some that would be set by Page Rules.

Page Rules are evaluated both at the client-to-Worker request stage (step 2) and the Worker subrequest stage (step 5).

If you are experiencing Page Rule errors when running Workers, contact your Cloudflare account team or Cloudflare Support.

​​ Affected Page Rules

The following Page Rules may not work as expected when an incoming request is matched to a Worker route:

This is because the default setting of these Page Rules will be disabled when Cloudflare recognizes that the request is headed to a Worker.

To learn what these Page Rules do, refer to Understanding and configuring Cloudflare Page Rules.

​​ Always Use HTTPS

Page RuleSourceTargetBehavior
Always Use HTTPSClientWorkerRule Respected
Always Use HTTPSWorkerSame ZoneRule Ignored
Always Use HTTPSWorkerOther ZoneRule Ignored

​​ Auto Minify

Page RuleSourceTargetBehavior
Always Use HTTPSClientWorkerRule Ignored
Always Use HTTPSWorkerSame ZoneRule Respected
Always Use HTTPSWorkerOther ZoneRule Ignored

​​ Automatic HTTPS Rewrites

Page RuleSourceTargetBehavior
Automatic HTTPS RewritesClientWorkerRule Ignored
Automatic HTTPS RewritesWorkerSame ZoneRule Respected
Automatic HTTPS RewritesWorkerOther ZoneRule Ignored

​​ Browser Cache TTL

Page RuleSourceTargetBehavior
Browser Cache TTLClientWorkerRule Ignored
Browser Cache TTLWorkerSame ZoneRule Respected
Browser Cache TTLWorkerOther ZoneRule Ignored

​​ Browser Integrity Check

Page RuleSourceTargetBehavior
Browser Integrity CheckClientWorkerRule Respected
Browser Integrity CheckWorkerSame ZoneRule Ignored
Browser Integrity CheckWorkerOther ZoneRule Ignored

​​ Cache Deception Armor

Page RuleSourceTargetBehavior
Cache Deception ArmorClientWorkerRule Respected
Cache Deception ArmorWorkerSame ZoneRule Respected
Cache Deception ArmorWorkerOther ZoneRule Ignored

​​ Cache Level

Page RuleSourceTargetBehavior
Cache LevelClientWorkerRule Respected
Cache LevelWorkerSame ZoneRule Respected
Cache LevelWorkerOther ZoneRule Ignored

​​ Disable Zaraz

Page RuleSourceTargetBehavior
Disable ZarazClientWorkerRule Respected
Disable ZarazWorkerSame ZoneRule Respected
Disable ZarazWorkerOther ZoneRule Ignored

​​ Edge Cache TTL

Page RuleSourceTargetBehavior
Edge Cache TTLClientWorkerRule Respected
Edge Cache TTLWorkerSame ZoneRule Respected
Edge Cache TTLWorkerOther ZoneRule Ignored

​​ Email Obfuscation

Page RuleSourceTargetBehavior
Email ObfuscationClientWorkerRule Ignored
Email ObfuscationWorkerSame ZoneRule Respected
Email ObfuscationWorkerOther ZoneRule Ignored

​​ Forwarding URL

Page RuleSourceTargetBehavior
Forwarding URLClientWorkerRule Ignored
Forwarding URLWorkerSame ZoneRule Respected
Forwarding URLWorkerOther ZoneRule Ignored

​​ IP Geolocation Header

Page RuleSourceTargetBehavior
IP Geolocation HeaderClientWorkerRule Respected
IP Geolocation HeaderWorkerSame ZoneRule Respected
IP Geolocation HeaderWorkerOther ZoneRule Ignored

​​ Origin Cache Control

Page RuleSourceTargetBehavior
Origin Cache ControlClientWorkerRule Respected
Origin Cache ControlWorkerSame ZoneRule Respected
Origin Cache ControlWorkerOther ZoneRule Ignored

​​ Rocket Loader

Page RuleSourceTargetBehavior
Rocket LoaderClientWorkerRule Ignored
Rocket LoaderWorkerSame ZoneRule Ignored
Rocket LoaderWorkerOther ZoneRule Ignored

​​ Security Level

Page RuleSourceTargetBehavior
Security LevelClientWorkerRule Respected
Security LevelWorkerSame ZoneRule Ignored
Security LevelWorkerOther ZoneRule Ignored

​​ Server Side Excludes

Page RuleSourceTargetBehavior
Server Side ExcludesClientWorkerRule Ignored
Server Side ExcludesWorkerSame ZoneRule Ignored
Server Side ExcludesWorkerOther ZoneRule Ignored

​​ SSL

Page RuleSourceTargetBehavior
SSLClientWorkerRule Respected
SSLWorkerSame ZoneRule Respected
SSLWorkerOther ZoneRule Ignored