IIS - Redirect website to https

The redirect from http to https in IIS can be accomplished with the following code added in the web.config file of the website:

`

           

               

                   

                   

                       

                   

                   

               

           
`

This code should be added in the section in the web.config file. For example:

`xml version="1.0" encoding="UTF-8"?

   

         

           

               

                   

                   

                       

                   

                   

               

           

       

       

       

           

               

               

               

               

               

               

               

           

       

   
`