Skip to content

ara pehlivanian

Web Standards, Web Culture, Web Everything.™

Proper URI design

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.

Recommended Reading

Sphere: Related Content

  • Comments closed

Buy my book

The Art & Science of JavaScript / SitePoint
The Art & Science of JavaScript

Advertisement

Add Your Voice Firebug - Web Development Evolved

Advertisement

3 Comments

  1. Gravatar for MathiasMathias says:

    Designing [URIs] mostly means leaving information out.

    See, this is why you really should use slugs. IRIs like http://arapehlivanian.com/2005/10/05/moving-in-the-anatomy-of-a-wordpress-design-part-1/ are just way too fucking long.

  2. Gravatar for AraAra says:

    Mathias: Good point. I let WP create my slugs. That’s my fault and it’s partly due to my inexperience with WP and partly due to my deference to automation.

  3. Gravatar for Akismet how I love thee | ara pehlivanian—Web Standards, Web Culture, Web Everything.™Akismet how I love thee | ara pehlivanian—Web Standards, Web Culture, Web Everything.™ says:

    [...] Back in December of ‘05 Molly wrote Best. Spam. Ever. at which time I was lucky enough not to have the problem of comment spam. Fast forward to about a month ago and suddenly my post and suddenly my post Proper URI design started to gain the attention not of fellow web-heads, but of spammer-freaks. Who knows, it could have been my immensely popular post on Coming soon to a theatre near you–I confess, I dugg my own post–that opened me up to the non-web-head crowd. Either way, the comment spam began to flow. [...]

Sorry, the comment form is closed at this time.

Skip to navigation

More stuff by Ara elsewhere on the web

    Snook Approved!

    © 2005-2008, Ara Pehlivanian.

    Stock photography courtesy stock.xchng. This site uses Akismet to catch spam (56,306 caught since May 2006) is hosted by DreamHost and powered by WordPress.