0

I deployed an empty web app on azure. At this point I am only hosting a basic site, with only HTML, CSS and JS files. I uploaded and assigned an SSL certificate to my custom domain and would like to force https. The official documentation states to edit the web.config file to implement the rewrite rule however I do not have a web.config file, which the documentation says should be added by default.

2
  • Thanks Puneet, I was able to configure by following the instructions on the link you provided. I appreciate it!
    – codedzy
    May 29, 2015 at 17:55
  • you are welcm. glad it helped :) May 29, 2015 at 18:24

1 Answer 1

4

The web.config file is not added by default so it is totally fine if you don't see it in the web site content folder.

You can always create a new web.config file and put settings there however you cannot force SSL settings on an Azure webapp by changing settings in the web.config because the SSL section is locked (I believe) at the applicationHost.config level . The easiest way here for you is to add a URLREWRITE rule that redirects all the HTTP requests to HTTPS. Check this link for a sample on how to achieve this - http://blogs.msdn.com/b/benjaminperkins/archive/2014/01/07/https-only-on-windows-azure-web-sites.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.