When I started blogging I was not aware of this, however as I started blogging some question raised inside me automatically and I started digging.
Preventing Blogger blogs to redirect to country specific domain is one of such question I wanted to be solved and I found the way. I found it from Solve My How blog. Previously I tried lots of method but never succeeded. Now it is working perfectly you can browse through my blog.
Well, thank you for reading above lines, coming to the point. Following are the points to do this:
- Go to Blogger and login with your Google credentials.
- Select the blog you want to change the country specific redirect.
- Select "Template" menu from left panel.
- Then Choose "Edit HTML" option.
- Press Ctrl+F to find <head> tag.
- Copy below code and paste exactly after opening <head> tag or before closing </head> tag.
<script type="text/javascript">
var blog = document.location.hostname.split(".");
if (blog[blog.length - 1] != "com") {
var ncr = "http://" + blog[0] + ".blogspot.com/ncr";
window.location.replace(ncr + document.location.pathname);
}
</script>
Bang! we are done now check you blog URLs. If you like it then comment share your tricks or ask questions so we can find out the answers.
No comments:
Post a Comment