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:
That's domain records:
Both options are added in custom domains for this cdn:
By default, CDN will not automatically redirect HTTP requests to HTTPS. However, this can easily be configured using CDN's built-in rules engine.
This usually means setting up an A record for the root domain and a CNAME (or additional A records) for subdomains. DNS is great for "redirects" that simply point the domain to a specific host, like website or application that has a dedicated IP address and is configured to work with the domain you want to use.
Azure Content Delivery Network (CDN) offers developers a global solution for rapidly delivering high-bandwidth content to users by caching their content at strategically placed physical nodes across the world.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With