What is the best placement for the ID in a URL for SEO?

Look no further then the URL of this page:

http://webmasters.stackexchange.com/questions/16641/seo-urls-best-place-for-the-id

It's in the http://www.site.com/action/id/slug-title format. But truthfully, both work well and are optimized for the search engines.


Put the id near the beginning. I had some URLs with ids near the end and it caused a problem. Sometimes URLs get truncated. This is especially true when they are shown in the page and not linked.

Your website can probably figure out what to show if the link is

example.com/12345-this-is-the-whole-title-o...

but might not be able to in the case that the id is in the part that was truncated.

example.com/this-is-the-whole-title-of-the-...