📣🌞🏖️🏄 Sunny Deals - Summer Sale! | Exclusive offers for Cloud Shared Hosting - 70% OFF | Starting from $3.99/mo

HostArmada Web Hosting Knowledge Base

Knowledge is power! Use that power and achieve total and unconditional control over the Web Hosting Services!

How can I redirect my website to HTTPS?

Why do I need to redirect my website to HTTPS?

A couple of years ago, Google made a statement that a website will be ranked higher than the competition if it had an SSL certificate installed and was redirected to HTTPS. This made SSL certificates a mandatory asset to each website as having higher rankings in search engines is a vital part of your online brand. Installing an SSL certificate, unfortunately, will not be enough as the website also needs to redirect to HTTPS and have no mixed content. Depending on your application, the way that you force HTTPS redirection can vary. We have a great tutorial section on our website, where you can find a way to activate your SSL for the most common open-source applications.

How to force HTTPS redirection via .htaccess?

When the SSL certificate is activated on your application, or you are using a custom script, all that’s left to do is add a redirection rule inside your .htaccess file. Please copy the following code snippet:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

and paste it inside the .htaccess file. After saving the file, please be sure to clear your browser’s cache and visit your website. You should be redirected to HTTPS on your visit!

Conclusion

If your goal is to expand your online brand and make sure that your website gets the most attention from search engines (Google, Bing, Yahoo), then we highly recommend forcing HTTPS redirection on your pages. If you are not comfortable doing this yourself and you have a hosting account with us our technical support team is always available and will be happy to assist you. To contact them, please submit a ticket from your Client Area.

Was this article useful and on point?

Find out more about HostArmada entire range of optimized Web Hosting Services and take action today on improving your website Loading Speed, Security, and overall Stability!