When I do a internal search in magento (i.e search for a product) and after that try to filter the results (filter by price), some querystrings are added to my URL, but Google point's out like a duplicated content.
Magento have the canonical tag feature on categories and product's, but I couldnt find it in "search" queries and filters.
My question is: How can i add canonical tags on magento's search when I filter the results?
We generally recommend to hide internal site search from getting indexed ( you can do that with the standard "NOINDEX, FOLLOW" tags).
But if for some reason you really need to index it, here is the simplest code that lets you add a canonical URL.
Please note that in this case we use the default search. In this code, the canonical URL contains only the search query, without any filters.
/app/design/frontend/{your_package}/{your_theme}/template/page/html/head.phtml
Add this code:
Also note that we recommend to use the toolbar parameter limit=all. Without it, it'll be hard to get the right Canonical URL on the pages with pagination.
In case this parameter is turned on, (you can check it under System->Configuration->Catalog->Catalog->Frontend->Allow All Products per Page), you need to add 'limit=all' to the URL.
P.S. To learn more about the topic, please read this guide by Google: http://googlewebmastercentral.blogspot.com/2013/04/5-common-mistakes-with-relcanonical.html