How To Force SSL On All Pages In .htaccess File
Forcing All Pages
You can force all of your pages to use HTTPS. To do this, you will need to modify your .htaccess file.
Using the Code Editor in the File Manager, add these lines to the beginning of the .htaccess file.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Forcing Specific Pages
To set up SSL protection on specific pages, you must edit the .htaccess file specific to that domain. For more information on how to access the .htaccess, please see this article .htaccess Tutorial.
Note: The Advanced tab will load your cPanel. Legacy accounts will feature a horizontal navigation bar at the top of the screen, while Bluerock account users will see a vertical navigation menu on the left-hand side of the screen. To learn more, please see Bluerock vs. Legacy.
Edit The .htaccess File
Access the .htaccess file inside the file manager:
Bluerock Account

- Log in to your Bluehost control panel.
- Click the Advanced tab on the left-hand side menu.
- Under the File section, click the File Manager icon.
- Look for the Settings button located towards the upper right corner of your screen.
- From here, click the Preferences pop-up, then click the checkbox for Show Hidden Files (dotfiles).
- Scroll to locate the .htaccess file from the list.
Legacy Account

- Log in to your Bluehost control panel.
- Click the File Manager icon located in the file section.
- From the file manager pop-up settings, choose the folder you would like to open, most often the WebRoot (public_html/www).
- Under the Preferences, make sure the Show hidden files is checked.
Note: If you do not see this pop-up, you will need to click the reset all interface settings link at the bottom of the cPanel page.
- Click the Submit button.
- The File Manager will open in a new tab or window.
- Look for the .htaccess file in the list of files. You may need to scroll to find this file.
Then proceed to the steps below, which will explain how to edit the file to add protection.
- Right-click on the .htaccess file and select the Edit option.
- A pop-up message will appear, then click the Edit button.
- At the top of the file, insert the following code:
RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} /[SSL Requested page]/ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
- Click the Save Changes button towards the top right corner of your screen.
- Check your website to ensure it is functioning as expected.
If that doesn't work, you can try using this default cPanel code.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://example.com/$1 [R,L]
Note: Make sure to replace example.com with your domain name. Don't forget to Save Changes when finished.
If you need further assistance, feel free to contact us via Chat or Phone:
- Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
- Phone Support -
- US: 888-401-4678
- International: +1 801-765-9400
You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.