views:

742

answers:

1

I run a site where users have their own profile pages. They are also able to post products for sale (that they have made) and write/import blog posts. I am going to be implementing a sitemap and I need to make a final decision with the URL strategy.

Here's what I currently have for products (where 1234 is the product ID that I use to lookup that product): N.B "product" is a fixed string (although it's another word in the actual site) - all others are dynamic depending on the item.

  • example.com/product/1234.product-category.product-name

should I change to any of these? i.e:

  • example.com/maker/users_name/product-category/product-name/1234
  • example.com/product/product-category/product-name/1234
  • example.com/product/1234/product-category/product-name

The main items for consideration are:

  1. Where should the product ID go in the URL? Both in terms of readability by the user but also in SEO terms
  2. Should I include the user's name (as he/she made that product) ?
  3. Should I attempt to remove the ID altogether?
+5  A: 

I think the first example (example.com/product/1234.product-category.product-name) is the best format but I would consider changing then "." to "-". I am just thinking that if somehow a product name ends in something that triggers an different handler on your server like ".php" or ".jsp" you might have some undesired effects.

Where should the product ID go in the URL? Both in terms of readability by the user but also in SEO terms

I don't really think it matters too much where the product ID goes but as far as the user reading it, I think they pay attention to the end of the line so I would put the ID first leaving the most descriptive part (the product name) at the end.

Should I include the user's name (as he/she made that product) ?

Not sure if you allow your users to change user names, but if you did I would leave the user name out. An example would be someone getting married and changing their last name. This would hurt your SEO since the URL would change but search engines would have already indexed it the old way. You'd have to put some permantent redirects in place to handle this which could be avoided by just leaving the username out.

Should I attempt to remove the ID altogether?

You should leave the ID in the URL in the event that two products have the same name and your algorithm to generate the URL creates a duplicate link.

Brian Behm
Name is good option in url as it gives a sense of ownership to user. However it might lead to problem of name changing as pointed out by Brian.Another idea is to have a unique name/nickname for each user in site.
vsingh