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

Cross Origin Request Error

When receiving a cross-origin / cross original request, CORS header 'Access-Control-Allow-Origin'...

Can I setup SSL on my account?

Yes, you can purchase a secure certificate through us so you can use SSL. You can also give us...

Some visitors in China and Russia cannot reach my website

Some networks known for abusive activity such as hacking in countries such as China, North Korea...

“Not Secure” Web Error

In this day and age browsers now default to using https:// instead of http://. We make SSL...

What are these htaccess files that keep popping up?

.htaccess files are default files the server uses to perform certain tasks. Features such as...