Mobile app version of vmapp.org
Login or Join
Gloria169

: SEO friendly url's for dynamic search engine content I have a question I've been struggling quite a while with it. I have a basic search engine on my website, where you can search for 4 categories

@Gloria169

Posted in: #GoogleSearch #Seo

I have a question I've been struggling quite a while with it. I have a basic search engine on my website, where you can search for 4 categories (checkboxes) + a price. Instead of posting to strange url's like /q?categories[]=a&categories[]=b&price=2000-3000, I'd like them to be like:

/search/category-a
/search/category-b
/search/category-a/2000-3000/


etc.

The question is now: the user is able to search for category a OR category b. What's the best way to handle this:

/search/category-a,category-b/...
/search/category-a.category-b/...
/search/category-a|category-b/...
/search/category-a/category-b/...


What do you SEO experts suggest? I've red about the the difference between underscores and dashes in google, but I can't find anything about this multi-category issue.

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Gloria169

4 Comments

Sorted by latest first Latest Oldest Best

 

@Angela700

Before establishing a URL format, you want to take a look at your back-end to see that it can actually handle the format. If your server is apache, you'll likely be using rewrite rules with the mod_rewrite module. Also, you will have to feed the format into a dynamic script. Let me explain.

Say you are using the query of four items named item1, item2, item3 and item4, and you have a price range from 0 to 500.

Say we have this URL format in mind: example.com/query/item1,item2,item3,item4:0-500
Then the .htaccess file will contain lines like this to efficiently process the URL:

RewriteEngine On
RewriteRule ^/query/(.*):(.*)$ /queryengingprocessor.php?itemlist=&pricerange=


Then the PHP file /queryengingprocessor.php will have itemlist equal to a comma-separated list of items and pricerange will be a numeric range. However, the values need to be further checked in php, and luckily, the explode function can separate the values further.

If you decide to use a different URL format such as example.com/query/item1,item2,item3,item4,0-500 then the processing will be somewhat more difficult because the colon in the last URL example was used as the separator to divide the items from the price range.

So your decision should be based on your knowledge of processing the data in the back-end scripts. I apologize if it's not a 100% black-and-white concrete answer, but don't make yourself do extra work as a result for choosing the wrong URL format.

10% popularity Vote Up Vote Down


 

@Welton855

I would consider separating the parameter and value by directories and using dashes. e.g.

/search/category/a-b-c/price/2000-3000/


I'd say the URL structure is a smaller concern than the duplication issues which may arise. Ensure you have canonical tags for handling:

/search/category/a-b-c/price/2000-3000/
/search/category/a-b-c/price/3000-2000/
/search/category/b-a-c/price/2000-3000/


Which will all show the same results.

I would also advise noindexing pages which have no results otherwise Googlebot can (and likely will) spam your server with search requests and use up your bandwidth.

10% popularity Vote Up Vote Down


 

@Voss4911412

Did a little research on this, it seems using + is a common practice when it comes to multi category URL. Some webmasters who have used this method recommend it.

Example: /search/(category-a)+(category-b)/...

10% popularity Vote Up Vote Down


 

@XinRu657

Having "pretty permalinks" show up with search is one thing, having the countless search results pages fed to google is another - it's better to even noindex them.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme