How to Force SSL on all pages of your website

<span class="fa fa-user"></span>
PHILMOREHOST
how to force http to https
204
0
vps hosting

Using the following code in your .htaccess file automatically redirects visitors to the HTTPS version of your site:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

If you have an existing .htaccess file:

  • Do not duplicate RewriteEngine On.
  • Make sure the lines beginning RewriteCond and RewriteRule immediately follow the already-existing RewriteEngine On.
vps hosting

Website Comments

    • PHILMOREHOST
      Reply

      Yes, it will work without you paying for SSL
      Meanwhile, you need to confirm from your hosting provider if the AutoSSL is activated in your cPanel account

POST A COMMENT.

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Facebook Comments