If you have successfully set up an SSL certificate for a domain, you will need to add a rewrite rule to that website in order to have it automatically forward to HTTPS instead of HTTP - otherwise you will have 2 versions, potentially damaging your SEO and encounter other issues.
To do this:
- Login to CyberPanel
- Select Websites on the left menu
- Choose the SSL enabled website from the list
- Select “Rewrite Rules” in the Configuration section
- Copy and paste the following code:
rewriteCond %{HTTPS} !on
rewriteCond %{HTTP:X-Forwarded-Proto} !https
rewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
- Now just save your changes, and you’re done!