If you have an SSL certificate installed as shown in the "SSL/TLS Status" tool in cPanel but your domain isn't loading securely by default, you can edit your .htaccess file to fix it.
Â
- When logged in to cPanel, click the "File Manager" icon.
- Open the web root directory for the domain in question - if it is your primary domain name, the web root will be public_html.
- Click "Settings" in the top right corner of the page.
- Check the box next to "Show Hidden Files (dotfiles)".
- Click "Save".
- Find the file named ".htaccess" in the list. If there is no .htaccess file, click the "+File" icon at the top of the page to create a file and name it .htaccess.
- Right click the .htaccess file and select "Edit" from the list.
- Paste the following code into the bottom of the .htaccess file after any other code that is already present:
Â
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
Â
Click the blue "Save Changes" button at the top of the page to save the edit.