2
votes

I have an Azure blob with a static website, running a custom domain through Azure CDN. Since I can't get a static IP for the blob, and I can't use alias or A in the DNS records, I'm trying to do a URL redirect through the Azure Verizon CDN Rules Engine.

By looking at other threads on Stack Overflow, I've been able to get a http -> https redirect, but not the naked domain to www redirect.

This is what I have so far (doesn't work). Anyone have some suggestions on how I can fix this - using the rules engine interface?

Current Attempt

1

1 Answers

1
votes

I have solved this by simply creating a second rule after the https redirect. Make sure both the naked & www domains have been added as custom domains to the CDN.

The rule looks like this:

IF Edge Cname example.com

Features URL Redirect Code 301 Source [cdn endpoint] (.*) Destination https://www.example.com/$1