I am torn on what is best here, I have read tons of blogs on the topic but haven't found a really clear solution/answer.
Basically I am wondering one thing which has two implications:
- Does Google (or other search engines) follow URLs with query parameters? It sounds like it does, but not 100% sure. It must sort the query params so
?x=1&y=2
is considered the same as?y=2&x=1
. I don't see how to can get out of the potentially infinite set of combos if there are say 5 query params each with 1000 values, that is1000^5
or bazillions of combinations, so there's that uncertainty too.
- If it does follow query params, does it treat them equally in value with hyphenated and/or nested URLs?
For example, say you have a food recipe site. You can have URLs like this, allowing people to customize combinations, and each page should return a title which is unique to that combination, as well as the subset of content unique to that query.
/recipes?spicy=true&contains=milk
, title =Spicy Recipes with Milk
, and it shows only (paginated) spicy recipes with milk./recipes?contains=milk
, title =Recipes with Milk
, and it shows only (paginated) recipes with milk./recipes?spicy=true
, title =Spicy Recipes
, and it shows only (paginated) spicy recipes./recipes?spicy=true&sweet=true&contains=tomato,cilantro
, title =Spicy and Sweet Recipes with Tomato and Cilantro
, etc..
Say you had 5 or 10 query parameters like that, each which returns unique content (sometimes duplicated between pages, like "spicy + milk" vs. just "spicy" will return some of the same content), each page which has a unique title.
First, will Google (and others) follow these URLs and index them? Or will they not because "for some reason perhaps they might not follow or like query parameters" is my question.
Second, would nested/hyphenated URLs be better?
/recipes/is/spicy/contains/milk
/recipes/contains/milk
/recipes/is/spicy
/recipes/is/spicy/is/sweet/contains/tomato:cilantro
TBH, I like the look of the nested/hyphenated version better (it is easier to read), but it is not as simplified/generic as the query parameter approach. And I am not sure if Google (and others) like one approach better than the other (params vs. hyphen/nesting).
For the hyphenated/nested version, you would simply have to make sure the params were ordered first.
I guest a 3rd option would be flat URLs, like:
/recipes/spicy-and-sweet-with-cilantro-and-tomato
So question is, does Google (and others) follow query parameters like this (and index the results), and if so, do they prefer query parameters over hyphenation/nesting, or vice versa, or it doesn't matter?