Redaguoti

Bendrinti naudojant


Standard rules engine reference for Azure Content Delivery Network

Important

Azure CDN Standard from Microsoft (classic) will be retired on September 30, 2027. To avoid any service disruption, it is important that you migrate your Azure CDN Standard from Microsoft (classic) profiles to Azure Front Door Standard or Premium tier by September 30, 2027. For more information, see Azure CDN Standard from Microsoft (classic) retirement.

Azure CDN from Edgio will be retired on November 4, 2025. You must migrate your workload to Azure Front Door before this date to avoid service disruption. For more information, see Azure CDN from Edgio retirement FAQ.

In the Standard rules engine for Azure Content Delivery Network, a rule consists of one or more match conditions and an action. This article provides detailed descriptions of the match conditions and features that are available in the Standard rules engine for Azure Content Delivery Network.

The rules engine is designed to be the final authority on how specific types of requests get processed by Standard Azure Content Delivery Network.

Common uses for the rules:

  • Override or define a custom cache policy.
  • Redirect requests.
  • Modify HTTP request and response headers.

Terminology

To define a rule in the rules engine, set match conditions and actions:

Screenshot of Azure Content Delivery Network rules structure.

Each rule can have up to 10 match conditions and 5 actions. Each Azure Content Delivery Network endpoint can have up to 25 rules.

Included in this limit is a default global rule. The global rule doesn't have match conditions; actions that are defined in a global rule always triggered.

Important

The order in which multiple rules are listed affects how rules are handled. The actions that are specified in a rule might be overwritten by a subsequent rule.

Limits and pricing

For more information, see content delivery network Scale limits for rules limit. For rule engine pricing, see Content Delivery Network pricing.

Syntax

How special characters are treated in a rule varies based on how different match conditions and actions handle text values. A match condition or action can interpret text in one of the following ways:

Literal values

Text that's interpreted as a literal value treats all special characters except the % symbol as part of the value that must be matched in a rule. For example, a literal match condition set to '*' is satisfied only when the exact value '*' is found.

A percent sign is used to indicate URL encoding (for example, %20).

Wildcard values

Currently we support the wildcard character in the UrlPath Match Condition in Standard Rules Engine. The * character is a wildcard that represents one or more characters.

Next steps