Search This Blog

Saturday, November 24, 2012

Prevent your Blogger Blog from Redirecting to Country-Specific URLs

Go to your blog inside the Blogger Dashboard and choose Template. Then click the “Edit HTML” button followed by “Proceed.” Next, copy-paste the following code into the template after the <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>
 
Click the Save Template button and now your Blogger Blog will always serve with the blogspot.com URL.

No comments:

Related Posts Plugin for WordPress, Blogger...
Blogger Tips And Tricks|Latest Tips For Bloggers Free Backlinks