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 ^(.*)$$1 [R=301,L]

Substitute with your domain name.

Knowledgebase Article 78,693 views bookmark tags: htaccess ssl website (updated 551 days ago)

Was this resource helpful?

Did this resolve your issue?

Please add any other comments or suggestions about this content:

Recommended Help Content

This article will show a way to protect specific pages of your website with SSL. This may have benefits for SEO and can be used on pages that contain forms, shopping carts or any other page where users might enter sensitive information. (updated 95 days ago)
Knowledgebase Article 1,658 views tags: htaccess pages specific ssl

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

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

Related Help Content

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

When I try to log into my OSCommerce shopping cart using url, my shopping cart isn't the same. It is as though I have 2 carts, one for HTTP (unsecure) an (updated 2128 days ago)
Knowledgebase Article 58,076 views tags: ssl

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

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

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

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

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

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