Force redirect website to the SSL Certification connection using .htaccess file

Modified on Thu, 15 Aug, 2019 at 4:37 PM

You may need to edit the below code in your .htaccess file: 

++++++++++++++++++++++++++++++++++++++++++++++++

RewriteEngine On

RewriteCond %{SERVER_PORT} 80

RewriteCond %{HTTP_HOST} ^(www\.)?yourdomainname\.com$ [NC]

RewriteRule ^(.*)$ https://yourdomainname.com/$1 [R=301,L]

++++++++++++++++++++++++++++++++++++++++++++++++


Note: If you are a windows user you may proceed to let our support knows on the rules on which your side wish to redirect the website as windows base hosting do have a different type of rules to be implemented from the back end.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article