Ignore Process Domain Prefix when under azurewebsites.net
Currently we implement most of our sites on Kentico within the Azure environment. One of the issues we consistently have project to project is when we set the Process Domain Prefix to always go to www, we can no longer use the sitename.azurewebsites.net url. This is because it will automatically redirect the site to www.sitename.azurewebsites.net which is invalid. Another issue with this is when trying to use Traffic manager within the Azure environment. Traffic manager uses the azurewebsites.net address and checks the response code of the request to ensure it is a 200. Traffic manager only views a 200 as a healthy http status code. Therefore if we have the domain prefix set to www, traffic manager calls sitename.azurewebsites.net but it gets a 301 redirect to www.sitename.azurewebsites.net. It therefore believes the website is degraded and causes a failover to the other server.
I would like to suggest that Kentico implement the logic for *.azurewebsites.net like it does localhost and does not do the automatic redirect to www subdomain. In looking at the code this could be done in the function in CMS.Helpers.UrlHelpers class below.
public static bool IsTldDomain(string domain)
return IPAddress.TryParse(domain, out address) || !domain.Contains(".") || !domain.Contains(“azurewebsites.net”);
Right now we cannot use the Process Domain Prefix out of the box if we want to use Traffic Manager. Instead we have to write our own rewrite urls within the web.config.
Hi, Thank you very much for this idea.
Since there were no new supporters or comments on your idea in the past 9 months, and the idea doesn’t fit our product vision, I’ve had to make the tough decision to close this post.
E-commerce and Platform Product Owner