Уреди

Делите путем


Set up the Standard rules engine 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.

This article describes how to set up and use the Standard rules engine for Azure Content Delivery Network.

Standard rules engine

You can use the Standard rules engine for Azure Content Delivery Network to customize how HTTP requests are handled. For example, you can use the rules engine to enforce content delivery to use specific protocols, to define a caching policy, or to modify an HTTP header. This article demonstrates how to create a rule that automatically redirects users to HTTPS.

Note

The rules engine that's described in this article is available only for Standard Azure Content Delivery Network from Microsoft.

Redirect users to HTTPS

  1. In your Microsoft profiles, go to Azure Content Delivery Network.

  2. On the CDN profile page, select the endpoint you want to create rules for.

  3. Select the Rules Engine tab.

    The Rules Engine pane opens and displays the list of available global rules.

    Screenshot of Azure Content Delivery Network new rules page.

    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.

  4. Select Add rule and enter a rule name. Rule names must begin with a letter and can contain only numbers and letters.

  5. To identify the type of requests the rule applies to, create a match condition:

    1. Select Add condition, and then select the Request protocol match condition.
    2. For Operator, select Equals.
    3. For Value, select HTTP.

    Screenshot of Azure Content Delivery Network rule match condition.

    Note

    You can select from multiple match conditions in the Add condition dropdown list. For a detailed list of match conditions, see Match conditions in the Standard rules engine.

  6. Select the action to apply to the requests that satisfy the match condition:

    1. Select Add action, and then select URL redirect.
    2. For Type, select Found (302).
    3. For Protocol, select HTTPS.
    4. Leave all other fields blank to use incoming values.

    Screenshot of Azure Content Delivery Network rule action.

    Note

    You can select from multiple actions in the Add action dropdown list. For a detailed list of actions, see Actions in the Standard rules engine.

  7. Select Save to save the new rule. The rule is now available to use.

    Important

    Rule changes might take up to 15 minutes to propagate through Azure Content Delivery Network.

Next steps