After the SSL of your website has been generated, you will need to redirect your visitors from non-secure HTTP to HTTPS version. Here, we will show you how to do this using the .htaccess file.
After logging in to cPanel, go to file manager > public_html You will see your website files here.
By default, the .htaccess files are hidden. You can view the hidden files on your cPanel account by clicking on Settings at the top
and Check the â Show Hidden Filesâ Checkbox then click âSaveâ.
Now you can create a .htaccess file by clicking on this New File Icon Give the name .htaccess make sure to start the name with (.). Click âCreate New Fileâ
If you already have a htaccess file here, you do not need to create a new one. Now select the htaccess file, click on the âEditâ button from the top section. Then click on the âEditâ button again on the top button to continue, a new window will open.
On the bottom of the document, paste the following code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Keep in mind that the RewriteEngine ON command should not be present on the file more than one time.
RewriteCond and RewriteRule command should be directly under the RewriteEngine command as given above.
Now save the document and exit.
Your website should now redirect from the HTTP version to HTTPS automatically.
If you are still seeing an SSL issue on WordPress, installing Really Simple SSL plugin on WordPress should resolve the issue.