http to https

Why it is important to redirect HTTP websites to HTTPS and How?

2 minutes, 28 seconds Read

We all now that security of website is very important. There are so many websites in the internet world; some are secure and some are not. So, how to analyze if the website is secure or not. It could be possible with SSL(Secure Sockets Layer). It is a standard security protocol that is established between the web server and browser in an online communication. Thus, it is very important. It is said that SSL is the first level of security that is added to each website.

Now moving towards the topic, why it is important to redirect HTTP to HTTPS. The answer to this question is security. Yes, it is for the security of the website. HTTP is a protocol that is used to establish communication within the server and the user, that is Hyper Text Transfer Protocol and when SSL get installed to the particular website then it becomes HTTPS, i.e, Hyper Text Transfer Protocol Secure.

You can easily install SSL for your website from Free SSL. Many of the service providers like REDSERVERHOST provide Free SSL service in the hosting plans. You may refer to their plans at

Even if you do not have Free SSL feature in your hosting plan, then also you did not have to pay any charges to get this. Simply use any of the below mentioned ways and redirect your HTTP website to HTTPS.

How to redirect HTTP website to HTTPS?

You can easily redirect your HTTP website to HTTPS by using any of the below mentioned steps.

  • Login to your cPanel account and get inside File Manager section.
  • Get inside the domain directory of which you want to add redirection.
  • Right click over .htaccess file and then Edit.

Now, you can add HTTPS redirection to your website by the below given steps. Edit the file as per your choice.

  • Redirecting All Web Traffic

This procedure will help you to add HTTPS redirection to all your webpages. Copy and paste the below given code in .htaccess file.

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$$1 [R,L]

*Replace the with your domain name.

  • Redirect only a Specific Domain

You can redirect only a specific domain by using the below given code. Edit .htaccess file inside root directory of your website, i.e, file inside public_html.

RewriteEngine On 
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$$1 [R,L]
  • Redirect Only a Specific Folder

You can also add redirection to a specific folder by using the below given code. Edit .htaccess file inside a particular directory to redirection.

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteCond %{REQUEST_URI} folder 
RewriteRule ^(.*)$$1 [R,L]

*Replace folder with the directory name to which you want to add redirection.

Now, you can easily add HTTPS redirection to your HTTP website as per your choice.

Also Read: The Complete Guide to Website Hosting for Absolute Beginners

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *