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

Whitelisting Our Support System Email Address

Whitelist Instructions Because we use often use html emails with http addresses in them, our...

My site was hacked

This typically occurs when you are running a script/app on your website which is out-dated and...

What are all these htaccess files?

.htaccess files are used to perform certain rules such as displaying a 404.shtml file in replace...

Is it possible to make a cron to backup my database at specific times?

Yes, this can be very useful for forum/message board sites with large databases. In your control...

Domain Slamming - Beware

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