title: Should a friendly URLs have ID at the beginning or at the end?
body: <p>So I am planning to have friendly URLs for my site where each page has its own ID. So I found two common ways people do this:</p>
  
  <pre><code>http://www.example.com/page/123/slug-for-the-page
  http://www.example.com/page/slug-for-the-page/123
  </code></pre>
  
  <p>Which one is preferred? What are arguments for and against each? I see that when typing the URL the second form is easier, because it is easier for browser to autocomplete from history or bookmarks. But for me it is really strange to have ID at the end.</p>
  
  <p>I will use redirects to canonical URL for any slug which does not match the current one. But does people also do redirects from URL having slug, but no ID, when the slug is unique? For example, redirecting <code>http://www.example.com/page/slug-for-the-page</code> to <code>http://www.example.com/page/slug-for-the-page/123</code>.</p>