I have learned how to retrieve data from a database to a single page by using a form, so I would not need to create many pages to show the elements of a catalog. The concern that I have is how to make this database content available for search engines.

I have read that I need my site to generate different URLs for each search result, but in my test, the webpage always has the same URL without any additional parameter. I know that sites like Facebook and similar generate particular URLs for each profile and they are indexed, but I don't know if "physical" files exist for them or how this is done. I have read similar questions to this, but still can't figure how to generate the URLs.


1 Answer 1


The URLs should be something like www.example.com/?id=XXX. Based on the ID parameter, you can extract the required data from your database and pass it in the response.

I have learned how to retrieve data from a database to a single page by using a form

I think you are using the POST method in your form, and because of that the parameters will be passed to your application in the request body and not in the URL.

Use the GET method instead. If the URL on which the form is passed is /abc.html and the form parameter is an ID, then the URLs should be in the form of: /abc.html?id=XXX. But Google's web crawler cannot fill in your form to crawl those URLs, so you should create a page containing a list of all those URLs. Whether the user submits the form and goes to the URL, or types the /abc.html?id=XXX URL into his browser, the response from the server should be the same.

Assuming that you are using PHP, this might be helpful to you (see the "Get Method" section).

  • @SakhalTurkaystan :)
    – Ranjith
    Jan 29, 2014 at 17:06