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

Error 508 / 503 - Resource Limit Reached

To help maintain the stability of servers and keep websites fast, UltraWebHosting has resource...

How can I change the default page / document?

Create a .htaccess file, include the below information into it and upload it to the public_html...

What is a virtual Domain?

A virtual domain is the base URL of the domain name. Examples include yourdomain.com, and...

301 Redirect

This code will redirect all visitors who attempt to access the old-url.html page to the...

Do you have a firewall?

Yes, our servers have firewalls. For security we close off unused ports and update the server...