Redirect my WordPress website to HTTPS for cPanel hosting
After your SSL certificate is installed on your cPanel (Linux) hosting account, there are some modifications you’ll need to make to your
.htaccess file to automatically redirect your visitors to an HTTPS version of your website.
Note: These instructions don’t apply to Managed WordPress accounts with an SSL certificate. The HTTPS redirect is automatically enabled after the SSL certificate install finishes on a Managed WordPress account.
- Log into your WordPress Dashboard.
- Hover over Settings on the left navigation panel, then click General .
- Locate the following fields on the new page:
- WordPress Address (URL)
- Site Address (URL)
- In each field, update your URLs to include https instead of http .
- Scroll down to the bottom of the page and click Save Changes .
- Open your current
.htaccessfile in the
/public_html/folder with the cPanel file manager for editing. If you don’t already have a
.htaccessfile, you’ll need to create one.
- Insert the following code at the top of your
- Click Save Changes at the top-right corner of the screen.