{"id":46,"date":"2017-10-05T10:31:04","date_gmt":"2017-10-05T10:31:04","guid":{"rendered":"https:\/\/www.websupporters.com\/support\/knowledgebase\/?post_type=ht_kb&amp;p=46"},"modified":"2017-10-05T10:31:04","modified_gmt":"2017-10-05T10:31:04","slug":"redirect-website-http-https-windows-hosting","status":"publish","type":"ht_kb","link":"https:\/\/www.websupporters.com\/support\/knowledgebase\/kb\/redirect-website-http-https-windows-hosting\/","title":{"rendered":"How to redirect Website from HTTP to HTTPS in windows hosting?"},"content":{"rendered":"<p>WebSupporters Windows servers support IIS URL Rewrite module. If you have an SSL certificate\u00a0on your website, you can use this module to automatically redirect your website visitors from HTTP to HTTPS.<\/p>\n<h2 id=\"how-to-redirect-website-from-http-to-https-in-windows-hosting-with-iis\">How to redirect the Website from HTTP to HTTPS in windows hosting with IIS?<\/h2>\n<ol>\n<li>Be sure that the SSL Certificate is properly installed on your domain, and the website is resolving on your domain like https:\/\/example.com<\/li>\n<li>Create a\u00a0<strong>web.config<\/strong>\u00a0file under the site\u2019s directory and add the following lines to it. In case there already exists a\u00a0<strong>web.config<\/strong>\u00a0in your site\u2019s directory, carefully edit it to add these lines:\n<pre>&lt;?xml version=\"1.0\"?&gt;\n&lt;configuration&gt;\n\u00a0 &lt;system.webServer&gt;\n\u00a0 \u00a0 \u00a0&lt;rewrite&gt;\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0&lt;rules&gt;\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0&lt;rule name=\"Redirect to HTTPS\" stopProcessing=\"true\"&gt;\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0&lt;match url=\"(.*)\" \/&gt;\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;conditions&gt;\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;add input=\"{HTTPS}\" pattern=\"^OFF$\" \/&gt;\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;\/conditions&gt;\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0&lt;action type=\"Redirect\" url=\"https:\/\/example.com\/{R:1}\" redirectType=\"Permanent\" \/&gt;\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0&lt;\/rule&gt;\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0&lt;\/rules&gt;\n\u00a0 \u00a0 \u00a0&lt;\/rewrite&gt;\n\u00a0 &lt;\/system.webServer&gt;\n&lt;\/configuration&gt;<\/pre>\n<\/li>\n<li><strong>example.com<\/strong>\u00a0needs to be replaced by the Domain Name for which the SSL Certificate is issued.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>WebSupporters Windows servers support IIS URL Rewrite module. If you have an SSL certificate\u00a0on your website, you can use this module to automatically redirect your website visitors from HTTP to HTTPS. How to redirect the Website from HTTP to HTTPS in windows hosting with IIS? Be sure that the SSL&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[3],"ht-kb-tag":[],"class_list":["post-46","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-windows-hosting"],"_links":{"self":[{"href":"https:\/\/www.websupporters.com\/support\/knowledgebase\/wp-json\/wp\/v2\/ht-kb\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.websupporters.com\/support\/knowledgebase\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.websupporters.com\/support\/knowledgebase\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.websupporters.com\/support\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.websupporters.com\/support\/knowledgebase\/wp-json\/wp\/v2\/comments?post=46"}],"version-history":[{"count":0,"href":"https:\/\/www.websupporters.com\/support\/knowledgebase\/wp-json\/wp\/v2\/ht-kb\/46\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.websupporters.com\/support\/knowledgebase\/wp-json\/wp\/v2\/media?parent=46"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.websupporters.com\/support\/knowledgebase\/wp-json\/wp\/v2\/ht-kb-category?post=46"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.websupporters.com\/support\/knowledgebase\/wp-json\/wp\/v2\/ht-kb-tag?post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}