4

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?

2

1 Answer 1

1

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.

1
  • 1
    I don't know why I hadn't thought of that. Thanks!
    – zanedeg
    Jan 31, 2014 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.