Skip to main content

How to redirect visitors to HTTPS?

In case you set a valid certificate for a domain name, we recommend that visitors redirect an unsafe http:// address to secure https://.

You can easily redirect the redirection by modifying the .htaccess file in your document_root folder for that domain name.

Use the following rows in this example to redirect all users of a domain name from insecure (http://) URLs to secure (https://) URLs.

Replace the domain name with your domain name.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*)$1 [R=301,L]