loading

How to forcefully redirect your website into HTTPS

Updated at
14/09/2022
Views
2687

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.

YottaSrc footer

why choose us?

Better Pricing, Fast SSD Storage and Real 24/7
Technical Support.

control panel icon
cPanel

Managing Your Site Through CPanel With The Latest Version

security icon
FAST, RELIABLE & SECURE

99.8% Uptime Guarantee.
So Focus On Your Work!

support icon
24/7/365 Support

Day or night, rain or shine,
our team is here for you!

cloud backup icon
Daily Backup

Daily & Weekly Backup.
Your Files Are Safe!