Forcing HTTPS (SSL) on Your Website (Firstserv Guide)

Using SSL (Secure Sockets Layer) ensures that all communication between your website and visitors is encrypted. When SSL is active, your site will display a padlock icon in the browser address bar and use https:// instead of http://.

For improved security, it’s recommended to force all traffic to use HTTPS.


Before You Begin

Make sure your domain has a valid SSL certificate installed, such as:

  • ✅ A free Let’s Encrypt (DV) certificate
  • ✅ A paid SSL certificate (e.g. EV or OV)

⚠️ Without a valid SSL certificate, forcing HTTPS will result in errors.


Recommended Method: Enable HTTPS via cPanel

cPanel provides a simple way to force HTTPS for your domain.

Steps:

  1. Log in to cPanel
  2. Go to the Domains section and click Domains
  3. Find the domain you want to secure
  4. Toggle the Force HTTPS Redirect switch to ON

✅ You’ll see a confirmation message, and all traffic will now be redirected to HTTPS automatically.


Alternative Method: Using .htaccess

If you prefer or need manual control, you can force HTTPS by editing your .htaccess file.


Step 1: Locate the .htaccess File

  • Open cPanel → File Manager
  • Navigate to your website directory (usually /public_html)
  • Locate or create the .htaccess file

Step 2: Add Redirect Rules

Insert the following at the top of the file:

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

Step 3: Save and Test

  • Save the file
  • Visit your site using http://

✅ You should now be automatically redirected to https://


Important Notes

  • 🔒 Forcing HTTPS improves security and trust
  • ⚠️ Ensure your website content is configured correctly for HTTPS
    • Mixed content (insecure assets) may cause warnings

👉 Refer to our separate guide if you need help fixing mixed content issues.


Summary

To force HTTPS on your site:

  • ✅ Use the cPanel Force HTTPS toggle (recommended)
  • ✅ Or configure a redirect in .htaccess manually

Both methods ensure all visitors access your site securely using HTTPS.


If you need help installing SSL or configuring redirects, the Firstserv support team is always happy to assist.

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to disable LiteSpeed connection timeouts

LiteSpeed Timeouts Explained (Firstserv Guide) What is LiteSpeed? All Firstserv hosting...

What file and directory permissions should I use for my web files?

File & Directory Permissions (Firstserv Guide) Setting the correct file and directory...

Where should I upload my website files?

Where Should I Upload My Website Files? (Firstserv Guide) The Short Answer Your website...

How to clear your web browser cache

How to Clear Your Browser Cache (Firstserv Guide) Web browsers store cached data such as...

Using FileZilla to upload files via SFTP(SSH) or FTPS(SSL/TLS)

Setting Up FileZilla (Firstserv Guide) FileZilla is a free, open-source FTP client available...