All Products
Search
Document Center

Edge Security Acceleration:Rules

Last Updated:Sep 28, 2026

ESA rules let you define conditions that control when specific feature configurations take effect.

Use rules to apply configurations for specific needs such as request transformation, content redirection, or cache policies. Rules also support fine-grained security and traffic management. All rules share consistent syntax to filter requests by characteristics and apply the matching configuration.

Simple configuration examples

Set edge cache TTL for a specific path

Static resources under /content update monthly. To balance persistence and freshness, set the cache TTL for /content resources on ESA POPs to 30 days.

  1. Configure the request filter condition:

    • Use console controls: URI Path equals /content

    • Use the expression editor: (http.request.uri.path eq "/content")

  2. Configure the edge cache TTL: Use Custom TTL 30 Days

Redirect requests by region

Redirect requests from the Chinese mainland from example.com to example.com.cn.

  1. Configure the request filter condition:

    • Use console controls: Hostname equals example.com And Country/Region equals China

    • Use the expression editor: (http.host eq "example.com" and ip.geoip.country eq "CN")

  2. Configure the redirect destination URL: Static redirect to https://example.com.cn

Rule configuration structure

When a request reaches an ESA node, ESA filters and processes it based on your rule configuration.

image

Every ESA rule configuration includes two parts:

Rule configuration = Rule expression + Action

Configure a rule expression to filter requests and an action to run on matched requests. The expression syntax is consistent across all rule-related features in ESA, so you can reuse configurations across features. Rule expression structure.

Feature availability by plan

Feature category

Feature

Entrance ($0/month)

Pro ($15/month)

Premium ($249/month)

Enterprise (Contact sales for custom pricing)

General rule capabilities

Maximum nested sub-conditions

10

10

20

20

Operator - regular expression

Not supported

Not supported

Supported

Supported

HTTPS rules

SSL/TLS rules, HTTPS rules (shared quota)

10

25

50

125

Security rules

5

25

50

125

Transform rules

Rewrite URL, Modify outbound request headers, Modify outbound response headers

10

25

50

125

Managed transform - real client IP header

Supported

Supported

Supported

Supported

Managed transform - client geolocation header

Supported

Supported

Supported

Supported

Redirection rules

URL redirection

10

25

50

125

Cache rules

Cache eligibility, Browser cache TTL, Edge cache TTL, Status code cache TTL, Custom cache key

10

25

50

125

Custom port caching

Not supported

Not supported

Not supported

Supported

Response expired cache

Supported

Supported

Supported

Supported

Cache reserve

Supported

Supported

Supported

Supported

Network optimization rules

10(WebSocket configuration is not currently supported)

25

50

100

Content optimization rules

File compression, Image optimization, Video processing (shared quota)

10

25

50

100

Origin fetch rules

Rule limit

10

25

50

125

Custom origin Host

Supported

Supported

Supported

Supported

Origin protocol and port

Supported

Supported

Supported

Supported

Origin SNI

Supported

Supported

Supported

Supported

DNS records

Supported

Supported

Supported

Supported

Byte-range requests

Supported

Supported

Supported

Supported

Origin HTTP request timeout

Supported

Supported

Supported

Supported

Following origin redirects

Supported

Supported

Supported

Supported