In this tutorial, I will show you two cPanel methods to redirect users from HTTP to HTTPS. Before proceeding, a valid SSL certificate must be installed. It is also wise to set a redirect to HTTPS through an .htaccess file.
Please note that this tutorial is part of a series to help secure a WordPress blog. Some of these tips might not apply depending on the hosting environment. The following topics are covered:
- Setting up an SSL certificate
- Redirecting users to HTTPS
- Installing WordPress securely
- .htaccess for WordPress security
- php.ini for WordPress security
- Security plugins
- Security maintenance
In this method, we switch “Force HTTPS redirect” to “on” in the domains list, which is only available to cPanel versions 80 and above. Some hosts/hosting plans do not allow you to do this, in which case a quick Google search of “Force HTTPS redirect + Host name” should yield a tutorial for the specific host.
First log into your cPanel and navigate to “Domains” under the “Domains” tab.
Scroll to the domain you would like to redirect to HTTPS and switch on “Force HTTPS redirect”.
In this second method, we set a HTTPS redirect through the “Redirects” list.
First log into your cPanel and navigate to “Redirects” under “Domains”.
Select your domain name under “https?://(www.)?” and set “Redirects to” to “https://” + your domain name. All other settings should remain as-is.
Finally, click “Add”.
In summary, one can redirect users to HTTPS from the cPanel through both the domains or redirects lists located under the “Domains” tab. Remember that it is wise to set HTTPS redirect through an .htaccess file as well.
Let me know if any of these methods worked for you. If they did not, what did?