We recently changed from on premise hosting to Azure for our Episerver site, and are experiencing problems with redirects within our site. The solutions keeps redirecting to the x.azurewebsites.net url instead of the custom domain, and we are bit lost as to what we have done wrong with the configuration of our site in Azure.
Our site consits of two solutions: the Episerver site and another solution. All urls appart from /other-solution redirects to our Episerver which runs as an app service. Because of performance issues in the other solution (and our previous on premise hosting) we have CloudFront. This means that request to our custom domain are sent to CloudFront, which then routes the traffic to the correct solution.
We are now however experiencing issues with redirects in our Episerver solution, as redirects in code sends our users to x.azurewebsites.net url instead of the custom domain.
The custom domain is not set up in Azure and we are not redirecting the host header from CloudFront. This worked at first when we moved the hosting to Azure, but the problems seams to have started happening after a big update where we amongst others updated to .Net Framework 4.7.2 from 4.6.1 and also updated Episerver from 11.11.2 to 11.14.0.
Does anyone have any idea about what we have done wrong?