something is not clear using Azure CDN.
I explain step by step what I have done since my website has been created. Call my website www.mypublicwebsite.com
. So:
- I created a web app on Azure. The website has the following url:
https://mypublicwebsite.azurewebsites.net
; - I created a custom domain
www.mypublicwebsite.com
- I redirected all the request from
https://mypublicwebsite.azurewebsites.net
towww.mypublicwebsite.com
. So I solved the problem of duplicated contents for crawlers.
Everything is fine. Then, I decided to create CDN, according the documentation. Here the confusion starts.
- I created the CDN profile
- I created the endpoint. The endpoint has a new url
https://mypublicwebsite.azureedge.net
- I deleted the custom domain from web app;
- I created the custom domain in cdn profile.
So the current state is this:
This situation is really problematic for SEO!! It cannot be the correct configuration. My contents are triplicated. I partially solved the situation:
- I redirected all the request from
https://mypublicwebsite.azureedge.net
towww.mypublicwebsite.com
. So I solved the problem of duplicated content for crawlers.
But crawler (and perhaps users?) can still navigate the origin web site. I have been looking for different solutions:
- Make a redirect from
https://mypublicwebsite.azurewebsites.net
towww.mypublicwebsite.com
. But this create a infinite redirects loop between the CDN and the origin. - Try to hide the origin, but how?
I am honestly starting thinking this is not the correct way to manage cdn. Can anyone help me please?
Thank you