Enforcing HTTP redirection to HTTPS on Azure Web Apps

By default, Azure App Service does not enforce HTTPS. We can enforce HTTPS redirection by configuring the rules in the web.config file. 

In our normal Azure Web Apps URL, add scm after the name of the Azure web application. It opens a Kudu editor:

Go to Debug console and navigate to the wwwroot directory in the Kudu editor. 

Create web.config by executing the touch web.config command in the console:

Click on the Edit icon of the file and we can add the following content to redirect HTTP ...

Get Implementing DevOps with Microsoft Azure now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.