Cloudflare Docs
Workers
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 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 Rule Source Target Behavior
Always Use HTTPS Client Worker Rule Respected
Always Use HTTPS Worker Same Zone Rule Ignored
Always Use HTTPS Worker Other Zone Rule Ignored

​​ Auto Minify

Page Rule Source Target Behavior
Auto Minify Client Worker Rule Ignored
Auto Minify Worker Same Zone Rule Respected
Auto Minify Worker Other Zone Rule Ignored

​​ Automatic HTTPS Rewrites

Page Rule Source Target Behavior
Automatic HTTPS Rewrites Client Worker Rule Ignored
Automatic HTTPS Rewrites Worker Same Zone Rule Respected
Automatic HTTPS Rewrites Worker Other Zone Rule Ignored

​​ Browser Cache TTL

Page Rule Source Target Behavior
Browser Cache TTL Client Worker Rule Ignored
Browser Cache TTL Worker Same Zone Rule Respected
Browser Cache TTL Worker Other Zone Rule Ignored

​​ Browser Integrity Check

Page Rule Source Target Behavior
Browser Integrity Check Client Worker Rule Respected
Browser Integrity Check Worker Same Zone Rule Ignored
Browser Integrity Check Worker Other Zone Rule Ignored

​​ Cache Deception Armor

Page Rule Source Target Behavior
Cache Deception Armor Client Worker Rule Respected
Cache Deception Armor Worker Same Zone Rule Respected
Cache Deception Armor Worker Other Zone Rule Ignored

​​ Cache Level

Page Rule Source Target Behavior
Cache Level Client Worker Rule Respected
Cache Level Worker Same Zone Rule Respected
Cache Level Worker Other Zone Rule Ignored

​​ Disable Zaraz

Page Rule Source Target Behavior
Disable Zaraz Client Worker Rule Respected
Disable Zaraz Worker Same Zone Rule Respected
Disable Zaraz Worker Other Zone Rule Ignored

​​ Edge Cache TTL

Page Rule Source Target Behavior
Edge Cache TTL Client Worker Rule Respected
Edge Cache TTL Worker Same Zone Rule Respected
Edge Cache TTL Worker Other Zone Rule Ignored

​​ Email Obfuscation

Page Rule Source Target Behavior
Email Obfuscation Client Worker Rule Ignored
Email Obfuscation Worker Same Zone Rule Respected
Email Obfuscation Worker Other Zone Rule Ignored

​​ Forwarding URL

Page Rule Source Target Behavior
Forwarding URL Client Worker Rule Ignored
Forwarding URL Worker Same Zone Rule Respected
Forwarding URL Worker Other Zone Rule Ignored

​​ IP Geolocation Header

Page Rule Source Target Behavior
IP Geolocation Header Client Worker Rule Respected
IP Geolocation Header Worker Same Zone Rule Respected
IP Geolocation Header Worker Other Zone Rule Ignored

​​ Origin Cache Control

Page Rule Source Target Behavior
Origin Cache Control Client Worker Rule Respected
Origin Cache Control Worker Same Zone Rule Respected
Origin Cache Control Worker Other Zone Rule Ignored

​​ Rocket Loader

Page Rule Source Target Behavior
Rocket Loader Client Worker Rule Ignored
Rocket Loader Worker Same Zone Rule Ignored
Rocket Loader Worker Other Zone Rule Ignored

​​ Security Level

Page Rule Source Target Behavior
Security Level Client Worker Rule Respected
Security Level Worker Same Zone Rule Ignored
Security Level Worker Other Zone Rule Ignored

​​ Server Side Excludes

Page Rule Source Target Behavior
Server Side Excludes Client Worker Rule Ignored
Server Side Excludes Worker Same Zone Rule Ignored
Server Side Excludes Worker Other Zone Rule Ignored

​​ SSL

Page Rule Source Target Behavior
SSL Client Worker Rule Respected
SSL Worker Same Zone Rule Respected
SSL Worker Other Zone Rule Ignored