Redirecting HTTP to HTTPS
Once your SSL certificate is installed, you should force all visitors to use the secure HTTPS version of your site. This protects your visitors and improves your Google rankings.
Method 1: WordPress Plugin (Easiest)
- Install the Really Simple SSL plugin in WordPress
- Activate it
- Click Go ahead, activate SSL!
- Done – the plugin handles the redirect automatically
Method 2: .htaccess Redirect
- Log in to cPanel ? File Manager
- Navigate to
public_html - Open .htaccess (enable Show Hidden Files in Settings if you cannot see it)
- Add this code at the very top of the file:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Method 3: cPanel Redirect
- Log in to cPanel
- In the Domains section, click Redirects
- Set Type to Permanent (301)
- Enter
http://yourdomain.co.zain the from field - Enter
https://yourdomain.co.zain the to field - Click Add
Testing Your HTTPS Redirect
After setting up the redirect, visit http://yourdomain.co.za (without the ‘s’) and confirm it automatically redirects to https://yourdomain.co.za.