---
title: Get a Page Rule
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/typescript)

[Page Rules](https://developers.cloudflare.com/api/typescript/resources/page_rules)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Get a Page Rule

client.pageRules.get(stringpageruleID, PageRuleGetParams {zone\_id } params, RequestOptionsoptions?): [PageRule](<https://developers.cloudflare.com/api/typescript/resources/page_rules#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)>) {id, actions, created\_on, 4 more }

GET/zones/{zone\_id}/pagerules/{pagerule\_id}

Fetches the details of a Page Rule.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Trust and Safety Write``Trust and Safety Read``Zero Trust: PII Read``Zaraz Edit``Zaraz Read``Zaraz Admin``Access: Apps and Policies Revoke``Access: Apps and Policies Write``Access: Apps and Policies Read``Access: Apps and Policies Revoke``Access: Mutual TLS Certificates Write``Access: Organizations, Identity Providers, and Groups Write``Zone Settings Write``Zone Settings Read``Zone Read``DNS Read``Workers Scripts Write``Workers Scripts Read``Zone Write``Workers Routes Write``Workers Routes Read``Stream Write``Stream Read``SSL and Certificates Write``SSL and Certificates Read``Logs Write``Logs Read``Cache Purge``Page Rules Write``Page Rules Read``Load Balancers Write``Load Balancers Read``Firewall Services Write``Firewall Services Read``DNS Write``Apps Write``Analytics Read``Access: Apps and Policies Write``Access: Apps and Policies Read`

##### ParametersExpand Collapse

pageruleID: string

Identifier.

maxLength32

[Link to this property](<#(resource)%20page_rules%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20pagerule_id%20%3E%20(schema)>)

<details>

<summary>

params: PageRuleGetParams {zone\_id }

</summary>

zone\_id: string

Identifier.

maxLength32

<a href="#(resource)%20page_rules%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20zone_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20page_rules%20%3E%20(method)%20get%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

PageRule {id, actions, created\_on, 4 more }

</summary>

id: string

Identifier.

maxLength32

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

actions: Array&lt;<a href="https://developers.cloudflare.com/api/typescript/resources/zones#(resource)%20zones.settings%20%3E%20(model)%20always_use_https%20%3E%20(schema)">AlwaysUseHTTPS</a> {id } | <a href="https://developers.cloudflare.com/api/typescript/resources/zones#(resource)%20zones.settings%20%3E%20(model)%20automatic_https_rewrites%20%3E%20(schema)">AutomaticHTTPSRewrites</a> {id, value } | <a href="https://developers.cloudflare.com/api/typescript/resources/zones#(resource)%20zones.settings%20%3E%20(model)%20browser_cache_ttl%20%3E%20(schema)">BrowserCacheTTL</a> {id, value } | 31 more&gt;

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.

</summary>

One of the following:

<details>

<summary>

AlwaysUseHTTPS {id }

</summary>

id?: "always\_use\_https"

If enabled, any <code>http://`` URL is converted to</code> https://\` through a 301 redirect.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20always_use_https%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20always_use_https%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

AutomaticHTTPSRewrites {id, value }

</summary>

id?: "automatic\_https\_rewrites"

Turn on or off Automatic HTTPS Rewrites.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20automatic_https_rewrites%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "on"| "off"

The status of Automatic HTTPS Rewrites.

</summary>

One of the following:

"on"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20automatic_https_rewrites%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"off"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20automatic_https_rewrites%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20automatic_https_rewrites%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20automatic_https_rewrites%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

BrowserCacheTTL {id, value }

</summary>

id?: "browser\_cache\_ttl"

Control how long resources cached by client browsers remain valid.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20browser_cache_ttl%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

value?: number

The number of seconds to cache resources for. Setting this to 0 enables “Respect Existing Headers”.

maximum31536000

minimum0

<a href="#(resource)%20zones.settings%20%3E%20(model)%20browser_cache_ttl%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20browser_cache_ttl%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

BrowserCheck {id, value }

</summary>

id?: "browser\_check"

Inspect the visitor’s browser for headers commonly associated with spammers and certain bots.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20browser_check%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "on"| "off"

The status of Browser Integrity Check.

</summary>

One of the following:

"on"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20browser_check%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"off"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20browser_check%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20browser_check%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20browser_check%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

BypassCacheOnCookie {id, value }

</summary>

id?: "bypass\_cache\_on\_cookie"

Bypass cache and fetch resources from the origin server if a regular expression matches against a cookie name present in the request.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%204%20%3E%20(property)%20id">Link to this property</a>

value?: string

The regular expression to use for matching cookie names in the request. Refer to <a href="https://developers.cloudflare.com/rules/page-rules/reference/additional-reference/#bypass-cache-on-cookie-setting">Bypass Cache on Cookie setting</a> to learn about limited regular expression support.

maxLength150

minLength1

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%204%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%204">Link to this property</a>

<details>

<summary>

CacheByDeviceType {id, value }

</summary>

id?: "cache\_by\_device\_type"

Separate cached content based on the visitor’s device type.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%205%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "on"| "off"

The status of Cache By Device Type.

</summary>

One of the following:

"on"

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%205%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"off"

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%205%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%205%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%205">Link to this property</a>

<details>

<summary>

CacheDeceptionArmor {id, value }

</summary>

id?: "cache\_deception\_armor"

Protect from web cache deception attacks while still allowing static assets to be cached. This setting verifies that the URL’s extension matches the returned <code>Content-Type</code>.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%206%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "on"| "off"

The status of Cache Deception Armor.

</summary>

One of the following:

"on"

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%206%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"off"

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%206%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%206%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%206">Link to this property</a>

<details>

<summary>

CacheKeyFields {id, value }

</summary>

id?: "cache\_key\_fields"

Control specifically what variables to include when deciding which resources to cache. This allows customers to determine what to cache based on something other than just the URL.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: Value {cookie, header, host, 2 more }

</summary>

<details>

<summary>

cookie?: Cookie {check\_presence, include }

Controls which cookies appear in the Cache Key.

</summary>

check\_presence?: Array&lt;string&gt;

A list of cookies to check for the presence of, without including their actual values.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20cookie%20%3E%20(property)%20check_presence">Link to this property</a>

include?: Array&lt;string&gt;

A list of cookies to include.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20cookie%20%3E%20(property)%20include">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20cookie">Link to this property</a>

<details>

<summary>

header?: Header {check\_presence, exclude, include }

Controls which headers go into the Cache Key. Exactly one of <code>include</code> or <code>exclude</code> is expected.

</summary>

check\_presence?: Array&lt;string&gt;

A list of headers to check for the presence of, without including their actual values.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20header%20%3E%20(property)%20check_presence">Link to this property</a>

exclude?: Array&lt;string&gt;

A list of headers to ignore.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20header%20%3E%20(property)%20exclude">Link to this property</a>

include?: Array&lt;string&gt;

A list of headers to include.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20header%20%3E%20(property)%20include">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20header">Link to this property</a>

<details>

<summary>

host?: Host {resolved }

Determines which host header to include in the Cache Key.

</summary>

resolved?: boolean

Whether to include the Host header in the HTTP request sent to the origin.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20host%20%3E%20(property)%20resolved">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20host">Link to this property</a>

<details>

<summary>

query\_string?: QueryString {exclude, include }

Controls which URL query string parameters go into the Cache Key. Exactly one of <code>include</code> or <code>exclude</code> is expected.

</summary>

<details>

<summary>

exclude?: "\*"| Array&lt;string&gt;

Ignore all query string parameters.

</summary>

One of the following:

<details>

<summary>

"\*"

</summary>

"\*"

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20query_string%20%3E%20(property)%20exclude%20%3E%20(variant)%200%20%3E%20(member)%200">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20query_string%20%3E%20(property)%20exclude%20%3E%20(variant)%200">Link to this property</a>

Array&lt;string&gt;

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20query_string%20%3E%20(property)%20exclude%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20query_string%20%3E%20(property)%20exclude">Link to this property</a>

<details>

<summary>

include?: "\*"| Array&lt;string&gt;

Include all query string parameters.

</summary>

One of the following:

<details>

<summary>

"\*"

</summary>

"\*"

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20query_string%20%3E%20(property)%20include%20%3E%20(variant)%200%20%3E%20(member)%200">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20query_string%20%3E%20(property)%20include%20%3E%20(variant)%200">Link to this property</a>

Array&lt;string&gt;

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20query_string%20%3E%20(property)%20include%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20query_string%20%3E%20(property)%20include">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20query_string">Link to this property</a>

<details>

<summary>

user?: User {device\_type, geo, lang }

Feature fields to add features about the end-user (client) into the Cache Key.

</summary>

device\_type?: boolean

Classifies a request as <code>mobile</code>, <code>desktop</code>, or <code>tablet</code> based on the User Agent.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20user%20%3E%20(property)%20device_type">Link to this property</a>

geo?: boolean

Includes the client’s country, derived from the IP address.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20user%20%3E%20(property)%20geo">Link to this property</a>

lang?: boolean

Includes the first language code contained in the <code>Accept-Language</code> header sent by the client.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20user%20%3E%20(property)%20lang">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value%20%3E%20(property)%20user">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%207">Link to this property</a>

<details>

<summary>

CacheLevel {id, value }

</summary>

id?: "cache\_level"

Apply custom caching based on the option selected.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20cache_level%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "bypass"| "basic"| "simplified"| 2 more

- <code>bypass</code>: Cloudflare does not cache.
- <code>basic</code>: Delivers resources from cache when there is no query string.
- <code>simplified</code>: Delivers the same resource to everyone independent of the query string.
- <code>aggressive</code>: Caches all static content that has a query string.
- <code>cache_everything</code>: Treats all content as static and caches all file types beyond the <a href="https://developers.cloudflare.com/cache/concepts/default-cache-behavior/#default-cached-file-extensions">Cloudflare default cached content</a>.

</summary>

One of the following:

"bypass"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20cache_level%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"basic"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20cache_level%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

"simplified"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20cache_level%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%202">Link to this property</a>

"aggressive"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20cache_level%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%203">Link to this property</a>

"cache\_everything"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20cache_level%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20cache_level%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20cache_level%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

CacheOnCookie {id, value }

</summary>

id?: "cache\_on\_cookie"

Apply the Cache Everything option (Cache Level setting) based on a regular expression match against a cookie name.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%209%20%3E%20(property)%20id">Link to this property</a>

value?: string

The regular expression to use for matching cookie names in the request.

maxLength150

minLength1

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%209%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%209">Link to this property</a>

<details>

<summary>

CacheTTLByStatus {id, value }

</summary>

id?: "cache\_ttl\_by\_status"

Enterprise customers can set cache time-to-live (TTL) based on the response status from the origin web server. Cache TTL refers to the duration of a resource in the Cloudflare network before being marked as stale or discarded from cache. Status codes are returned by a resource’s origin. Setting cache TTL based on response status overrides the default cache behavior (standard caching) for static files and overrides cache instructions sent by the origin web server. To cache non-static assets, set a Cache Level of Cache Everything using a Page Rule. Setting no-store Cache-Control or a low TTL (using <code>max-age</code>/<code>s-maxage</code>) increases requests to origin web servers and decreases performance.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2010%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: Record&lt;string, "no-cache"| "no-store"| number&gt;

A JSON object containing status codes and their corresponding TTLs. Each key-value pair in the cache TTL by status cache rule has the following syntax

- <code>status_code</code>: An integer value such as 200 or 500. status\_code matches the exact status code from the origin web server. Valid status codes are between 100-999.
- <code>status_code_range</code>: Integer values for from and to. status\_code\_range matches any status code from the origin web server within the specified range.
- <code>value</code>: An integer value that defines the duration an asset is valid in seconds or one of the following strings: no-store (equivalent to -1), no-cache (equivalent to 0).

</summary>

One of the following:

<details>

<summary>

"no-cache"| "no-store"

</summary>

"no-cache"

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2010%20%3E%20(property)%20value%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(member)%200">Link to this property</a>

"no-store"

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2010%20%3E%20(property)%20value%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2010%20%3E%20(property)%20value%20%3E%20(items)%20%3E%20(variant)%200">Link to this property</a>

number

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2010%20%3E%20(property)%20value%20%3E%20(items)%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2010%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2010">Link to this property</a>

<details>

<summary>

DisableApps {id }

</summary>

id?: "disable\_apps"

Turn off all active <a href="https://developers.cloudflare.com/support/more-dashboard-apps/cloudflare-apps/">Cloudflare Apps</a> (deprecated).

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2011%20%3E%20(property)%20id">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2011">Link to this property</a>

<details>

<summary>

DisablePerformance {id }

</summary>

id?: "disable\_performance"

Turn off <a href="https://developers.cloudflare.com/speed/optimization/content/rocket-loader/">Rocket Loader</a>, and <a href="https://developers.cloudflare.com/images/polish/">Polish</a>.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2012%20%3E%20(property)%20id">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2012">Link to this property</a>

<details>

<summary>

DisableSecurity {id }

</summary>

id?: "disable\_security"

Turn off <a href="https://developers.cloudflare.com/waf/tools/scrape-shield/email-address-obfuscation/">Email Obfuscation</a>, <a href="https://developers.cloudflare.com/waf/reference/legacy/old-rate-limiting/">Rate Limiting (previous version, deprecated)</a>, <a href="https://developers.cloudflare.com/waf/tools/scrape-shield/">Scrape Shield</a>, <a href="https://developers.cloudflare.com/waf/tools/zone-lockdown/">URL (Zone) Lockdown</a>, and <a href="https://developers.cloudflare.com/waf/reference/legacy/old-waf-managed-rules/">WAF managed rules (previous version, deprecated)</a>.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2013%20%3E%20(property)%20id">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2013">Link to this property</a>

<details>

<summary>

DisableZaraz {id }

</summary>

id?: "disable\_zaraz"

Turn off <a href="https://developers.cloudflare.com/zaraz/">Zaraz</a>.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2014%20%3E%20(property)%20id">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2014">Link to this property</a>

<details>

<summary>

EdgeCacheTTL {id, value }

</summary>

id?: "edge\_cache\_ttl"

Specify how long to cache a resource in the Cloudflare global network. *Edge Cache TTL* is not visible in response headers.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2015%20%3E%20(property)%20id">Link to this property</a>

value?: number

maximum31536000

minimum1

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2015%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2015">Link to this property</a>

<details>

<summary>

EmailObfuscation {id, value }

</summary>

id?: "email\_obfuscation"

Turn on or off **Email Obfuscation**.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20email_obfuscation%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "on"| "off"

The status of Email Obfuscation.

</summary>

One of the following:

"on"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20email_obfuscation%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"off"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20email_obfuscation%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20email_obfuscation%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20email_obfuscation%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

ExplicitCacheControl {id, value }

</summary>

id?: "explicit\_cache\_control"

Origin Cache Control is enabled by default for Free, Pro, and Business domains and disabled by default for Enterprise domains.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2017%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "on"| "off"

The status of Origin Cache Control.

</summary>

One of the following:

"on"

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2017%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"off"

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2017%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2017%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2017">Link to this property</a>

<details>

<summary>

ForwardingURL {id, value }

</summary>

id?: "forwarding\_url"

Redirects one URL to another using an <code>HTTP 301/302</code> redirect. Refer to <a href="https://developers.cloudflare.com/rules/page-rules/reference/wildcard-matching/">Wildcard matching and referencing</a>.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2018%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: Value {status\_code, url }

</summary>

<details>

<summary>

status\_code?: 301| 302

The status code to use for the URL redirect. 301 is a permanent redirect. 302 is a temporary redirect.

</summary>

One of the following:

301

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2018%20%3E%20(property)%20value%20%3E%20(property)%20status_code%20%3E%20(member)%200">Link to this property</a>

302

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2018%20%3E%20(property)%20value%20%3E%20(property)%20status_code%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2018%20%3E%20(property)%20value%20%3E%20(property)%20status_code">Link to this property</a>

url?: string

The URL to redirect the request to. Notes: ${num} refers to the position of ’\*’ in the constraint value.

maxLength1500

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2018%20%3E%20(property)%20value%20%3E%20(property)%20url">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2018%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2018">Link to this property</a>

<details>

<summary>

HostHeaderOverride {id, value }

</summary>

id?: "host\_header\_override"

Apply a specific host header.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2019%20%3E%20(property)%20id">Link to this property</a>

value?: string

The hostname to use in the <code>Host</code> header

minLength1

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2019%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2019">Link to this property</a>

<details>

<summary>

IPGeolocation {id, value }

</summary>

id?: "ip\_geolocation"

Cloudflare adds a CF-IPCountry HTTP header containing the country code that corresponds to the visitor.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20ip_geolocation%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "on"| "off"

The status of adding the IP Geolocation Header.

</summary>

One of the following:

"on"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20ip_geolocation%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"off"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20ip_geolocation%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20ip_geolocation%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20ip_geolocation%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

Mirage {id, value }

</summary>

id?: "mirage"

Cloudflare Mirage reduces bandwidth used by images in mobile browsers. It can accelerate loading of image-heavy websites on very slow mobile connections and HTTP/1.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20mirage%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "on"| "off"

The status of Mirage.

</summary>

One of the following:

"on"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20mirage%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"off"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20mirage%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20mirage%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20mirage%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

OpportunisticEncryption {id, value }

</summary>

id?: "opportunistic\_encryption"

Opportunistic Encryption allows browsers to access HTTP URIs over an encrypted TLS channel. It’s not a substitute for HTTPS, but provides additional security for otherwise vulnerable requests.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20opportunistic_encryption%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "on"| "off"

The status of Opportunistic Encryption.

</summary>

One of the following:

"on"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20opportunistic_encryption%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"off"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20opportunistic_encryption%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20opportunistic_encryption%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20opportunistic_encryption%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

OriginErrorPagePassThru {id, value }

</summary>

id?: "origin\_error\_page\_pass\_thru"

Turn on or off Cloudflare error pages generated from issues sent from the origin server. If enabled, this setting triggers error pages issued by the origin.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20origin_error_page_pass_thru%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "on"| "off"

The status of Origin Error Page Passthru.

</summary>

One of the following:

"on"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20origin_error_page_pass_thru%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"off"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20origin_error_page_pass_thru%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20origin_error_page_pass_thru%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20origin_error_page_pass_thru%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

Polish {id, value }

</summary>

id?: "polish"

Apply options from the Polish feature of the Cloudflare Speed app.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20polish%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "off"| "lossless"| "lossy"

The level of Polish you want applied to your origin.

</summary>

One of the following:

"off"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20polish%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"lossless"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20polish%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

"lossy"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20polish%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20polish%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20polish%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

ResolveOverride {id, value }

</summary>

id?: "resolve\_override"

Change the origin address to the value specified in this setting.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2025%20%3E%20(property)%20id">Link to this property</a>

value?: string

The origin address you want to override with.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2025%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2025">Link to this property</a>

<details>

<summary>

RespectStrongEtag {id, value }

</summary>

id?: "respect\_strong\_etag"

Turn on or off byte-for-byte equivalency checks between the Cloudflare cache and the origin server.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2026%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "on"| "off"

The status of Respect Strong ETags

</summary>

One of the following:

"on"

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2026%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"off"

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2026%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2026%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions%20%3E%20(items)%20%3E%20(variant)%2026">Link to this property</a>

<details>

<summary>

ResponseBuffering {id, value }

</summary>

id?: "response\_buffering"

Turn on or off whether Cloudflare should wait for an entire file from the origin server before forwarding it to the site visitor. By default, Cloudflare sends packets to the client as they arrive from the origin server.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20response_buffering%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "on"| "off"

The status of Response Buffering

</summary>

One of the following:

"on"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20response_buffering%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"off"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20response_buffering%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20response_buffering%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20response_buffering%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

RocketLoader {id, value }

</summary>

id?: "rocket\_loader"

Turn on or off Rocket Loader in the Cloudflare Speed app.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20rocket_loader%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "on"| "off"

The status of Rocket Loader

</summary>

One of the following:

"on"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20rocket_loader%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"off"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20rocket_loader%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20rocket_loader%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20rocket_loader%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

SecurityLevel {id, value }

</summary>

id?: "security\_level"

Control options for the **Security Level** feature from the **Security** app.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20security_level%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "off"| "essentially\_off"| "low"| 3 more

</summary>

One of the following:

"off"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20security_level%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"essentially\_off"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20security_level%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

"low"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20security_level%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%202">Link to this property</a>

"medium"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20security_level%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%203">Link to this property</a>

"high"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20security_level%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%204">Link to this property</a>

"under\_attack"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20security_level%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%205">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20security_level%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20security_level%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

SortQueryStringForCache {id, value }

</summary>

id?: "sort\_query\_string\_for\_cache"

Turn on or off the reordering of query strings. When query strings have the same structure, caching improves.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20sort_query_string_for_cache%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "on"| "off"

The status of Query String Sort

</summary>

One of the following:

"on"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20sort_query_string_for_cache%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"off"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20sort_query_string_for_cache%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20sort_query_string_for_cache%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20sort_query_string_for_cache%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

SSL {id, value }

</summary>

id?: "ssl"

Control options for the SSL feature of the Edge Certificates tab in the Cloudflare SSL/TLS app.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20ssl%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "off"| "flexible"| "full"| 2 more

The encryption mode that Cloudflare uses to connect to your origin server.

</summary>

One of the following:

"off"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20ssl%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"flexible"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20ssl%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

"full"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20ssl%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%202">Link to this property</a>

"strict"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20ssl%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%203">Link to this property</a>

"origin\_pull"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20ssl%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20ssl%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20ssl%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

TrueClientIPHeader {id, value }

</summary>

id?: "true\_client\_ip\_header"

Turn on or off the True-Client-IP Header feature of the Cloudflare Network app.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20true_client_ip_header%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "on"| "off"

The status of True Client IP Header.

</summary>

One of the following:

"on"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20true_client_ip_header%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"off"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20true_client_ip_header%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20true_client_ip_header%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20true_client_ip_header%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

WAF {id, value }

</summary>

id?: "waf"

Turn on or off <a href="https://developers.cloudflare.com/waf/reference/legacy/old-waf-managed-rules/">WAF managed rules (previous version, deprecated)</a>. You cannot enable or disable individual WAF managed rules via Page Rules.

<a href="#(resource)%20zones.settings%20%3E%20(model)%20waf%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

value?: "on"| "off"

The status of WAF managed rules (previous version).

</summary>

One of the following:

"on"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20waf%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%200">Link to this property</a>

"off"

<a href="#(resource)%20zones.settings%20%3E%20(model)%20waf%20%3E%20(schema)%20%3E%20(property)%20value%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20waf%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20zones.settings%20%3E%20(model)%20waf%20%3E%20(schema)">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20actions">Link to this property</a>

created\_on: string

The timestamp of when the Page Rule was created.

formatdate-time

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>

modified\_on: string

The timestamp of when the Page Rule was last modified.

formatdate-time

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

priority: number

The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: <code>/images/*</code>) but want a more specific Page Rule to take precedence (rule B: <code>/images/special/*</code>), specify a higher priority for rule B so it overrides rule A.

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20priority">Link to this property</a>

<details>

<summary>

status: "active"| "disabled"

The status of the Page Rule.

</summary>

One of the following:

"active"

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"disabled"

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

<details>

<summary>

targets: Array&lt;<a href="https://developers.cloudflare.com/api/typescript/resources/page_rules#(resource)%20page_rules%20%3E%20(model)%20target%20%3E%20(schema)">Target</a> {constraint, target } &gt;

The rule targets to evaluate on each request.

</summary>

<details>

<summary>

constraint?: Constraint {operator, value }

String constraint.

</summary>

<details>

<summary>

operator: "matches"| "contains"| "equals"| 2 more

The matches operator can use asterisks and pipes as wildcard and ‘or’ operators.

</summary>

One of the following:

"matches"

<a href="#(resource)%20page_rules%20%3E%20(model)%20target%20%3E%20(schema)%20%3E%20(property)%20constraint%20%3E%20(property)%20operator%20%3E%20(member)%200">Link to this property</a>

"contains"

<a href="#(resource)%20page_rules%20%3E%20(model)%20target%20%3E%20(schema)%20%3E%20(property)%20constraint%20%3E%20(property)%20operator%20%3E%20(member)%201">Link to this property</a>

"equals"

<a href="#(resource)%20page_rules%20%3E%20(model)%20target%20%3E%20(schema)%20%3E%20(property)%20constraint%20%3E%20(property)%20operator%20%3E%20(member)%202">Link to this property</a>

"not\_equal"

<a href="#(resource)%20page_rules%20%3E%20(model)%20target%20%3E%20(schema)%20%3E%20(property)%20constraint%20%3E%20(property)%20operator%20%3E%20(member)%203">Link to this property</a>

"not\_contain"

<a href="#(resource)%20page_rules%20%3E%20(model)%20target%20%3E%20(schema)%20%3E%20(property)%20constraint%20%3E%20(property)%20operator%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20target%20%3E%20(schema)%20%3E%20(property)%20constraint%20%3E%20(property)%20operator">Link to this property</a>

value: string

The URL pattern to match against the current request. The pattern may contain up to four asterisks (’\*’) as placeholders.

<a href="#(resource)%20page_rules%20%3E%20(model)%20target%20%3E%20(schema)%20%3E%20(property)%20constraint%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20target%20%3E%20(schema)%20%3E%20(property)%20constraint">Link to this property</a>

target?: "url"

A target based on the URL of the request.

<a href="#(resource)%20page_rules%20%3E%20(model)%20target%20%3E%20(schema)%20%3E%20(property)%20target">Link to this property</a>

</details>

<a href="#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)%20%3E%20(property)%20targets">Link to this property</a>

</details>

[Link to this property](<#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)>)

### Get a Page Rule

TypeScript

HTTPTypeScriptPythonGoTerraform

```
import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const pageRule = await client.pageRules.get('023e105f4ecef8ad9ca31a8372d0c353', {
  zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
});

console.log(pageRule.id);
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "023e105f4ecef8ad9ca31a8372d0c353",
    "actions": [
      {
        "id": "browser_check",
        "value": "on"
      }
    ],
    "created_on": "2014-01-01T05:20:00.12345Z",
    "modified_on": "2014-01-01T05:20:00.12345Z",
    "priority": 0,
    "status": "active",
    "targets": [
      {
        "constraint": {
          "operator": "matches",
          "value": "*example.com/images/*"
        },
        "target": "url"
      }
    ]
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "023e105f4ecef8ad9ca31a8372d0c353",
    "actions": [
      {
        "id": "browser_check",
        "value": "on"
      }
    ],
    "created_on": "2014-01-01T05:20:00.12345Z",
    "modified_on": "2014-01-01T05:20:00.12345Z",
    "priority": 0,
    "status": "active",
    "targets": [
      {
        "constraint": {
          "operator": "matches",
          "value": "*example.com/images/*"
        },
        "target": "url"
      }
    ]
  }
}
```