Reputation: 3
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.
Upvotes: 0
Views: 3555
Reputation: 2297
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
Upvotes: 4