1. I assume that You already enabled SSL certificate for Your website, for example Let's Encrypt
2. In Your /domains/domain.com/public_html directory create a file named .htaccess, if there is already such a file, edit it and add below code on top of the file.
3. Edit it and paste code:
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
4. Save it and upload to server
Thats all, Your webite should redirect now all requests from http://domain.com to https://domain.com.
- 0 Users Found This Useful