Can your site’s pages be accessed without their file extensions? Do your pages have a ton of querystring parameters trailing after them? Are your pages organized by author or subject name? How much thought do you put into the creation of your URIs? A lot? A little? What’s a URI you ask?
Believe it or not, a lot of thought goes into a seemingly simple URI. In fact, the simpler it is, the more thought it takes. Especially if you’re hoping to make your content available for years, and years, and years to come. That’s right, proper URI design helps in their longevity because we won’t feel the need to move or abandon files or entire folder hierarchies later on down the line when our sites grow in new and different directions. But “Ara,” you say. “It’s normal. My site grows, times change, what I put up two years ago is no longer relevant.” Wrong! URIs should last forever. The rule of thumb is:
Do not keep a hyperlink collection unless you are willing to look after it. “You’re nuts,” you say. “Sometimes it’s inevitable. Its time comes and the content’s gotta go!” Okay, that’s fine. But there are ways of dealing with the removal of old content too, and it isn’t to just delete the files.
Designing [URIs] mostly means leaving information out.
With a little forethought, we won’t ever have to delete files. The problem is, we don’t take the long view when placing content. How often have you stopped and wondered if the folders you’re creating will make sense three years from now? Will
/team/robert/uri-tips.html be valid once Robert leaves the team? Or what happens to
/betas/cool-widget.html when Cool Widget comes out of beta? By moving the file, have you just inadvertently created link rot? What will happen when those who have bookmarked your Cool Widget page come back and get an “Error 404: Page Not Found” message? Will they start looking around to try and find Cool Widget elsewhere on your site? Or will they leave your site disappointed, having lost confidence in you? Because of consequences like this, I believe that proper URI design should just be another part of the web developer’s skill set.
Read more from the archive.