PREVENT BLOG REDIRECTION TO COUNTRY-SPECIFIC URL.

 On Kamis, 19 April 2012  

I recently came across a tutorial which talks about redirecting blogger blogs back to .com after Google started redirecting blog url to that country's URL.

If you have a blog, e.g yourblog.blogspot.com,the blog might be redirected to yourblog.blogspot.in for some countries.
In other countries,it might be .com.au , .com.uk , .tketc.

As a blog owner,it is necessary to redirect your blog back to .com.
To do this,all you have to do is add some little javascripts into your blogger template.

Go to Design >> Edit HTML.Backup your template in case something goes wrong.

Check the box next to
Expand Widget Template and search for </head> by pressing ctrl+f.

Now,add the following code just ABOVE </head> tag.

<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 = "http://" blog.substr(0, blog.indexOf("."));ncr = ".blogspot.com/ncr" slug;window.location.replace(ncr);}</script>

Preview your blog,& save the template.
Its as simple as that!!!
PREVENT BLOG REDIRECTION TO COUNTRY-SPECIFIC URL. 4.5 5 Unknown Kamis, 19 April 2012 I recently came across a tutorial which talks about redirecting blogger blogs back to .com after Google started redirecting blog url to that...


Related Post:

  • REMOVE BLOGGER 'SHOWING RESULTS/QUERY' MESSAGE FROM YOUR BLOG.Whenever you search for a post,or you click on a label/category on your blog,you will notice some texts at the top of your posts like this 'Showing newest posts with label ..... Show olderposts'.Likewise when you search your blog using the search box… Read More
  • HOW TO DISABLE 'RIGHT CLICKING' ON BLOGGER BLOGS.You would agree with me that not all posts by a blog/website owner are his.Many people tend to copy contents directly from another site,then make some little changes,while other just download it verbatimly.In order to disable your site viewers from c… Read More
  • ADD A SIMPLE SEARCH BOX TO YOUR BLOG/WEBSITE.Many bloggers do not like the default navigation bar of blogger,and they tend to remove it from their blog,thereby losing one peculiar thing which is the search box present in the navigation bar.Although blogger has introduced a search widget,it stil… Read More
  • HOW TO HIDE 'SUBSCRIBE TO:POSTS (ATOM)' IN BLOGSPOT.There are many ways to remove the Subscribe to: Post(Atom) present at the bottom of every new blog.But due to the difference in templates,deleting of some scripts could instigate errors.That's why I'm providing this safer method,which doesn't require… Read More
  • ADD AN AUTOMATIC 'READ-MORE' OPTION TO YOUR BLOG.You all know that blogger has a way of putting the 'Read more' option to blog posts by selecting the 'input jump break'.This is kinda old fashioned,so I 'll be sharing with you how I added a default 'Read more option to my blog.This default style add… Read More

Tidak ada komentar:

Posting Komentar