can someone please give me an advice on how to deal with query string pages like /index?page=323, ?min=0&max=217, ?dir=asc&order=name, ?mode=listand more like these.

2 known solutions for query string/database generated pages are canonical and rel="prev"/rel="next", (if there are more, please share) I have em both. Is that enough? Is there a need of blocking common query string pages via robots? Or you don't do that in SEO?

  • What are you trying to do? Can you please explain why you think you should block these (query string) URLs? Blocking with robots.txt and pagination would seem to be contrasting ideas? – MrWhite Nov 16 '16 at 15:25
  • We can't give you advice about whether query string pages should be indexed without knowing what the query string is for. Sometimes the query string specifies the page content eg /index?page=323 while sometimes it is just tracking parameters /page.html?source=foo Sometimes query string pages should be indexed, sometimes they should not. – Stephen Ostermiller Nov 16 '16 at 20:27
  • Well, the most common query strings are content as you've mentioned above /index?page=323, then there is user preferences sort of stuff e.g. prices ?min=0&max=217, a-z sorting ?dir=asc&order=name or mode ?mode=list, correct me if I am wrong. My question is, I do see a lot of these pages getting indexed e.g. domain.com/category/?min=0&max=217. I have canonical for every category page, plus I am using rel="prev"/rel="next". Are these measures enough, or after having all these tags, I still need to block these query string pages/urls via robots? Hope I am clear this time. – kaaami Nov 17 '16 at 16:47
  • Your different examples will require different approaches. – Stephen Ostermiller Nov 17 '16 at 18:21
  • Okay @Stephen Ostermiller, can you help me with some? Of course if you have time. Or perhaps you can explain me how to deal with query string pages or give me a link to a resource where I can find something on this topic. – kaaami Nov 18 '16 at 16:57

If you have pages with query parameters that you do not want indexing, using the canonical tag should help indicate that only the primary version of this page should be indexed. The following tag should be place din the head of the page and should not contain the query parameters that you do not wish to be indexed:

<link rel="canonical" href="http://example.com/blog" />

Typically with pagination it would be good to implement the canonical tag and the rel tags as this will give more context to Google that the content across these pages is linked.

Using the canonical instead of blocking through the robots.txt would be preferable as it allows Google to see the content but also states that you would prefer this content not to be indexed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.