HostMonster Web Hosting Help

Force SSL on 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 %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]

Substitute example.com with your domain name.

Knowledgebase Article 69,157 views bookmark tags: htaccess ssl website (updated 428 days ago)


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

What to do if Google has indexed your addon domain with https (updated 1323 days ago)
Knowledgebase Article 25,783 views tags: google htaccess https index

How to use a WildCard SSL Certificate (updated 128 days ago)
Knowledgebase Article 41,045 views tags: htaccess reseller ssl subdomain subfolder wildcard

What is the .htaccess file and where can I find more information? (updated 712 days ago)
Knowledgebase Article 1,404,474 views tags: htaccess tips tricks

Related Help Content

This article explains error pages and how they can be customized. (updated 779 days ago)
Knowledgebase Article 106,533 views tags: customize pages

When I try to log into my OSCommerce shopping cart using https://secure.HostMonster.com/~username url, my shopping cart isn't the same. It is as though I have 2 carts, one for HTTP (unsecure) an (updated 2005 days ago)
Knowledgebase Article 56,471 views tags: ssl

How to add a new SSL certificate for your different WM services. (updated 692 days ago)
Knowledgebase Article 20,387 views tags: ssl whm

Where do I get a copy of the site seal for my SSL I purchased through HostMonster? (updated 974 days ago)
Knowledgebase Article 171,105 views tags: cert image logo seal secure ssl

How do I perform a URL redirect/rewrite using the .htaccess file? (updated 26 days ago)
Knowledgebase Article 626,332 views tags: htaccess redirect rewrite url

How to renew an existing SSL certificate--or purchase a new one, within your cPanel (updated 58 days ago)
Knowledgebase Article 49,826 views tags: cert certificate layer secure security socket ssl

How to run CGI scripts for Addon domains. (updated 981 days ago)
Knowledgebase Article 82,747 views tags: cgi htaccess

To help with installing an SSL certificate for an account on a dedicated server through the WHM (updated 129 days ago)
Knowledgebase Article 60,997 views tags: assign dedicated server ssl whm