I have tried all of these methods and have found that managing this in code is one of the easiest ways to accomplish this while providing the most flexibility. Here is some example code that can be used on ASP.NET websites that use either VB.NET or C# in the code-behind pages. You would place the code in the Sub Page_Load Procedure. If you are using a Master Page, you can place this code in the Master Page.vb file (code-behind). Otherwise, you can add it only to the pages in your website that require HTTPS access. VB.Net C# Additionally, if you are running IIS 7.0 or greater, I would recommend that you take advantage of URL Rewriting. Of course, before you can allow SSL connections on your web server, you’ll need to configure the web server accordingly.