Redirect my WordPress website to HTTPS for Web Hosting

Once you’ve installed your SSL certificate into your Hosting account, you’ll need to make some changes to your .htaccess file so that it automatically redirects visitors to an HTTPS version of your WordPress site.

Please note: this process applies to our Web Hosting and Premium Hosting products. If you’ve purchased our Managed WordPress package, you don’t need to change any settings as the protocol will be automatically configured for you.

 

Step 1 of 7

Log in to your WordPress account.

 

Step 2 of 7

Hover your cursor over Settings on the navigation panel and select General from the menu that appears.

Settings

 

Step 3 of 7

Under the ‘WordPress Address (URL)’ and ‘Site Address (URL)’ fields, update the links to state https instead of http.

Address

For instance, http://example.co.uk would become https://example.co.uk

 

Step 4 of 7

Once done, select Save Changes at the bottom of the page.

 

Step 5 of 7

From there, access your Hosting package via the 123 Reg control panel and open your .htaccess file in the /public_html/ folder through the cPanel file manager.

For details on how to do this, read our article ‘Redirect my cPanel website to HTTPS’.

 

Step 6 of 7

Copy the following code and place it at the start of your .htaccess file:

# BEGIN GD-SSL
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_USER_AGENT} ^(.+)$
RewriteCond %{SERVER_NAME} ^coolexample\.com$ [OR]
RewriteCond %{SERVER_NAME} ^www\.coolexample\.com$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
Header add Strict-Transport-Security “max-age=300”
</IfModule>
# END GD-SSL

Important: be sure to change coolexample\.com to your own domain name. You will need to keep the \ character between your domain and its extension (I.e. .com, .co.uk, etc).

Step 7 of 7

Click Save Changes.