Limited OFFER - Yearly 50% OFF HOSTING

Free Domain on Yearly Payment

How to force SSL with Htaccess – Always HTTPS

An SSL (Secure Sockets Layer) certificate provides a secure, encrypted connection between a user’s browser and a website’s server. Having SSL on your website offers a variety of benefits, including securing sensitive data such as login credentials, credit card information, and personal data, and improving search engine ranking. Forcing SSL ensures that all traffic to your website is encrypted, making it difficult for hackers and malicious actors to intercept and steal sensitive information. Therefore, a website should have SSL and should be forced to use SSL for the safety and security of its users.

Force With Htaccess / Redirect to HTTPS on shared Host

1- First, go to your cPanel and Enter Filemanager

2- On your website folder (public_html) edit or create a “.htaccess” file

as the files and folder starts with a dot and are hidden by default you need to activate them on set to show them: Show Hidden Files (dotfiles)

3- Open/Edit the .htaccess file and enter the below content on your .htaccess file and save it

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

4- Done, Now your website is always open in HTTPS with SSL

Please be aware that if there is an existing .htaccess file with content, you should add these codes in the appropriate position in the file. It is recommended to add these codes at the top and as the first item in the file.

You can also always Contact Our support if you face any problems.

Leave a Reply

Quick actions

© 2022 SiteJungle Hosting Inc. All rights reserved.