: What is good URI design? 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
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
More posts by @Ogunnowo487
4 Comments
Sorted by latest first Latest Oldest Best
This advice, from Jakob Neilsen, was written back in 1999 but still seems pertinent today:
The URL will continue to be part of
the Web user interface for several
more years, so a usable site requires:
a domain name that is easy to remember and easy to spell
short URLs
easy-to-type URLs
URLs that visualize the site structure
URLs that are "hackable" to allow users to move to higher levels of the
information architecture by hacking
off the end of the URL
persistent URLs that don't change
From: URL as UI
These resources might help:
11 Best Practices for URLs
How to make URLs user-friendly
The real answer is to use whatever suits your site best. Some facts:
Keywords in the URL aid SEO and give users an idea of what the page is about. This is true for both static and dynamic URLs.
The consensus is that a lowercase slug, separated by dashes, is the best.
Search engines index dynamic URIs (e.g. index.php?page=about) just fine.
Using ID numbers in URLs is much easier/faster for grabbing the content from the database.
Search Engines prefer unique URLs, so it's best to avoid having parts of the URL with no bearing on what is displayed if possible.
Use rel="canonical" if you can't avoid possible duplicates. example.com/1234/my-page in theory should be different to example.com/1234/my-pgae but for most practical purposes they end up returning the same content, like on this site.
Neither:
example.com/good-uri-design
or at least:
example.com/articles/good-uri-design
Good slugs are not necessarily the same as the title, they should be concise and use URL friendly characters.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.