How to force SSL with .htaccess

If you want to force your entire website to go through https, you can add these rules to your .htaccess file:







If your site is in a subfolder, use this code:








Simply replace yourdomain.com with your actual domain name.

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

common service port numbers

cPanel         cPanel 2082   cPanel - SSL 2083   WHM 2086...

How To Optimize Wordpress website

 Loading Speed of a Website plays the most important role in its success. According to a report...

How do I enable auto upgrade of Softaculous scripts?

Login to your cPanel account and head over to Softaculous 1. When doing a install, under...

What is considered an Entry Processes?

If you log into cPanel, you will see on the left hand side "Entry Processes" with a number.An...

Why is an addon domain connected to a subdomain?

The process of adding an addon domain involves the creation of the corresponding subdomain. In...