View Categories

How to configure HTTP to HTTPS redirection in Azure Application Gateway

Estimated Reading Time: < 1 min read

Case #

There are many cases in which you need to redirect all HTTP traffic hitting your Azure infrastructure to HTTPS for security reasons. This article provides step-by-step guidance on how to configure HTTP to HTTPS redirection in Azure Application Gateway.

Solution #

Step 1 - Create Application Gateway listeners #

Create a port 80 HTTP listener and a port 443 listener for each Application Gateway services you wish to perform HTTP to HTTPS redirection, as shown in the example below.

Cloud School Docs - image 41 -
Port 443 listener
Cloud School Docs - image 42 -
Port 80 listener

Each port 443 listener (HTTPS) should have all dependent Application Gateway components configured as well, namely at least one backend pool, one backet settings object, one rule and one health probe. More details on how to configure the Azure Application Gateway components for HTTPS workloads can be found in the following KB article: https://docs.cloudschool.tv/kb/how-to-configure-azure-application-gateway-for-https-workloads/.

Step 2 - Create Application Gateway rules for the HTTP to HTTPS redirection #

For each port 80 listener, create an Application Gateway rule which redirects all traffic intercepted by the port 80 listener to the corresponding port 443 listener, as shown in the example below.

Cloud School Docs - image 43 -
HTTP to HTTPS redirection rule - part 1
Cloud School Docs - image 44 -
HTTP to HTTPS redirection rule - part 2

Powered by BetterDocs