Sunday 2 June 2013

How To Override Blogger Country Specific Blogspot URLs

If you don't know what I mean, it goes like this:

When people from other countries visit your blog like France, the .com shows as .fr (it's pretty annoying for some bloggers) same with Germany (.de), Italy (.it), Sweden (.se), United Kingdom (.uk) and many more.

To get rid of that, simply go to Template > Edit HTML
Then, hit CTRL+F and search for <head>
Copy this code and paste it after <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 = "http://" + blog.substr(0, blog.indexOf("."));
ncr += ".blogspot.com/ncr" + slug;
window.location.replace(ncr);
}
</script>

Instead of .fr .se .de or .it, it will ALWAYS be .com! Hope this helps!

Until next time,
Bunny623

No comments:

Post a Comment

Welcome to the comment section (I guess :P) Don' be inappropriate and mean! Or else... WE WILL FIND YOU.