Mobile app version of vmapp.org
Login or Join
Caterina187

: Prevent Googlebot from following JavaScript redirect I run a website called isitsnowingoutside.com as kind of an experimental project. As I am still learning- it is far from perfect. The basic

@Caterina187

Posted in: #Googlebot #Redirects #Seo

I run a website called isitsnowingoutside.com as kind of an experimental project. As I am still learning- it is far from perfect. The basic premise is the site uses your location to determine if it is snowing.

Currently I have it setup to use the new javascript geolocation. If the user denies access to that or it simply doesn't work there is javascript redirect that will forward the user to a page where I attempt to find their location by IP address. Currently I have the javascript redirect wait 10 seconds.

Unfortunately, when google indexes my site it follows that redirect and the search results display the url for Mountain View- not my homepage. I tried adding no-index to the subpages in my site but now it just doesn't show up in the results at all. Any ideas?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Caterina187

1 Comments

Sorted by latest first Latest Oldest Best

 

@Gonzalez347

Watch this video by Matt Cutts or read it here.


So if Googlebot comes in, you check the IP address, and imagine we’re
coming from the United States, just redirect Googlebot to the United
States version of the page, or the dot-com, or whatever it is you
would serve to regular United States users. So geolocation is not
spam."

But. as long as you’re treating Googlebot just like every other
user, whatever IP address they come from when you’re geo-locating, as
long as you don’t have special code that looks for the user agent of
Googlebot or special code that looks for the IP address of Googlebot,
and you just treat Googlebot exactly like you would treat a visitor
from whatever country were coming from, then you’ll be totally fine.


This is what I would suggest to do :

Have the code for detecting location and showing the result on the home page itself. In this way, GoogleBot won't get redirected to some other page and will show your home page in search results instead of the page for Mountain View.

If you want all the other pages specific to a place to get indexed, you can list the links to all of them on a single page which Google can index.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme