Introduction:

In today's article, I will guide you, How to forcefully redirect your website into HTTPS. Basically, there are two methods to redirect your website into HTTPS.

v First method:

·       Login to your cPanel account and then find out the "Domains" section.

·       After that, click on this Domain's option.

·       On this page, Just enable this "Force HTTPS Redirect" option, and then you can see the website is successfully redirected to HTTPS.

v Second method:

·       Go to your "File Manager", and then go inside to the public_html.

·       Now there is a Hidden file, named ".htaccess". So for seeing it, click on "settings" option, and then select "Show Hidden Files" option, and then click on "save" button.

·       Now here you can see all hidden files will appear.

·       Select ".htaccess" file and then right click on it.

·       Here you can see the "Edit" option, So simply click on it, and then popup box will appear.

·       Again, click on  "edit" button, and then you will be redirected.

·       So now enter the following code inside this file, and don't forget to replace the domain.

RewriteEngine On

RewriteCond %{SERVER_PORT} 80

RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

·       Once you're done, then click on "Save" Changes button.

 

·       Now if you search your website, then it will directly redirect to HTTPS, and your website working flawlessly.

 

 

Var dette svaret til hjelp? 13473 brukere syntes dette svaret var til hjelp (17056 Stemmer)