Nagpur Cha SysAdmin is a blog about tips, tricks, free PowerShell scripts, free tools and easy solutions for various day to day and advance tasks of system administrators.

Search This Blog

Monday 9 October 2017

Force Blogger blog to run on HTTP only

Hi All,

At the initial phase of my blog I was happy with the HTTPS redirect feature of blogger, which forces all viewers request to be served over HTTPS encrypted protocol which is a good thing and being a System Admin I would always welcome it.

However, as this blog does not host any confidential data like credentials, card info etc. this blog won’t get Impacted if it runs on HTTP only.
Now you might be thinking, but why I want my blog to be served over HTTP only…
The answer is, because there are few plugins on my blog which are not compatible with HTTPS protocol as they are coming from 3rd party. Therefore, I needed this and got it configured.

Please note that, there are no ways which are offered by blogger to force all viewers requests to be served over HTTP only.
All you need to this via tag and JS script. Follow the below steps
 
1. Open your Blogger Dashboard > Theme > Choose Edit HTML.

Note: You should always take template backup before editing it.


2. Locate </head> tag 




3. Now copy the below script and paste just above the  tag as shown in step 2 figure.

<script>
    if (window.location.protocol == "https:") {
      console.log("You are not connected with the correct protocol.")
      console.log("Reloading the page to the correct protocol...")
      window.location = document.URL.replace("https://", "http://");
    }
    if (window.location.protocol == "http:") {
      console.log("You are connected with the correct protocol.")
    }
</script>

4. Now Save the template
5. You are  done!! now test your blog

Kindly Share your experience in comment section with my blog/post if it did help you !!

Stay Blessed!!  
Thank You!!

1 comment:

Comments system