I would like to know what's the best location for an ID in a SEO optimized URL:
http://www.example.com/123/slug-title
http://www.example.com/slug-title-123
Webmasters Stack Exchange is a question and answer site for webmasters. It only takes a minute to sign up.
Sign up to join this communityLook 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-...