Hello,
What would be the best way for a URL to look like if it should contain an ID and a name?
/product/123/screwdriver-black /product/screwdriver-black/123 /product/123-screwdriver-black /product/screwdriver-black-123
Thanks
Hello,
What would be the best way for a URL to look like if it should contain an ID and a name?
/product/123/screwdriver-black /product/screwdriver-black/123 /product/123-screwdriver-black /product/screwdriver-black-123
Thanks
IMO use what SO uses.
/product/123/screwdriver-black
That way you are still able to access the product 123 via
/product/123
For example, while SO puts the question name in the link, it is 100% optional. You can still access this question with
http://stackoverflow.com/questions/3480964
as a rule it is best to limit the number of directories, as google is supposed to add weight to pages that are higher level e.g. not nested in multiple folders so something like /product/123-screwdriver-black would be best
however, In reality i'd use /product/123/screwdriver-black because it is cleaner and having worked on very large ecommerce sites with very good seo rankings i've found it makes little difference to google, as one good inbound link can make a bigger impact than almost any url formatting will.
I would recommend
/product/screwdriver-black-123/
or
/product/screwdriver-black/123/
The preffered structure is that of significance.
More general to the top, more specific to the bottom.
This is the natural (well, according to G, we could always get into a big philosophical debate on that) linking order.
So, it only makes sense to use
/product/screwdriver-black/123
Product is more general than screwdriver and 123 is a specific screwdriver.
Makes sense. :)