How to Force HTTPS on Your Website

Once your SSL certificate is installed, you need to tell your website to always use https://. Visitors who type http:// or just your domain without https:// will be automatically redirected.

Method 1: Via cPanel (Easiest)

  1. Log in to cPanel.
  2. In the Domains section, click Domains.
  3. Find your domain and look for the 'Force HTTPS Redirect' toggle.
  4. Enable the toggle. HTTPS is now forced for that domain.

If this option is not available, use Method 2.

Method 2: Via .htaccess File

  1. Log in to cPanel and open File Manager.
  2. Navigate to your public_html folder.
  3. Look for a file named .htaccess. If you do not see it, click Settings at the top right of File Manager and tick Show Hidden Files.
  4. Right-click .htaccess and click Edit (or create a new file named .htaccess if it does not exist).
  5. Add these lines at the top of the file (before any existing content):

RewriteEngine On

RewriteCond %{HTTPS} off

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

  1. Click Save.
  2. Test by opening your site with http:// in the browser — it should redirect to https://.

Important: Always make a backup of your .htaccess file before editing it. A mistake in .htaccess can make your entire website inaccessible.

Method 3: WordPress Sites — Using a Plugin

If your site runs WordPress, install the Really Simple SSL plugin. It forces HTTPS and fixes mixed content warnings with one click.

Note: If you are using Cloudflare, enable 'Always Use HTTPS' in your Cloudflare SSL settings instead of editing .htaccess.

 

  • HTTPS, force HTTPS, cPanel, .htaccess, redirect HTTP, SSL redirect
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Install a Free Let's Encrypt SSL Certificate

An SSL certificate encrypts the connection between your website and your visitors' browsers. It...

How to Unblock Your IP Address

If you suddenly cannot access cPanel, webmail, or your website and see a 'Connection refused' or...

How to Handle a Hacked WordPress Site

A hacked WordPress site can damage your reputation, get you blacklisted by Google, and harm your...

Powered by WHMCompleteSolution