How to Redirect your Website to HTTPS

Before proceeding, ensure you have a valid and active SSL certificate installed on your hosting package. Below are two methods to load your website as https://, which will display a secure padlock icon in your URL. If you have a WordPress site, follow Method 1 first, then Method 2.

Method 1:

  1. Log in to cPanel.

  2. Select File Manager.

  3. Click Settings and ensure that Show Hidden Files (dotfiles) is checked; if not, check it and click Save.

  4. Navigate to the website’s public_html directory.

  5. Edit the existing .htaccess file by right-clicking it, or create a new .htaccess file and then right-click to edit.

  6. Add the following text:

     
    RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  7. Click Save Changes (top right).

Your website should now load as https:// by default. If you don’t see this change, please clear your browser cache.

Method 2:

If you have a WordPress site and have enabled the .htaccess rule as described in Method 1, you may still notice that the secure padlock icon is not displaying. This issue occurs because WordPress often loads uploads, such as images, as http:// instead of https://.

To resolve this, consider using WordPress plugins like Really Simple SSL that can help enforce secure connections throughout your site.

  • 0 Els usuaris han Trobat Això Útil
Ha estat útil la resposta?

Articles Relacionats

How do I know what is the Best Hosting Option for my Website?

Your hosting choice will depend on the required disk space, number of MySQL databases, email...

How to Protect your Images and TMP Directories

Most websites require their images and temporary directories to have full write access to store...

How To Restore or Download Data Using cPanel’s Acronis Backup Module

In this tutorial, we will explore how to restore or download data using cPanel’s Acronis Backup...

I want to Test my Website Live, but I don't want the public to see it.

A Coming Soon or Under Construction page serves as a placeholder while your website is being...

If I Register a Domain Name with Bowhosts must I have my Hosting with you as well?

A domain is essentially an address that web browsers use to locate your website and access your...