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.
Search
Popular Posts
How to install SitePad website builder premium themes in your site for free
14/11/2022
Securing Linux servers Ubuntu/Debian/Alma/CentOS with Iptables and UFW Firewall
18/04/2024
Step by step guide to set up Cloudflare for your website
04/12/2023
How to configure IPv6 on your server [DHCPv6]
04/12/2023