Skip to main content

Country Code Aliases Cannot Be Bypassed

Occasionally we see the innocent query in Blogger Help Forum: Something Is Broken, about the recently introduced Blogger feature - country code aliasing.
Is there any way I can opt out from this constantly changing of the .com termination, into .be, .bg, or .ro, depending on where I travel?

Not many Blogger blog owners realise the benefits of country code aliasing, which is, like auto pagination, a feature which is not optional. There are publicly available workarounds, which may bypass the effects of country code aliasing - and which may cause more trouble than simple URL confusion.

Many spammers would love to setup gateway blogs, and automatically redirect their unwitting victims.

Spammers would redirect traffic to dangerous blogs and websites.

The redirections would lead to other blogs (or non Blogger websites) which contain their actual hacking, porn, or spam payload. Blogger / Google, like some browsers and security programs, actively prevents automatic redirection of Blogger blog traffic.

Blogger malware classification is not understood by everybody.

Not all blog owners understand the effect of Blogger malware classification. Similar to spam classification, malware classification persistently scans through Blogger blogs, looking for signs of malware.

Anti-alias redirection code is very simple, and subtle.

Here's an example - a very simple code snippet, recently discovered in the header of the template, in a blog which has been repeatedly locked for "Malicious JavaScript" / "Spam".


or maybe, a more compact snippet

if ((window.location.href.toString().indexOf('.com/'))=='-1') {
window.location.href =window.location.href.toString().replace('','').replace('','');

or maybe


To prevent malware detection from blocking this post, I'm omitting the essential opening and closing tags, which would normally encase the above code snippets.

<script·type='text/javascript'> ... </script>

You can try anti alias redirection code, if you like.

If your blog contains similar redirection code, to bypass country code aliasing, you may get a notice, one day, that your blog has been deleted for "Malicious Javascript". In order to get the blog restored, so your readers may view it, you may have to remove the Malicious JavaScript - then wait until the blog can be reviewed, to ensure that it is safe for public visibility.

When your blog is classified as a malware host, you will suffer.

While you wait for review, you will have to endure the loss of search engine and reader reputation - while every would be reader sees the interstitial notice, mentioning why your blog is deleted or locked.

Work on the problem, don't use (and encourage) dodgy workarounds.

You will accomplish more, and cause yourself (and your readers) less pain, by learning to live with country code aliasing - and concentrating on convincing the various search engines and other Internet services to accept Canonical URLs, so country code aliasing will work, seamlessly, with the Internet service which interests you. Alternately, use better designed gadgets and Internet services.


Abdul Basith said…
Thank you for the information sir!

Is following code is malicious?


if ((window.location.href.toString().indexOf('.com/'))=='-1') {

window.location.href =window.location.href.toString().replace('','').replace('','');


Chuck Croll said…

1. The code is probably not added with malicious intent - but the Blogger malware classifier is not intuitive, and can't identify intent.

2. The code bypasses Country Code Redirection - and CC redirection is a righteous new feature provided by Blogger, which will help Blogger blogs be visible in more countries, worldwide.

Even knowing that the code was probably not added to this blog, with malicious intent, classifying this code as malware is probably the right thing to do, for Blogger blogs in general.

Popular posts from this blog

Stats Components Are Significant, In Their Own Context

One popular Stats related accessory, which displays pageview information to the public, is the "Popular Posts" gadget.

Popular Posts identifies from 1 to 10 of the most popular posts in the blog, by comparing Stats pageview counts. Optional parts of the display of each post are a snippet of text, and an ever popular thumbnail photo.

Like many Stats features, blog owners have found imaginative uses for "Popular Posts" - and overlook the limitations of the gadget. Both the dynamic nature of Stats, and the timing of the various pageview count recalculations, create confusion, when Popular Posts is examined.

Help! I Can't See My Blog!

I just posted to my blog, so I know that it's there. I can tell others are looking at it. But I can't see it.

Well, the good news is you don't have a blog hijack or other calamity. Your blog is not gone.

Apparently, some ISPs are blocking *, or maybe have network configuration or infrastructure problems. You can access or you can access, but you can't access, or

You can't access them directly, that is. If you can access any free, anonymous proxy servers, though, you may be able to access your blog.

Note: You can use PKBlogs with the URL pre packaged. Here is the address of this post (with gratuitous line breaks to prevent the old post sidebar alignment problem):

And an additional URL, to provide to those suffering from this problem, would be the WordPress version of this post: