We are in the process of setting up a static custom domain website with SSL being hosted from an Azure storage account.

After getting HTTPS protocol to work, it is necessary to set up HTTP Rules for the CDN endpoint to be able to serve up the proper landing page of the website, plus force redirecting of all http traffic to https.

Previous steps in Setting up a custom domain website being hosted from an Azure storage account:

In order to be able to configure the Azure CDN’s Rules Engine, the Azure CDN Profile must be the Premium Verizon pricing tier. This is the only one of the 4 Azure CDN products that have the Rule Engine feature:

The Azure CDN Rules Engines allows customization of how HTTP requests are handled.

Azure portal > CDN Profile > Manage > HTTP Large > Rules Engine

These are the rules added to the CDN for all endpoints on the CDN profile, since all endpoints are static websites. The order of rules is important, as the Rules Engine applies rules from the top rule down.

Rules can be added globally to all CDN endpoints or to individual endpoints of the container as seen in the Source drop down options. This is a screen shot of a Rule Source of a CDN profile containing endpoints to 3 custom domains :

Rule 1: Redirect HTTP to HTTPS

Rule 2: Redirect Root to www 


Rule 3: HSTS Header

Rule 4: URL Rewrite (x2)