Freelance Web Developer

Say Hi

Feb 2, 2012

Solution: Blogger Redirect to a country-specific URL (ccTLD)

Google changed a lot of things along with their policies. Google started redirecting blogger blogs to country-specific URL. Everyone was wondering and worrying about the bad effect this thing can cause in the future.

Problem solved, you can now redirect all the users to .com

I applies a simple Hack using JavaScript and its done. At least you can let users to share the .com domain. Here it is -

    window.location.href = ""+location.pathname;

You just have to put this code in SCRIPT tag in your blog template's HEAD.


Ok lets take a test drive if it works, Try to open my domain with .in like

What if you want to redirect to other domains instead of .com?

Here is the code to redirect to .in

    window.location.href = "//"+location.pathname;

What more you can do?

Replace all the interlinks to * (You can do this manually or with JS too)
Link your blog to * instead of * in comments, forums and your public / social profiles.

That's all I know, Feel free to say your thought in comments.
Or reply me on twitter, I am @motyar

Labels: ,

By :