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 to create a temporary 302 redirect via htaccess

An easy way to create a temporary redirect from one page to another web page is to use the 302...

I can not move out of the / directory, why not?

For security reasons, you cannot move out of the root folder of your own domain.

Adding HTML to Site Builder

When adding HTML code/source in site builders be sure you are in HTML mode. There is often a...

Convert PDF to HTML Service

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

Creating a Form Button

Sometimes all you need is a simple button. The following pages are pretty useful tools for...