How can I redirect http to https?

Create an .htaccess file with the following contents and upload it to your public_html directory.

   RewriteEngine On
   RewriteCond %{SERVER_PORT} !443
   RewriteRule (.*) https://www.yourdomain.com/ [R]

another method:

   RewriteEngine On
   RewriteCond %{HTTPS} !=on
   RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
   Header always set Content-Security-Policy "upgrade-insecure-requests;"

  • 503 Users Found This Useful

Was this answer helpful?

Related Articles

How do I parse html files as shtml?

Create an .htaccess file in the directory needed and add the following: AddHandler...

htaccess - Allow Let's Encrypt to Validate and Renew

When receiving the following Let's Encrypt error message:domain.com: The SSL certificate expires...

How do I cancel my account?

We are sorry to hear you would like to cancel your account! If there is anything we can do,...

Convert PDF to HTML Service

To convert your PDF files to html try using the following converter tool from Adobe:...

How to use SharedSSL

SharedSSL is now available with our Ultra Unlimited. It is not as professional looking as having...