How do I automatically redirect my HTTP website to HTTPS?

This article will show you how to redirect your ‘http’ website to ‘https’ within your hosting account.

After you’ve installed an SSL Certificate on your website, you’ll need to change your setup so that it automatically redirects users to its secure version: HTTPS. Simply click the relevant title from this list below and follow the provided instructions to get started:

Via Linux Web Hosting

Step 1 of 4

Start by accessing cPanel.

Step 2 of 4

From there, click Domains within the Domains section.

Step 3 of 4

On the next page, scroll down to the Force HTTPS Redirect section and click the toggle for the domain you want to redirect.

Step 4 of 4

After a few moments, you will receive a confirmation message stating that your website will redirect to HTTPS.

Via Windows Web Hosting (WordPress websites)

Step 1 of 6

Start by logging in to your WordPress admin.

Step 2 of 6

From there, click Settings in the left-hand menu, followed by General.

Step 3 of 6

Change the WordPress URL and Site URL to state https. Once you’ve done this, click Save Changes.

Step 4 of 6

Next, access your httpdocs folder and create a new file called web.config.

Step 5 of 6
  • Insert the following into your web.config file:

    <configuration>

    <system.webServer>

        <rewrite>

            <rules>

                <clear />

                <rule name=”Redirect to https” stopProcessing=”true”>

                    <match url=”(.*)” />

                    <conditions>

                        <add input=”{HTTPS}” pattern=”off” ignoreCase=”true” />

                    </conditions>

                    <action type=”Redirect” url=”https://{HTTP_HOST}{REQUEST_URI}” redirectType=”Permanent” />

                </rule>

                          <rule name=”Main Rule” stopProcessing=”true”>

            <match url=”.*” />

            <conditions logicalGrouping=”MatchAll”>

                <add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true” />

                <add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true” />

            </conditions>

            <action type=”Rewrite” url=”index.php/{R:0}” />

        </rule>

            </rules>

        </rewrite>

    </system.webServer>

</configuration>

Step 6 of 6

Once done, save your web.config file.

Via Windows Web Hosting (non-WordPress websites)

Step 1 of 6

Start by accessing your Web Hosting dashboard.

Step 2 of 6

From there, select Plesk Admin.

Step 3 of 6

On the next page, select File Manager for the domain name you want to use.

Step 4 of 6

Choose web.config from the list of files.

Step 5 of 6

Your file will now open in an editor. From here, add the following entry to it:

<rewrite>

    <rules>

                <rule name=”HTTP to HTTPS redirect” stopProcessing=”true”>

                    <match url=”(.*)” />

                    <conditions>

                <add input=”{HTTPS}” pattern=”off” ignoreCase=”true” />

                    </conditions>

                    <action type=”Redirect” redirectType=”Permanent” url=”https://{HTTP_HOST}/{R:1}” />

        </rule>  

    </rules>

</rewrite>

Step 6 of 6

Once you’ve done this, scroll down and click OK to save your changes.