-1

Basically I have a website I am developing, it involves multiple search criteria and will display results based on the search criteria.

The method I am using is as follows:

  • The user will enter their desired search criteria
  • Upon submit, the values will be POSTED to a script called parse-search.php
  • This script will parse the values and generate a URL
  • using a 301 redirect and header('Location: xxxxxx') the user is redirected to a search results page
  • a PHP script on the search results page will then parse the generated URL using GET and display results accordingly.

This method is working PERFECTLY, no issues, no bugs and the correct results are being displayed. I just wanted to know if this will be detrimental to SEO because of the redirects?

Just as an example, the search form would pass variable via post such as:

colour=1 and type=3

The parse script will then translate this into colour=blue and type=car

Which will redirect to mysite.com/search/cars/blue

The results page will then parse this (with help from the htaccess)

So... Any thoughts would be appreciated.

Regards

1 Answers1

1

Google doesn't care about redirects after a POST from a form. It also doesn't care if the URL is ?color=1&type=car VS /cars/blue. Both are equally indexed.

It does submit (sometimes random) forms with values (we are seeing this daily). It can give strange results which can generate strange (and maybe empty) SERPs.

It is possible to make a sitemap with some combinations of URL slugs? (e.g. /cars/blue). Make these pages content rich so that google sees added value.

For the search: maybe you can make the form a GET, drop the redirect and give the canonical tag on that page the correct URL (/cars/blue)?

unicorn80
  • 1,107
  • 2
  • 9
  • 15
  • Thanks for your help, the hurdle I face is that my results are paginated, and are stored in a $_SESSION['results'] array, and the purpose of the parse-search.php script is to unset that session variable, generate a new query, and then set a new session variable based on results. How would I paginate the results if I eliminated the parse-search script? Sorry if I am missing something simple here. – user3199248 Feb 06 '14 at 13:18
  • No offence, but maybe you should look into why you are using a results variable in a session for the results. What are you hoping to achieve? Are you using a framework? They have standard solutions for these (trivial) problems like: nice urls, pagination, filters etc etc – unicorn80 Feb 06 '14 at 13:22
  • No framework is being used, and no offence taken, my reason is that the client has requested that by default, all results be displayed randomly, paginating random results would generate random results on every page visited, meaning one result may be displayed across multiple pages, my way round this was to store the results from the initial query in a session variable, to ensure that the randomly displayed results are unique to the session of use, not on each page. – user3199248 Feb 06 '14 at 13:28
  • You're probably looking for [Canonical Link](https://support.google.com/webmasters/answer/139394?hl=en) – anubhava Feb 06 '14 at 14:18