I have content that can be accessed from various ways. For example my content is reviews and I have three type of reviews:


Another example would be products which can be viewed in ways:


The thing to note is that that each set of pages is fed from single table (reviews and products respectively). Now most websites have single URL for same piece of content regardless of the "view". E.g. Christian Bale's IMDB profile is http://www.imdb.com/name/nm0000288/ whether you were looking at The Dark Knight's cast or looking for popular people born on January 30.

So for my website I plan to use URLs like these:



Depending on the view parameter, I'll show a "breadcrumb" that takes the user back to where he came from and provide some kind of visual indication of the hierarchy hierarchy.

Is this good or bad approach. And is there a better solution?

  • Why not use your URL segments as the discriminators? Considering we're going the way of URL rewriting largely to escape the query string approach.
    – Mr. Disappointment
    Commented Oct 12, 2011 at 11:50
  • There will be slugs within each segment and I might end up with very long urls.
    – Salman A
    Commented Oct 12, 2011 at 11:53

3 Answers 3


Search engines, at least Google, don't care either way. If you have a clean URL structure (no duplication via URLs like /productname/colorname/ & /colorname/productname/ ) then they generally won't have a problem whether you use URL path elements or URL parameters. Both URL kinds have been around since "forever" so there's no need to worry about that.

My advice would be to primarily focus on the user and let that guide you regarding a decision like this. What works best for the user? And related, how will international (non-English) users be able to cope (if they're a part of your targeted audience)?

Things to keep in mind regardless when choosing a URL scheme:

  • Make sure you avoid duplication as much as possible
  • Use the rel=canonical where it makes sense
  • Don't try to stuff keywords into your URLs (it's not necessary)
  • Try to avoid unnecessary/unused URL elements (avoid having /123-pagename/ and /123-randomtext/ show the same content)
  • Avoid "infinite" URL nesting (/123-pagename/ links to /123-pagename/related/ links to /123-pagename/related/234-otheritem/ etc.)
  • Based on your suggestion, I've decided to go ahead with the shorter URL with query string. I use 301 redirects already but canonical URLs need more attention. The query string will be used only to generate the bread crumb; so I plan to point the canonical URL to the no-query string version.
    – Salman A
    Commented Oct 17, 2011 at 15:19

I agree with Mr. Disappointment that using URL segments is the way to go. And I think you will eventually end up with shorter URL's. Query strings are more verbose. I would use URLs like this:



It's debatable if you should end your URLs with a slash or not.

  • The URLs you mentioned are the other way round. Reviews belong to a product (plus I also have reviews about the website and company). Likewise, products belong to a category. Sooner I'll have a hierarchy deeper than 3 levels which leads me to another problem: the url becomes too length e.g. /procucts/11/fictitious-dvd-player/reviews/12/do-not-buy.html.
    – Salman A
    Commented Oct 13, 2011 at 17:54
  • I agree that reviews should be under products, but I just translated your URLs. Of course the URLs get long if you include both a slug for the product name and for the review, but isn't that what you intended? Why else do you want to include the slug? I assume it's for SEO so in that case it's suppose to include as much keywords. Commented Oct 13, 2011 at 21:36

I like your use of query strings, but I would also suggest to have a "default" version that effectively means no query string. When the url is processed the default query string can then be added through url rewriting to process the request. If your using an MVC framework then this can be handled for you by default routes.

You can also make use of canonical url links to mitigate this problem further.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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