Reputation: 1416
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:
Both options are added in custom domains for this cdn:
Upvotes: 9
Views: 6167
Reputation: 1506
Redirect root/apex domain to WWW subdomain, using Azure CDN without buying/making your own cert.
Yes
Use below config, remember to use Moved 301, not "Permanent Redirect 308"
Upvotes: -2
Reputation: 1416
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:
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.
Upvotes: 8