Blogspot Support Direct HTTPS

Updated on July 12, 2016
As we know that now blogspot already support HTTPS. But after setting HTTPS availability, blogspot URL is not automatically an HTTPS when first accessed. But when there are visitors who commented, then its URL will change to HTTPS. So that when accessed directly blogspot has HTTPS, then we can use the script redirect as well as restore blogspot.co.in to blogspot.com as happened some time ago.

1. To automatically change blogspot URL into HTTPS, we can use a redirect domains, we simply replace the code http be https. This script will change http become https domain blogspot.com. Please save the script below the above code </ head>
<script type = 'text / javascript ">
var blog = document.location.hostname;
var slug = document.location.pathname;
var ctld = blog.substr (blog.lastIndexOf (". "));
if (ctld! = ".com")
  {var ncr = "https: //"+ Blog.substr (0, blog.indexOf (". "));
Ncr + =" .blogspot.com / ncr "+ slug;
window.location.replace (ncr);}
</script>

2. Just change HTTP to HTTPS without changing the blogspot domain. Please save the script under the above code </head>
<script type = 'text / javascript ">
function check_secure ()
{var secssl = / ^ https / i;
var blog = document.location.hostname;
var slug = document.location.pathname;
var subs = window.location.search ;
if (! window.location.origin.match (secssl))
{window.location = "https: //" + blog + Slug +
 subs;}}
check_secure ();
</script> 
Share this: pinterest