Central Plains Computer Service Red White and Gray Website Logo

IIS Redirect HTTP to HTTPS

Step-by-Step Instructions for using a URL Rewrite to Redirect HTTP to HTTPS in IIS #

Before you can set out with an HTTP/HTTPS redirect in IIS, you’ll need to make sure that you have an SSL certificate already installed. This is not a step you can skip. Once you’ve got the certificate installed, we can start working on a URL rewrite to redirect your traffic to your new-fangled HTTPS site.

Steps for IIS Redirect HTTP to HTTPS #

1. Download and install the IIS URL Rewrite Module

2. Open IIS Manager, in the console select the website you want to redirect

3. Select URL Rewrite

url-rewrite-iis

4. Click Add Rules

5.Select Blank Rule, click OK

add-rules-image

6. Enter the Name of rule

7. In the Match URL section choose “Matches the Pattern” in the Requested URL drop-down

8. Next select “Regular Expressions” in the Using drop-down

9. In the Match URL section enter: “(.*)

match-url-window-iis

10. In the conditions section, select Match All under Logical Grouping, the click Add
11. In the next window: 

  • Enter {HTTPS} as the condition input
  • Select “Matches and Pattern” from the drop-down
  • Enter ^OFF$ as the pattern
  • Click OK
iis-edit-condition-window

12. In the Action section, click Redirect and then specify the Redirect URL as: https://{HTTP_HOST}/{R:1}

13.Check the Append Query String box

14. Choose your redirection type (301)

iis-action-window

15. Click Apply

Powered by BetterDocs