Redirect your http website to https

.htaccess file stands for HyperText access is a configuration file which is used by Apache-based web servers, it is a hidden text file within your hosting account designed to change the behavior of your website.

If you have a secure certificate (SSL) for your website, you can redirect your http site to https by using below steps.

Step 1. Log into your cPanel.
Step 2. Find and click on the "File Manager"


Step 3. Click Settings at the top right corner.


Step 4. Select the "Document Root for" your domain and make sure "Show Hidden Files" is checked. Click the Save button.


Step 5.  Look for the .htaccess file, right click on it and click on the "Edit" option.


Step 6.  Now You are in the htaccess editor, paste the following code at the top of the file to redirect it to https

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

Step 7.  Now hit the "Save Changes" button in the top right corner to save your htaccess configuration.

Was this article helpful?

Yes No

Have more questions? Contact our Support Team

  • 174 users found this useful

    Support