How to Enable HTTPS Redirect in cPanel

There are several ways to redirect your website from HTTP to HTTPS. The easiest method is to use the Force HTTPS Redirect option available in cPanel.

Method 1: Using cPanel

 

  • Log in to your cPanel account.
  • Go to Domains.
  • Find the domain you want to configure.
  • Turn on Force HTTPS Redirect.

Once enabled, visitors accessing your website using http:// will automatically be redirected to https://.

 

Method 2: Using .htaccess

You can also force HTTPS using an .htaccess file.

  1. Open File Manager in cPanel or connect to your account using FTP.
  2. Open the .htaccess file in your website's document root.
  3. Add the following lines:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

  1. Save the file and visit your website using HTTP to verify that it redirects to HTTPS.

Important

Make sure an SSL certificate is already installed and working for your domain before enabling an HTTPS redirect. Otherwise, visitors may receive an SSL connection error.

 

  • 7 Usuários acharam útil
Esta resposta lhe foi útil?

Related Articles

How Do I Point My Domain to DDoSCure Hosting?

After purchasing a hosting plan from DDoSCure, you will receive a hosting service details email...

Can I Upgrade or Downgrade My Hosting Plan Anytime?

Yes. You can upgrade or downgrade your hosting plan at any time without any upgrade or downgrade...

How to Generate CSR From cPanel?

Follow the Instructions Below to Generate CSR For Issuing SSL From SSL Provider. 1-    Login to...

Can I Upgrade or Downgrade My Hosting Plan Anytime?

Yes. You can upgrade or downgrade your hosting plan at any time without any upgrade or downgrade...

Which Hosting Control Panels Does DDoSCure Offer?

DDoSCure offers both cPanel and DirectAdmin as hosting control panel options. You can choose...