Can I automatically direct visitors to my site to use secure URLs?

cPanel cPanel Write a comment

Yes, you can - provided that you are using our dedicated IP plan, and have purchased a secure SSL certificate from us.

To redirect all visitors to your site to a secure URL, i.e. https: instead of http:, create these entries in the .htaccess file in your public_html directory:

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$$1 [R,L]

Change to match your site's domain name, of course.

Write comments...
or post as a guest
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.