Forcing https on a cPanel website?

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,263
313
Houston

davetanguay

Active Member
Mar 30, 2008
37
1
58
I had issues with using the redirects in cpanel to force SSL. Another option is to add the following to the .htaccess file within /public_html

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