ARR – HTTP to HTTPS redirection

Windows Server 2012R2 Windows Server 2016 Windows Server 2019

In this tutorial, I will explain to you how to set up a redirection of a site from HTTP to HTTPS with ARR.

If you don’t yet know IIS ARR, I’ll let you discover it in this tutorial: IIS ARR: Installation and configuration.

This type of redirection is often implemented when using ARR with an Exchange server farm.

From the IIS console, go to server farm 1 and then click on Routing Rules 2.

In the Actions panel, click URL Rewrite 1.

You must create an incoming traffic rule, right-click and click Add rules 1.

In the Inbound Rules section, select Empty Rule 1 and click OK 2.

Name the rule 1 then select Matches pattern 2 and Regular expressions 3, in the Pattern enter (.*) 4 field.

We must now add two conditions, the first which checks if the request is in HTTP and the second condition, we will test the name of the host.

Add the two conditions as in the screenshot below:

The last step is configuring the action, choose Redirect 1, in Redirect URL enter the url in the format https://URI/ 2 and add {R:0} at the end 3. Finish by selecting the 301 4 redirect type.

To finish, click Apply 1 in the Actions menu to create the rule.

The rule is added in the incoming traffic section.

To function correctly, it is imperative that the rule be placed above the transfer rules to the web farm.

To move the ruler, section it and in the Action menu click on Move.

Leave a Comment