2

I have a frontend website configured in Azure Blob storage, following the next article:

https://learn.microsoft.com/en-us/azure/cdn/cdn-map-content-to-custom-domain

I successfully configure this website to display with my custom domain:

https://www.example.com

I'm looking now how to configure proper 301 redirections for:

  • http -> 301 -> https
  • example.com -> 301 -> www.example.com

I read this section: https://www.itinsights.org/Static-Websites-with-Azure-Part-4/#HTTP-to-HTTPs-redirection

But from my azure portal I don't see any section where I can push this xml rule or how to configure redirection rules from the interface.

<rule id="1111111" platform="http-large" status="active" version="0" custid="XXXXX">
<description>HTTP to HTTPS</description>
<match.request-scheme value="http">
feature.url-redirect code="301" pattern="/XXXXXXX/staticwebsitede/(.*)" value="https://www.staticwebsite.de/$1" />
</match.request-scheme>
</rule>

Edit Following the accepted answer I have contacted Azure support to see if a migration is possible. For the redirection example.com to www.example.com I have used the web forwarding feature of my domain register.

Jerome2606
  • 933
  • 20
  • 42

1 Answers1

0

From that blog, you need to choose the Azure CDN with the Premium Verizon tier to have the benefits of the Verizon rules engine.

For more details, you could compare Azure CDN product features. Currently, Azure CDN with Standard Microsoft tier also supports URL redirect/rewrite via using standard rules engine.

Nancy
  • 26,865
  • 3
  • 18
  • 34
  • How can I manage to change pricing tier? I contact the Azure support but I don't get an answer. I have acquired SSL certificate and my website is on production, how can I manage a migration without any downtime and without loosing the SSL certificate configured ? – Jerome2606 Dec 13 '19 at 09:57
  • As far an I know, you only could remove your CDN profile and recreate it with a new pricing tier. Then you can [map the temporary cdnverify subdomain](https://learn.microsoft.com/en-us/azure/cdn/cdn-map-content-to-custom-domain#map-the-temporary-cdnverify-subdomain) to avoid interruption while the DNS mapping occurs. However, I am not sure if it also needs some time to enable HTTPS for a custom domain, maybe there is a better method from MS support. – Nancy Dec 13 '19 at 10:23
  • Ps, if the reply could help you in your original question, please conder accepting it.:) – Nancy Dec 13 '19 at 10:24
  • Yes I will wait to get an answer ... I have enabled the web forwarding redirection in my domain name register. So if you type example.com you are redirecting to https : / / www.example.com. The remaining problem is if go to http : / / www.example.com – Jerome2606 Dec 13 '19 at 10:45
  • Try to check if [this](https://stackoverflow.com/questions/49731674/forcing-https-with-azure-cdn) SO answer could help you. – Nancy Dec 16 '19 at 09:42