Create a page rule
Creates a new Page Rule for a zone.The zone identifier
The set of actions to perform if the targets of this rule match the request. Actions can redirect to another URL or override settings, but not both.
The rule targets to evaluate on each request.
Set to
url for URL-based targetingThe priority of the rule. A higher number indicates higher priority. Used when multiple Page Rules could match the same URL.
The status of the Page Rule:
active or disabledAvailable actions
Page Rules support numerous actions to customize behavior: Cache settings:browser_cache_ttl- Set browser cache TTLcache_level- Set cache level (bypass, basic, simplified, aggressive, cache_everything)edge_cache_ttl- Set edge cache TTLcache_by_device_type- Cache based on device typecache_deception_armor- Protect from cache deception attackscache_key_fields- Control cache key variablescache_on_cookie- Cache based on cookie matchcache_ttl_by_status- Set TTL by response status codebypass_cache_on_cookie- Bypass cache if cookie matchesexplicit_cache_control- Origin cache control
browser_check- Enable browser integrity checkemail_obfuscation- Obfuscate email addressesip_geolocation- Add IP geolocation headerssecurity_level- Set security levelwaf- Enable/disable WAFdisable_security- Turn off security features
automatic_https_rewrites- Rewrite HTTP to HTTPSmirage- Enable Mirage image optimizationpolish- Enable Polish image compressionrocket_loader- Enable Rocket Loaderdisable_performance- Turn off performance features
always_use_https- Redirect HTTP to HTTPSssl- Set SSL modeopportunistic_encryption- Enable opportunistic encryption
forwarding_url- Redirect to another URLhost_header_override- Override host headerresolve_override- Override origin address
disable_apps- Turn off Cloudflare Appsdisable_zaraz- Turn off Zarazorigin_error_page_pass_thru- Pass through origin error pagesresponse_buffering- Enable response bufferingrespect_strong_etag- Respect strong ETagssort_query_string_for_cache- Sort query stringstrue_client_ip_header- Add True-Client-IP header
The Page Rule identifier
The configured actions for this rule
The URL targets for this rule
The rule priority
The rule status (active or disabled)
Timestamp when the rule was created
Timestamp when the rule was last modified
Update a page rule
Replaces the configuration of an existing Page Rule. The configuration will exactly match the data provided.The Page Rule identifier
The zone identifier
List page rules
Fetches all Page Rules in a zone.The zone identifier
Filter by status:
active or disabledField to sort by:
status or prioritySort direction:
asc or descMatch mode:
any or all (when using multiple filters)Get a page rule
Fetches details of a single Page Rule.The Page Rule identifier
The zone identifier
Edit a page rule
Updates one or more fields of an existing Page Rule.The Page Rule identifier
The zone identifier
Delete a page rule
Deletes an existing Page Rule.The Page Rule identifier
The zone identifier