How to redirect SSL http to https

Automatic redirect your SSL http to www.https please follow the instructions below:

You use Linux server hosting follow first instruction and use windows hosting please follow the second instruction.

1. Go to your cpanel

2. now go to cpanel file manager and open domain root folder

3. find and click the .htaccess file and not show the htaccess file to see your cpanel right side and select settings and click “Show Hidden Files (dotfiles)” and save, now show the htaccess file.

4. now edit the .htaccess file

5. include the code below:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

6. now save the file and test your website it works.



if applies and uses windows server to follow some different way.

1. login your windows server control panel

2. go to domain root folder

3. create a new file and rename the file: web.config

4. include the code below in web.config file

<rule name=”HTTP to HTTPS redirect” stopProcessing=”true”>
<match url=”(.*)” />
<add input=”{HTTPS}” pattern=”off” ignoreCase=”true” />
<action type=”Redirect” redirectType=”Permanent” url=”https://{HTTP_HOST}/{R:1}” />

4. now save file and check your website it working.

SSL auto redirects very important for security, follow the instructions and easy way to redirect the domain SSL certificate. and your client looks your website more secure green bar.

  • ssl, ssl certificate, ssl redirect, ssl certificate redirect, http to https, http to https redirect
  • 427 Users Found This Useful
Was this answer helpful?