Force /Use Shared SSL

Forcing HTTPS on All Traffic

One of the many functions you can perform via .htaccess is the 301 redirects, which permanently redirects an old URL to a new one. You can activate the feature to force HTTPS on all incoming traffic by following these steps:

  1. Go to File Manager in your hosting panel and open .htaccess inside the public_html folder. If you can’t locate it, make sure to create or unhide it.
  2. Scroll down to find RewriteEngine On and insert the following lines of code below it:
    1. RewriteEngine On
    2. RewriteCond %{HTTPS} off
    3. RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  3. Save the changes.
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to Install a SSL/TLS certificate

SSL (Secure Sockets Layer) or TLS (Transport Layer Security) technology should be the first...

Powered by WHMCompleteSolution