Just Host 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 177,287 views bookmark tags: htaccess ssl website


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.
Knowledgebase Article 29,000 views tags: htaccess pages specific ssl

How to use a WildCard SSL Certificate
Knowledgebase Article 101,250 views tags: htaccess reseller ssl subdomain subfolder wildcard

How to force a resold account's owner to update their password
Knowledgebase Article 59,288 views tags: force password reseller resold whm

Related Help Content

What is the .htaccess file and where can I find more information?
Knowledgebase Article 1,785,156 views tags: htaccess tips tricks

This article explains error pages and how they can be customized.
Knowledgebase Article 204,962 views tags: customize pages

When I try to log into my OSCommerce shopping cart using https://secure.Justhost.com/~username url, my shopping cart isn't the same. It is as though I have 2 carts, one for HTTP (unsecure) an
Knowledgebase Article 73,695 views tags: commerce cookie oscommerce ssl

How to add a new SSL certificate for your different WM services.
Knowledgebase Article 61,838 views tags: ssl whm

Where do I get a copy of the site seal for my SSL I purchased through Just Host?
Knowledgebase Article 219,747 views tags: cert image logo seal secure ssl

How do I perform a URL redirect/rewrite using the .htaccess file?
Knowledgebase Article 1,316,190 views tags: htaccess redirect rewrite url

How to renew an existing SSL certificate--or purchase a new one, within your cPanel
Knowledgebase Article 130,266 views tags: cert certificate layer secure security socket ssl

How to run CGI scripts for Addon domains.
Knowledgebase Article 107,758 views tags: cgi htaccess