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

[Skip to content](#_top)

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

[Page Rules](https://developers.cloudflare.com/api/go/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(ctx, pageruleID, query) (\*[PageRule](<https://developers.cloudflare.com/api/go/resources/page_rules#(resource)%20page_rules%20%3E%20(model)%20page_rule%20%3E%20(schema)>), error)

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>

query PageRuleGetParams

</summary>

ZoneID param.Field\[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>

type PageRule struct{…}

</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 \[]PageRuleAction

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>

type AlwaysUseHTTPS struct{…}

</summary>

ID AlwaysUseHTTPSIDOptional

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>

type AutomaticHTTPSRewrites struct{…}

</summary>

ID AutomaticHTTPSRewritesIDOptional

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 AutomaticHTTPSRewritesValueOptional

The status of Automatic HTTPS Rewrites.

</summary>

One of the following:

const AutomaticHTTPSRewritesValueOn AutomaticHTTPSRewritesValue = "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>

const AutomaticHTTPSRewritesValueOff AutomaticHTTPSRewritesValue = "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>

type BrowserCacheTTL struct{…}

</summary>

ID BrowserCacheTTLIDOptional

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 int64Optional

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>

type BrowserCheck struct{…}

</summary>

ID BrowserCheckIDOptional

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 BrowserCheckValueOptional

The status of Browser Integrity Check.

</summary>

One of the following:

const BrowserCheckValueOn BrowserCheckValue = "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>

const BrowserCheckValueOff BrowserCheckValue = "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>

type PageRuleActionsBypassCacheOnCookie struct{…}

</summary>

ID PageRuleActionsBypassCacheOnCookieIDOptional

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 stringOptional

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>

type PageRuleActionsCacheByDeviceType struct{…}

</summary>

ID PageRuleActionsCacheByDeviceTypeIDOptional

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 PageRuleActionsCacheByDeviceTypeValueOptional

The status of Cache By Device Type.

</summary>

One of the following:

const PageRuleActionsCacheByDeviceTypeValueOn PageRuleActionsCacheByDeviceTypeValue = "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>

const PageRuleActionsCacheByDeviceTypeValueOff PageRuleActionsCacheByDeviceTypeValue = "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>

type PageRuleActionsCacheDeceptionArmor struct{…}

</summary>

ID PageRuleActionsCacheDeceptionArmorIDOptional

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 PageRuleActionsCacheDeceptionArmorValueOptional

The status of Cache Deception Armor.

</summary>

One of the following:

const PageRuleActionsCacheDeceptionArmorValueOn PageRuleActionsCacheDeceptionArmorValue = "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>

const PageRuleActionsCacheDeceptionArmorValueOff PageRuleActionsCacheDeceptionArmorValue = "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>

type PageRuleActionsCacheKeyFields struct{…}

</summary>

ID PageRuleActionsCacheKeyFieldsIDOptional

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 PageRuleActionsCacheKeyFieldsValueOptional

</summary>

<details>

<summary>

Cookie PageRuleActionsCacheKeyFieldsValueCookieOptional

Controls which cookies appear in the Cache Key.

</summary>

CheckPresence \[]stringOptional

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 \[]stringOptional

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 PageRuleActionsCacheKeyFieldsValueHeaderOptional

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

</summary>

CheckPresence \[]stringOptional

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 \[]stringOptional

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 \[]stringOptional

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 PageRuleActionsCacheKeyFieldsValueHostOptional

Determines which host header to include in the Cache Key.

</summary>

Resolved boolOptional

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>

QueryString PageRuleActionsCacheKeyFieldsValueQueryStringOptional

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 PageRuleActionsCacheKeyFieldsValueQueryStringExcludeUnionOptional

Ignore all query string parameters.

</summary>

One of the following:

type PageRuleActionsCacheKeyFieldsValueQueryStringExcludeString string

Ignore all query string parameters.

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

type PageRuleActionsCacheKeyFieldsValueQueryStringExcludeArray \[]string

A list of query string parameters 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)%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 PageRuleActionsCacheKeyFieldsValueQueryStringIncludeUnionOptional

Include all query string parameters.

</summary>

One of the following:

type PageRuleActionsCacheKeyFieldsValueQueryStringIncludeString string

Include all query string parameters.

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

type PageRuleActionsCacheKeyFieldsValueQueryStringIncludeArray \[]string

A list of query string parameters 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)%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 PageRuleActionsCacheKeyFieldsValueUserOptional

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

</summary>

DeviceType boolOptional

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 boolOptional

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 boolOptional

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>

type CacheLevel struct{…}

</summary>

ID CacheLevelIDOptional

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 CacheLevelValueOptional

- <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:

const CacheLevelValueBypass CacheLevelValue = "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>

const CacheLevelValueBasic CacheLevelValue = "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>

const CacheLevelValueSimplified CacheLevelValue = "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>

const CacheLevelValueAggressive CacheLevelValue = "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>

const CacheLevelValueCacheEverything CacheLevelValue = "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>

type PageRuleActionsCacheOnCookie struct{…}

</summary>

ID PageRuleActionsCacheOnCookieIDOptional

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 stringOptional

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>

type PageRuleActionsCacheTTLByStatus struct{…}

</summary>

ID PageRuleActionsCacheTTLByStatusIDOptional

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 map\[string, PageRuleActionsCacheTTLByStatusValueUnion]Optional

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>

type PageRuleActionsCacheTTLByStatusValueString string

<code>no-store</code> (equivalent to -1), <code>no-cache</code> (equivalent to 0)

</summary>

One of the following:

const PageRuleActionsCacheTTLByStatusValueStringNoCache PageRuleActionsCacheTTLByStatusValueString = "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>

const PageRuleActionsCacheTTLByStatusValueStringNoStore PageRuleActionsCacheTTLByStatusValueString = "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>

UnionInt

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

type PageRuleActionsDisableApps struct{…}

</summary>

ID PageRuleActionsDisableAppsIDOptional

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>

type PageRuleActionsDisablePerformance struct{…}

</summary>

ID PageRuleActionsDisablePerformanceIDOptional

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>

type PageRuleActionsDisableSecurity struct{…}

</summary>

ID PageRuleActionsDisableSecurityIDOptional

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>

type PageRuleActionsDisableZaraz struct{…}

</summary>

ID PageRuleActionsDisableZarazIDOptional

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>

type PageRuleActionsEdgeCacheTTL struct{…}

</summary>

ID PageRuleActionsEdgeCacheTTLIDOptional

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 int64Optional

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>

type EmailObfuscation struct{…}

</summary>

ID EmailObfuscationIDOptional

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 EmailObfuscationValueOptional

The status of Email Obfuscation.

</summary>

One of the following:

const EmailObfuscationValueOn EmailObfuscationValue = "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>

const EmailObfuscationValueOff EmailObfuscationValue = "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>

type PageRuleActionsExplicitCacheControl struct{…}

</summary>

ID PageRuleActionsExplicitCacheControlIDOptional

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 PageRuleActionsExplicitCacheControlValueOptional

The status of Origin Cache Control.

</summary>

One of the following:

const PageRuleActionsExplicitCacheControlValueOn PageRuleActionsExplicitCacheControlValue = "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>

const PageRuleActionsExplicitCacheControlValueOff PageRuleActionsExplicitCacheControlValue = "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>

type PageRuleActionsForwardingURL struct{…}

</summary>

ID PageRuleActionsForwardingURLIDOptional

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 PageRuleActionsForwardingURLValueOptional

</summary>

<details>

<summary>

StatusCode PageRuleActionsForwardingURLValueStatusCodeOptional

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

</summary>

One of the following:

const PageRuleActionsForwardingURLValueStatusCode301 PageRuleActionsForwardingURLValueStatusCode = 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>

const PageRuleActionsForwardingURLValueStatusCode302 PageRuleActionsForwardingURLValueStatusCode = 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 stringOptional

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>

type PageRuleActionsHostHeaderOverride struct{…}

</summary>

ID PageRuleActionsHostHeaderOverrideIDOptional

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 stringOptional

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>

type IPGeolocation struct{…}

</summary>

ID IPGeolocationIDOptional

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 IPGeolocationValueOptional

The status of adding the IP Geolocation Header.

</summary>

One of the following:

const IPGeolocationValueOn IPGeolocationValue = "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>

const IPGeolocationValueOff IPGeolocationValue = "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>

type Mirage struct{…}

</summary>

ID MirageIDOptional

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 MirageValueOptional

The status of Mirage.

</summary>

One of the following:

const MirageValueOn MirageValue = "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>

const MirageValueOff MirageValue = "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>

type OpportunisticEncryption struct{…}

</summary>

ID OpportunisticEncryptionIDOptional

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 OpportunisticEncryptionValueOptional

The status of Opportunistic Encryption.

</summary>

One of the following:

const OpportunisticEncryptionValueOn OpportunisticEncryptionValue = "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>

const OpportunisticEncryptionValueOff OpportunisticEncryptionValue = "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>

type OriginErrorPagePassThru struct{…}

</summary>

ID OriginErrorPagePassThruIDOptional

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 OriginErrorPagePassThruValueOptional

The status of Origin Error Page Passthru.

</summary>

One of the following:

const OriginErrorPagePassThruValueOn OriginErrorPagePassThruValue = "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>

const OriginErrorPagePassThruValueOff OriginErrorPagePassThruValue = "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>

type Polish struct{…}

</summary>

ID PolishIDOptional

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 PolishValueOptional

The level of Polish you want applied to your origin.

</summary>

One of the following:

const PolishValueOff PolishValue = "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>

const PolishValueLossless PolishValue = "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>

const PolishValueLossy PolishValue = "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>

type PageRuleActionsResolveOverride struct{…}

</summary>

ID PageRuleActionsResolveOverrideIDOptional

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 stringOptional

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>

type PageRuleActionsRespectStrongEtag struct{…}

</summary>

ID PageRuleActionsRespectStrongEtagIDOptional

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 PageRuleActionsRespectStrongEtagValueOptional

The status of Respect Strong ETags

</summary>

One of the following:

const PageRuleActionsRespectStrongEtagValueOn PageRuleActionsRespectStrongEtagValue = "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>

const PageRuleActionsRespectStrongEtagValueOff PageRuleActionsRespectStrongEtagValue = "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>

type ResponseBuffering struct{…}

</summary>

ID ResponseBufferingIDOptional

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 ResponseBufferingValueOptional

The status of Response Buffering

</summary>

One of the following:

const ResponseBufferingValueOn ResponseBufferingValue = "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>

const ResponseBufferingValueOff ResponseBufferingValue = "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>

type RocketLoader struct{…}

</summary>

ID RocketLoaderIDOptional

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 RocketLoaderValueOptional

The status of Rocket Loader

</summary>

One of the following:

const RocketLoaderValueOn RocketLoaderValue = "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>

const RocketLoaderValueOff RocketLoaderValue = "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>

type SecurityLevel struct{…}

</summary>

ID SecurityLevelIDOptional

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 SecurityLevelValueOptional

</summary>

One of the following:

const SecurityLevelValueOff SecurityLevelValue = "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>

const SecurityLevelValueEssentiallyOff SecurityLevelValue = "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>

const SecurityLevelValueLow SecurityLevelValue = "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>

const SecurityLevelValueMedium SecurityLevelValue = "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>

const SecurityLevelValueHigh SecurityLevelValue = "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>

const SecurityLevelValueUnderAttack SecurityLevelValue = "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>

type SortQueryStringForCache struct{…}

</summary>

ID SortQueryStringForCacheIDOptional

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 SortQueryStringForCacheValueOptional

The status of Query String Sort

</summary>

One of the following:

const SortQueryStringForCacheValueOn SortQueryStringForCacheValue = "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>

const SortQueryStringForCacheValueOff SortQueryStringForCacheValue = "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>

type SSL struct{…}

</summary>

ID SSLIDOptional

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 SSLValueOptional

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

</summary>

One of the following:

const SSLValueOff SSLValue = "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>

const SSLValueFlexible SSLValue = "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>

const SSLValueFull SSLValue = "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>

const SSLValueStrict SSLValue = "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>

const SSLValueOriginPull SSLValue = "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>

type TrueClientIPHeader struct{…}

</summary>

ID TrueClientIPHeaderIDOptional

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 TrueClientIPHeaderValueOptional

The status of True Client IP Header.

</summary>

One of the following:

const TrueClientIPHeaderValueOn TrueClientIPHeaderValue = "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>

const TrueClientIPHeaderValueOff TrueClientIPHeaderValue = "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>

type WAF struct{…}

</summary>

ID WAFIDOptional

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 WAFValueOptional

The status of WAF managed rules (previous version).

</summary>

One of the following:

const WAFValueOn WAFValue = "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>

const WAFValueOff WAFValue = "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>

CreatedOn Time

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>

ModifiedOn Time

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 int64

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 PageRuleStatus

The status of the Page Rule.

</summary>

One of the following:

const PageRuleStatusActive PageRuleStatus = "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>

const PageRuleStatusDisabled PageRuleStatus = "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 \[]<a href="https://developers.cloudflare.com/api/go/resources/page_rules#(resource)%20page_rules%20%3E%20(model)%20target%20%3E%20(schema)">Target</a>

The rule targets to evaluate on each request.

</summary>

<details>

<summary>

Constraint TargetConstraintOptional

String constraint.

</summary>

<details>

<summary>

Operator TargetConstraintOperator

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

</summary>

One of the following:

const TargetConstraintOperatorMatches TargetConstraintOperator = "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>

const TargetConstraintOperatorContains TargetConstraintOperator = "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>

const TargetConstraintOperatorEquals TargetConstraintOperator = "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>

const TargetConstraintOperatorNotEqual TargetConstraintOperator = "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>

const TargetConstraintOperatorNotContain TargetConstraintOperator = "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 TargetTargetOptional

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

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/page_rules"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  pageRule, err := client.PageRules.Get(
    context.TODO(),
    "023e105f4ecef8ad9ca31a8372d0c353",
    page_rules.PageRuleGetParams{
      ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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"
      }
    ]
  }
}
```