How to prevent redirecting blogspot.com into blogspot.in [Prevent ccTLD]


#1

Hello everyone

my blog address is on blogspot.gr domain (I live in Greece) When I share my posts on google+ blog domain change automatically to .com the same happened on fb - ok- BUT today while I was sharing my post on FB, blog domain have been changed automatically into blogspot.in ( for G+ stays .com) I checked all my posts and I’ve noticed that only some of them are redirected to .in

Is that problem? Why is this happening? How can i fix it?

Could someone of you help me with that?


Is preventing ccTLD healthy for SEO?
#2

@Shivansh , I got tricked by reading the Title. Thanks!


#3

well, @GKVish, First read the post. He is asking about another problem. He is not asking about redirection. I think, the title of this post is wrong. I was also tricked when I saw the title but when i read the main problem, I understood what is he asking.


#4

@Shivansh yes… had no clue how to name the issue, sorry for the confusion …since this is not about redirecting, then what is it?


#5

Hello Renata, Prevent Blogger from Redirecting to Country-Specific Domains

This country based URL redirection does mean some negative consequences to your Blogger blog. For example:

The social stats – or Facebook Likes, Google +1s and Tweet counts – for your blog stories may be diluted as the URLs for the same story become different from different visitors. You will have a similar problem if you are using an external commenting platform like Disqus or Facebook Comments. Also, if canonicalization isn’t implemented properly, it may cost you some Google juice as external websites may link to your country-specific pages. If you are not happy with the idea of Blogger redirecting your blog to a different URL, you can add the following piece of code to your Blogger template and it will always serve the .com address to your visitors irrespective of their geographic location.

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 tag.

<script type="text/javascript">
 var blog = document.location.hostname.split(".");
if (blog[blog.length - 1] != "com") {
  var ncr = "http://" + blog[0] + ".blogspot.com/ncr";
window.location.replace(ncr + document.location.pathname);    
 }
</script>

Click the Save Template button and now your Blogger Blog will always serve with the blogspot.com URL.

This simple script parses the domain name (document.location.hostname) of your blog page and if it includes a country-specific URL (like blogspot.in), it will force-redirect the visitor to the blogspot.com address using the /ncr switch.

Source:-labnol.org


Is preventing ccTLD healthy for SEO?
#6

@Renata Dear,

You can easily prevent your domain from country specific domain. Like: .blogspot.in , .blogspot.en etc

1: Go to Blogger Dashboard:

2: Click on Template >> Edit Template

3: Just Below <head> Tag past the given code.

<script type="text/javascript">      var blog = document.location.hostname.split(".");      if (blog[blog.length - 1] != "com") {        var ncr = "http://" + blog[0] + ".blogspot.com/ncr";        window.location.replace(ncr + document.location.pathname);          }    </script>

And then save it, you almost done, now your site will not get redirected to country specific domains. Visitors will now only enjoy the .com domain of your site.

I hope this little script may help in solving your problem. Thanks


#7

@Templatezy, Is this Script good for Site.


#8

@mybloggertricks @Templatezy thank you guys for your clear and helpful explanation. I will use given code :sunny:

All the best for you and the forum, best regards


#9

Hello again

For your information I’ve inserted given script and the result is that domain .gr been automatically changed to .com BUT while sharing post on FB .in remains :confused:

…well I don’t like the way how it looks cos the content says about Greece, text is written in polish and address just below the post title description appears as: address.blogspot.in :confused:

Some of my posts (shared on fb) are with .com some of them .in those with .in I have deleted.

… but from the other hand if this inconvenience doesn’t make a problem to my blog then maybe better is to leave the way how it is…

what do you guys think?


#10

This is called “country-code Top Level Domain” or ccTLD in short and this redirect is popularly known us “302 Redirect

I have written a detailed tutorial on it

Quite Frequently local government agencies ask Google Blogger to remove content from specific pages. Since Google supports Freedom of speech therefore instead of deleting those pages, Google will only stop displaying those URLs in that specific country but will continue displaying them for rest of the world. This is why when you share content on social media networks, blogger will instead show the Country code Top Level domain of your blog. :smile:

You can surely install scripts as @mybloggertricks and @Templatezy suggested but the best advice that I can give is that you should better purchase a custom domain if you are serious about your blog and its traffic in a long term. It costs just $10 per year which is less than the cost of your weekend fast food expenses :innocent:


#11

here is a little code that you had to put just below <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>

#12

Thank you all for your response

@Mohammad your tutorial was very helpful to me easy to understand :high_brightness:

All the best & regards


#13

You are always welcomed buddy :slight_smile:

This topic is now closed. New replies are no longer allowed.