There are many ways to redirect http to https in Windows, but the simplest is to create a web.config file in your website’s file directory and enter the code below into it.

<rule name="HTTP to HTTPS redirect" stopProcessing="true">   
<match url="(.*)"></match>   
<add input="{HTTPS}" pattern="off" ignoreCase="true"></add>  
<action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" </action>

Now,access your website and check the redirection is working or not.