0

I am developing a website using GAE Python. It has only a few html pages which are available using Django template. The website allows you to search for bus tickets by selecting country, state, city, date, type of bus and other parameters. I use AJAX POST to send all these criteria to the server side(python). The server side performs a NDB query and returns the available bus operators with details for the selected date. This information is returned as JSON data. After the user clicks on a bus operator, I open a popup on the same page and retrieve and display more details using AJAX POST again in the same way.
The URL at the top of my page remains throughout:

http://localhost:8080/search  

[right now the website is not complete and so not online, therefore "localhost"]

Problem: I want to make all the bus operators search results on my website google searchable (actually, searchable by any search engine if possible). In other words, I want Google to somehow index my dynamic search result page so that when people search for bus on google, my website and my search page should come in the google search results

I tried Google search and found the following but could not understand the solution. I did not understand stuff about hash fragment since I have used AJAX POST query string only which do not come in URL like hash fragments.

https://developers.google.com/webmasters/ajax-crawling/docs/specification
http://coding.smashingmagazine.com/2011/09/27/searchable-dynamic-content-with-ajax-crawling/
How to make google search dynamic pages of my site Hash tag, query string, and Ajaxified search results

I am a novice here and would appreciate any help

Community
  • 1
  • 1
gsinha
  • 1,165
  • 2
  • 18
  • 43

1 Answers1

2

Search engines will index your results only if they find links to them. In this case, you want these links to be SEO-friendly. There are plenty of articles on how this can be accomplished.

Simply adding a hashtag to your URL after you display the results is easy, but it will not achieve anything.

One solution is to create a site map file and submit it to Google. You can list the most popular (or all, if you don't have too many) results from your database in this site map. In this case you need links in this site map to read like:

myDomain.com/search/?city=London

or

myDomain.com/search/#London

In both cases, your servlet or your app should be able to process this link when a user hits it directly, and display the correct results to a user.

Andrei Volgin
  • 40,755
  • 6
  • 49
  • 58
  • Thanks for your reply, Andrei.. For approach 1, do you mean I should convert my AJAX POST to AJAX GET instead so that the URLs contain query string.. For approach 2, is this hash tag same as the html hash tag.. – gsinha Feb 22 '14 at 17:03
  • 3
    You shouldn't be using POST for searches anyway. POST is for actions that change resources on the server (eg make updates in the database), not simply requesting data. – Daniel Roseman Feb 22 '14 at 18:19
  • Thanks Daniel.. I would convert my search AJAX query to GET from existing POST.. There would be around 1200 characters in the query string which is below the limit of 2048 characters for URL.. I have several variables and possible values in the passed search query string.. Do i need to provide links to all the combinations (of query string) on my sitemap in order to make all of them google searchable.. – gsinha Feb 23 '14 at 05:27
  • 1
    Search engines will punish you for very long query strings. And yes, you should include every combination that you want to be indexed. – Andrei Volgin Feb 23 '14 at 05:51
  • Thanks Andrei.. Could you please suggest any alternative to long query string so as not to get penalized by search engines.. – gsinha Feb 23 '14 at 05:57
  • 1
    I don't know your data model. Maybe you can use ids instead of actual values? Do your users really have to type a thousand characters to do a search? – Andrei Volgin Feb 23 '14 at 06:04
  • Thanks Andrei.. There are several default parameters which are selected when the search page loads; these parameters could be unchecked by the user.. Most of them are checkboxes under different categories.. your sugggestion to use ids looks good as a last resort.. – gsinha Feb 23 '14 at 17:31