title: Human-readable URLs: preferably hierarchical too?
body: <p>In a <a href="https://webmasters.stackexchange.com/questions/4105/clean-url-with-or-without">now migrated question</a> about human-readable URLs I allowed myself to elaborate a little hobby-horse of mine:</p>
  
  <blockquote>
    <p>When I encounter URLs like <code>http://www.example.com/product/123/subpage/456.html</code> I always think that this is an attempt on creating meaningful hierarchical URLs which, however, is not entirely hierarchical. What I mean is, you should be able to slice off <em>one level at a time</em>. In the above, the URL has two violations on this principle:</p>
    
    <ol>
    <li><code>/product/123</code> is <em>one</em> piece of information represented as two levels. It would be more correctly represented as <code>/product:123</code> (or whatever delimiter you like)</li>
    <li><code>/subpage</code> is very likely not an entity in itself (i.e., you cannot go up <em>one</em> level from <code>456.html</code> as <code>http://www.example.com/product/123/subpage</code> is "nothing").</li>
    </ol>
    
    <p>Therefore, I find the following more correct:</p>
  
  <pre><code>http://www.example.com/product:123/456.html
  </code></pre>
    
    <p>Here, you can always navigate up one level at a time:</p>
    
    <ul>
    <li><code>http://www.example.com/product:123/456.html</code>
    &mdash; The subpage</li>
    <li><code>http://www.example.com/product:123</code> &mdash; The product page</li>
    <li><code>http://www.example.com/</code> &mdash; The root</li>
    </ul>
    
    <p>Following the same philosophy, the following would make sense [and provide an additional link to the products listing]:</p>
  
  <pre><code>http://www.example.com/products/123/456.html
  </code></pre>
    
    <p>Where:</p>
    
    <ul>
    <li><code>http://www.example.com/products/123/456.html</code> &mdash; The subpage</li>
    <li><code>http://www.example.com/products/123</code> &mdash; The product page</li>
    <li><code>http://www.example.com/products</code> &mdash; The list of products</li>
    <li><code>http://www.example.com/</code> &mdash; The root</li>
    </ul>
  </blockquote>
  
  <p>My primary motivation for this approach is that if every "path element" (delimited by <code>/</code>) is selfcontained<sup>1</sup>, you will always be able to navigate to the "parent" by simply removing the last element of the URL. This is what I (sometimes) do in my file explorer when I want to go to the parent directory. Following the same line of logic the user (or a search engine / crawler) can do the same. Pretty smart, I think.</p>
  
  <p><em>On the other hand</em> (and this is the important bit of the question): While I can never prevent that a user tries to access a URL he himself has amputated, <strong>am I wrongfully asserting (and honouring) that a search engine might do the same?</strong> I.e., is it reasonable to expect that no search engine (or really: Google) would try to access <code>http://www.example.com/product/123/subpage</code> (point 2, above)? (Or am I really only taking the human factor into account here?)</p>
  
  <p><em>This is not a question about personal preference. It's techical question about what I can expect of an crawler / indexer and to what extend I should take non-human URL manipulation into account when designing URLs.</em></p>
  
  <p>Also, the structural "depth" of <code>http://www.example.com/product/123/subpage/456.html</code> is 4, where <code>http://www.example.com/products/123/456.html</code> is only 3. Rumour has it that this depth influences search engine ranking. At least, so I was told. (It is now evident that SEO is <em>not</em> what I know most about.) Is this (still?) true: <strong>does the hierarchical depth (number of directories) influence search ranking?</strong></p>
  
  <p><em>So, is my "hunch" technically sound or should I spend my time on something else?</em></p>
  
  <hr>
  
  <p><strong>Example: Doing it (almost) right</strong><br>
  Good ol' SO gets this almost right. Case in point: profiles, e.g., <code>http://stackoverflow.com/users/52162</code>:</p>
  
  <ul>
  <li><code>http://stackoverflow.com/users/52162</code> &mdash; Single profile</li>
  <li><code>http://stackoverflow.com/users</code> &mdash; List of users</li>
  <li><code>http://stackoverflow.com/</code> &mdash; Root</li>
  </ul>
  
  <p>However, the <a href="http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html" rel="nofollow noreferrer">canonical URL</a> for the profile is actually <code>http://stackoverflow.com/users/52162/jensgram</code> which seems redundant (the same end-point represented on two hierarchical levels). Alternative: <code>http://stackoverflow.com/users/52162-jensgram</code> (or any other delimiter consistently used).</p>
  
  <hr>
  
  <p><sup>1)</sup> Carries a complete piece of information not dependent on "deeper" elements.</p>