nabinbajracharya.com.np

S.E.O, social marketing and affiliation

Cpanel Redirect HTTP to HTTPS automatically

8.2kViews

Why SSL is important


SSL is essential for protecting your website, even if it doesn’t handle sensitive information like credit cards. It provides privacy, critical security and data integrity for both your websites and your users’ personal information.

How to Redirect HTTP to HTTPS automatically in Cpanel


In Cpanel follow this process.

  • Log into your cPanel 
  • In the Domains section, click the Domains icon.
  • This will open a page where you can toggle the HTTPS redirect on or off. We recommend leaving it on. If there is no option to enable HTTPS, it’s because that domain does not have SSL installed. First make sure SSL is installed and the option will present itself.

our domain should now be using HTTPS. Enforcing SSL for Addon domains: Linux uses .htaccess files to handle redirection. You may need to create a .htaccess file, and you can use your control panel’s File Manager. U

Enforcing SSL for Addon domains:

our domain should now be using HTTPS.

Enforcing SSL for Addon domains:

Linux uses .htaccess files to handle redirection.

You may need to create a .htaccess file, and you can use your control panel’s File Manager.

Using the following code in your .htaccess file automatically redirects visitors to the HTTPS version of your site:

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

If you have an existing .htaccess file:

  • Do not duplicate RewriteEngine On.
  • Make sure the lines beginning RewriteCond and RewriteRule immediately follow the already existing RewriteEngine On.

Advertisement

1047 Shares