Before redirection, we need SSL Certificate.
For creating a free SSL Certificate Download Win-Acme it will automatically bind the certificate in IIS.
Before generating certificate add-website under IIS for HTTP
1] Download and install the URL Rewrite module
2] Open the IIS Manager console and select the website you would like to apply the redirection
3] Double-click on the URL Rewrite icon
4] Click Add Rule in the right-side menu
5] Select Blank Rule in the Inbound section, then press OK
6] Enter any rule name you wish
7] In the Match URL section
–> Select Matches the Pattern in the Requested URL drop down menu
–> Select Regular Expressions in the Using drop down menu
–> Enter the following Pattern in the Match URL section: (.*)
–> Check the Ignore case box
9] In the Conditions section, select Match all under the Logical Grouping drop-down menu and press Add
–> Enter {HTTPS} as a condition input
–> Select Matches the Pattern from the drop-down menu
–> Enter ^OFF$ as a pattern
–> Press OK
10] In the Action section, select Redirect as the action type and specify the following for Redirect URL:
https://{HTTP_HOST}{REQUEST_URI}
Un-check the Append query string box. Select the Redirection Type of your choice
after that Verify IIS Site Binding, You have http and https both entries