Knowing how to redirect a website to HTTPS is important in today’s time when cyberattacks are becoming more frequent. A major concern for website owners is about protecting sensitive information online and offline. One of the most effective measures you can take to enhance the security of your website is to migrate from HTTP to HTTPS. This transition not only protects your visitors’ data but also improves your website’s credibility and trustworthiness.
By making the switch to HTTPS and implementing proper redirection, you can protect your website and your visitors from potential security threats.
Table of Contents
How To Redirect To HTTPS
There are two methods listed below to use to redirect a website to https://, which will then load a secure padlock on the website’s URL.
Before continuing, please ensure that you have a valid/active SSL Certificate installed on your Hosting package. If you would like to know how to install an SSL Certificate, please click here.
If you have a WordPress site, please refer to Method 1 and then Method 2.
Method 1
- Login to cPanel
- Select ‘File Manager’
- Select Settings and ensure that ‘Show Hidden Files (dotfiles)‘ is ticked, if not please tick and click ‘Save’.
- Go to the website’s public_html directory
- Edit the existing .htaccess file by right clicking on it. Alternatively, click + File and create an .htaccess file. Right click on it.
- Add the following text:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
- Click ‘Save Changes’ (top right)
Your website should now load as https:// be default. If you cannot see it, please clear your browser’s cache.
Method 2
Should you have a WordPress website and have enabled the .htaccess rule (as per Method 1 above), you may still find that the secure padlock icon is still not displaying.
This is due to WordPress tending to load all uploads such as images as http:// instead of https://.
WordPress does have Plugins that can resolve this issue (e.g. Really Simple SSL).
Install one of these plugins to fix the problem.
Additional Information:
Why you should redirect your website to HTTPS
Some of the compelling reasons why you should consider a HTTP to HTTPS redirect for your website includes:
Enhanced Security
HTTPS utilizes encryption protocols to secure any data transmitted between a user’s browser and your website’s server. This encryption thwarts unauthorized access to sensitive information, such as login credentials, payment details, and personal data – preventing potential cyber-attacks and data breaches.
Trust and Credibility
Visitors view websites that use HTTPS as more dependable and trustworthy. The padlock icon and “https://” in the URL indicate that your website is safe and secure to engage with. This increased trust can lead to higher engagement, lower bounce rates, and ultimately, greater conversion rates.
Enhanced SEO –
Secured websites rank higher in search results on search engines like Google. By redirecting your website to HTTPS, you can improve your search engine rankings and attract more organic traffic to your site.
Legal Compliance
To safeguard sensitive consumer data, HTTPS must be used in various industries, including finance, healthcare, and e-commerce, to comply with regulatory requirements. Failure to comply with these regulations can result in severe penalties and reputational damage.
Improved User Experience
Websites that are quick to load and offer a safe environment are more likely to hold visitors’ attention and entice them to explore more. In addition to increasing security.