How should a good URI be designed? What are the factors to consider? What are the pros and cons of the variants?
Factors that makes up a good URI
- Stability over time
- Short
- Give the user an idea what is linked
- Easy to type
- Easy to guess (relevant only for a few links like "/jobs")
- Search engine friendly
- URI schema should be consistent over the whole site
- URI schema should allow future extensions
Any more?
Examples
example.com/articles/3252
example.com/articles/how+to+design+good+uri
example.com/articles/3252/how+to+design+good+uri
example.com/good-uri-design
example.com/articles/good-uri-design
example.com/a/good-uri-design