After my review i found the blogger redirect code where you can redirect your local site to international .com domain for example example.blogspot.com will redirect to .in in india and .com.au in australia and so on , this is the big problem for sites with good page rank and alexa rank. Now here is the best code for the blogger
- Argentina [blogspot.com.ar]
- Australia [blogspot.com.au]
- Brazil [blogspot.com.br]
- Canada [blogspot.ca]
- Czech Republic [blogspot.cz]
- France [blogspot.fr]
- Germany [blogspot.de]
- Hong Kong [blogspot.hk]
- India [blogspot.in]
- Italy [blogspot.it]
- Japan [blogspot.jp]
- Mexico [blogspot.mx]
- New Zealand [blogspot.co.nz]
- Portugal [blogspot.pt]
- Romania [blogspot.ro]
- Spain [blogspot.com.es]
- Sweden [blogspot.se]
- UK [blogspot.co.uk]
<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>
this code sometime redirect to not found page...
below is the best code to redirect your site to perfect .com domain
<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>
0 comments:
Post a Comment