6
votes

I created a static page using Azure Storage and CDN with Microsoft Standard pricing tier. I need to redirect user from example.com to https://www.example.com (with www), but my rules doesn't seem to work - only http to https redirection rule works so when I type example.com I'm redirected to https://example.com

That's my rules configuration:

enter image description here

That's domain records: enter image description here

Both options are added in custom domains for this cdn: enter image description here

1

1 Answers

6
votes

The problem is that at first user is forwarded to https://example.com where there is no cert and privacy error appears and rules are not applied. Rules could be changed to this:

enter image description here

so now user is forwarded from example.com to https://www.example.com, but if somebody will type https://example.com he will still see an error. Solution to this could be buy SSL cert, because Azure CDN doesn't allow CDN Managed SSL for apex domain.