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.

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

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

Thankyou…..