New Member FAQ | Forums | Earn Revenue | Distance Education | Help Topics | Admissions 2013
Awards & Gifts
 
Login Login    Register      

ArticlesPractice TestsAsk ExpertsQuestion PapersJobsUniversitiesCollegesCoursesSchools

Active Members
TodayLast 7 Daysmore...

Join our online Google+ community for Bloggers, Content Writers and Webmasters




Ask Experts » Computers » Blog and websites »

Is it good idea to use html code to prevent Google to redirect my blog to .in domain?

Date: 18 Sep 2012   Group: Computers    Category: Blog and websites   


Hi friends recently I have started my own blog at blogger.com with address:
http://www.netsyco.blogspot.com
Actually it should have .in domain name according to latest changes made by Google. But to be professional I wanted to have .com as my domain name. So I am using code provided at labnol.org to prevent Google to redirect my blog address to .in domain name. It is working successfully. But when I submitted my blog to one of the blog directories that is indieblogger.com they say that they are unable to reach my blog. Sometimes whenever I type my blog address with .com domain I get error:
Not found
Error 404

I am not getting any traffic through search engines. If I remove the code which is preventing my blog to redirect to .com domain, then will it affect my current SEO status, as till now I am submitting my blog to Search engines and blog directories with .com domain..



Find Answers
Having problems with Blogger redirecting your dot com domain to country specific domains? Learn how to change .in blogspot domains to .com blogspot domains.

Author: Kumaraditya Sarkar    19 Sep 2012      Member Level: Gold     Points : 5  (Rs 5)    Voting Score: 0
What coding are you using? I do not know what Amit Ji provided in labnol, but you can try this one. Find this line in your blog template code:

<b:include data='blog' name='all-head-content'/>

Just below that, place this little JavaScript code:

<script type="text/javascript">
var str= window.location.href.toString();
if ((str.indexOf('.com/'))=='-1') {
var str1=str.substring(str.lastIndexOf(".blogspot."));
if (str1.indexOf('/')=='-1') {
var str2=str1;
}
else {
var str2=str1.substring(0,str1.indexOf('/')+1);
}
window.location.href =window.location.href.toString().replace(str2,'.blogspot.com/ncr/');
}
</script>


I think it should work fine and solve your problems.

Answers      





Post answer or solution to "Is it good idea to use html code to prevent Google to redirect my blog to .in domain?"

You can earn revenue online from Google AdSense and our revenue sharing programs by post valid, self written answers for the problem Is it good idea to use html code to prevent Google to redirect my blog to .in domain?




You must Sign In to post a response.


Next Question: How to increase traffic on blog?
Previous Question: To know all about publishing/sharing a blog
Return to Question Index
Ask Question to Expert
Category:


 
Related Questions
Popular Tags   What are tags ?   Search Tags  
Not found  .  Error 404  .  

Subscribe to Email
  • Get Jobs by Email
  • Forum posts by Email
  • Articles by Email
  • Online MembersK Mohan
    vikas singh
    More...


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    AdSense Revenue Sharing sites   Advertise   Talk to Tony John
    ISC Technologies, Kochi - India. Copyright © All Rights Reserved.