Cool URIs don’t change
The internet is constantly changing, but some things should stay the same. One of those things is a good web link. Back in 1998, Tim Berners-Lee, the inventor of the World Wide Web, wrote something simple and powerful, Cool URIs don’t change.
A URI is just a web address, example.com/about
, and a “cool” URI is one that’s clear, simple, and doesn’t change over time.
Changing web addresses breaks links. If you rename or move a page, old bookmarks, search engine results, and references stop working. That’s annoying for users and harmful to the web.
Keeping URIs so that they will still be around in 2, 20 or 200 or even 2,000 years is clearly not as simple as it sounds.
Cool URIs are readable and built to last. Instead of /v2/store/item?id=1234
, go with /store/blue-mug
. It’s easier to remember, easier to type, and it still makes sense years later.
Here are some more good examples;
/about
instead of/team.php?section=1
/blog/how-to-grow-basil
instead of/posts?cat=12&id=99
/recipes/1999/pancakes
instead of/content/recipes/1999/08/23/1234
And if a page must move? Set up a redirect. Don’t leave users hanging with a “404 Not Found.”
Cool URIs show respect—for your users, for the web, and for the content you publish. They’re small decisions that make a big difference over time. So next time you name a page, think ahead. Will the link still make sense in five years? If yes, you’ve got a cool URI. Cool URIs don’t change.