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

Why is my account suspended?

Why is my account suspended? If you are receiving an account suspended page when trying to access...

Error 404 - File Not Found

Files are case sensitive. Make sure you are typing the address in correctly. Verify that the...

Cross Origin Request Error

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

Create a 410 Redirect for Missing Files

A redirect which is often forgot about is the 410 redirect. This is search engine friendly in the...

Domain Slamming - Beware

There are several companies out there using a predatory practice of attempting to have you renew...