Diadem Technologies Hosting Knowledgebase

How to redirect Website from HTTP to HTTPS in windows hosting

Article ID: 1111
Last updated: 30 Mar, 2020

Steps to redirect Website from HTTP to HTTPS in Windows hosting

         Description: Be sure that the SSL Certificate is properly installed on your domain,

                              and the website is resolving on your domain like https://example.com

           Method 1: Redirecting Website from HTTP tp HTTPS in through Plesk Panel.

                            Step 1: Log in to your website hosting Plesk panel

                           Step 2: Go to the Website and domain and select the website for which you want to redirect from HTTP to HTTPS.

                                        

                         Step 3: Click on the icon Hosting Settings.

                                     

                              Step 4:  Check the checkbox beside permanent SEO-safe 301 redirect from HTTP to HTTPS

                                            then click OK to finish your website will be redirected to HTTPS.

                                        

            Method 2: Create a web.config file under the site’s directory and add the following lines to it.

                             In case there already exists a web.config

                               in your site’s directory, carefully edit it to add these lines.

                <?xml version="1.0"?>
                <configuration>
               <system.webServer>
                <rewrite>
                <rules>
                <rule name="Redirect to HTTPS" stopProcessing="true">
                <match url="(.*)" />
                <conditions>
                <add input="{HTTPS}" pattern="^OFF$" />
                </conditions>
                <action type="Redirect" url="https://example.com/{R:1}" redirectType="Permanent" />
                </rule>
                </rules>
                </rewrite>
                </system.webServer>
               </configuration>

            example.com needs to be replaced by the Domain Name for which the SSL Certificate is issued.

This article was:  
Report an issue
Article ID: 1111
Last updated: 30 Mar, 2020
Revision: 4
Views: 347
Comments: 0