I am creating a local community directory site which identifies the location of the user by IP address and dynamically renders the content related to the specific community identified by the IP address.

My question is since everything is generated by the user IP, how can I get Google to index the dynamic pages created since the Googlebot itself will present an IP address and thus the only pages it will see will be related to its IP address...

I can generate and submit an XML sitemap for all pages, but again the script would revert back to the Googlebot IP no matter which link it follows from the sitemap.


Will Google penalize me if I redirect their bot through IP identification to the national version of this of the above mentioned site?

  • "everything is generated by the user ip" <-- What does this mean? User generated content isn't any different then any other content.
    – John Conde
    Apr 28, 2014 at 13:57
  • each city has its own specific content related to the community itself and the businesses listed. The script reads the ip of the user/visitor and identified the city from the ip. So if a visitor is from Orlando it renders the content designated for Orlando... If the visitor is from Tampa it renders the content from Tampa and so forth
    – petebolduc
    Apr 28, 2014 at 14:03
  • I think you are kinda stuck. Your model, while I understand why you have done it, has a mechanism that is not exactly friendly to search. The only thing I can think of is to create pseudo pages with parameters and a carve out for Google IP addresses and create a sitemap with as many possibilities that exist. I know this is backwards to what you are doing and probably not what you want. It would create links that usurps your mechanism. But it is what comes to mind immediately. If I can think of anything else, I will certainly write. Sorry. I wish I had a better idea.
    – closetnoc
    Apr 28, 2014 at 14:55
  • the mech also has a calculation built in to check if there for the closest city to the visitor's ip and if a city in the network does not exists within 25 miles it reverts to state wide coverage... and if there are no cities from the given state of the visitor yet it reverts to national coverage. Is there a way to identify the search engines bots ip... if so i could redirect them to the national... and if i do that would it hurt the seo?
    – petebolduc
    Apr 28, 2014 at 16:08

1 Answer 1


The usual way to do that is to make the content dependant on the URLs only, and you redirect your visitors to the proper URL according to their IP.

For example, if you are generating dynamic content for the visitor's country, then create URLs for each country you care about and then redirect the visitors to the proper one.
The same thing if your doing it for cities or continents or whichever geographic resolution you are using.

If there are parts of the page that show information too specific to the visitor (like the IP itself or cookie-dependant preferences) then just keep that part as dynamic, provided they don't represent the main content of the page.

The rule of thumb is: if you want search engines to index a given content, that content must be tied to its own URL and nothing else.

  • I understand what you are saying about the content being tied to the url for indexing... the script generate specific urls like: mysite.com/business-directory/saint-cloud--florida/automotive ... however, the city is generated from the ip and the bot's ip is tied to a specific city... if i redirect to the specific city it will always return to the city of the bot's ip... perplexed?
    – petebolduc
    Apr 28, 2014 at 16:26
  • @petebolduc, the redirection must be done at the entry point of your site only. On the individual URLs for each city you DO NOT perform any redirection at all. That means that the bot will be redirected only when visiting the entry point, but not when visiting the page for each city.
    – GetFree
    Apr 29, 2014 at 8:25
  • I understand... I was thinking I could run the ip though an array of bot ips on the sever lever and if the visitor ip matches one in the array, I would set it to render the site on the national level site links to all cities and the businesses tied to them are made available for indexing. the ip redirect to the cities would then be nullified... My question is would Google has issues with being redirected like that... I thinking that since the redirect is taking place at the server level Google would never even realize it was redirected... feed back please and thanks
    – petebolduc
    Apr 30, 2014 at 17:29
  • After sleeping on it I understand what you are saying... I'll simply use the visitor to identify which local menu to render while at the same time rendering a national menu for indexing... it will workout just fine... thanks for the input
    – petebolduc
    May 1, 2014 at 15:16
  • Google crawler will know it's being redirected because you have to respond with a 302 HTTP code. Also, Google consider bad practice to treat crawlers and users differently. Don't worry about redirecting Google crawlers to a specific city. Google will see all your city/state/country pages either way (provided there are links to all those pages in your site, which is what you should do)
    – GetFree
    May 1, 2014 at 15:22

Your Answer

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

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