Good URLs Should Be Unambiguous

Album Cover: Narrow Stairs

"As the flashbulbs burst, she holds a smile like someone would hold a crying child."
Death Cab For Cutie / Cath...

Posted on February 07, 2007 10:03 PM in Elsewhere
Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

There's a very insightful post over at Simon Willison's blog that talks about the importance of unambiguous URLs. I'd never even really thought about it before (unless you count this), but ambiguous URLs really can clutter up the web. The example is particularly interesting. I think I've done a fairly decent job of adhering to the unambiguous model, but certainly not consciously. From now on, that won't be the case.

Update: I just spotted a similar article over at The Mu Life (via Digg).


Ryan on February 07, 2007 at 11:25 PM:

Correct me if I'm wrong, but unambiguous URLs (URIs?) are unfeasible in practice because just about anything can appear after question mark in a URI. For example, is an ambiguous URI by this standard, if I am not mistaken.

Is there any way to prevent this kind of ambiguity? Maybe aggressively redirecting if the get string is not an exact match? But that sounds like a maintenance nightmare.

Much better, perhaps, would be to simply have each page know how to link to itself. In fact, I like this idea: perhaps a meta "permalink" tag that identifies an "authoritative" URI for the content on the page. I bet someone probably already thought of this.

At any rate, I think this ambiguous URI issue is vastly overstated. To achieve the desired effect, just make sure you always link to an "authoritative" URI. That, I think, is the important part.


Bernie Zimmermann on February 10, 2007 at 2:41 PM:

Ryan, I think you're right from a user's perspective, but I don't necessarily agree from an owner's perspective. I think part of the disambiguous paradigm is to be responsible about how you link or provide links to your own content, and how you link to others'. If your URI is and I link to that URI without the trailing slash or I tack on some meaningless GET parameters, I'm being irresponsible. When users then, in turn, submit that URI to a site like Digg, then I'm the one to blame, not them.

I agree with your point that the topic may be overstated, but again it depends on your perspective. If you're an average web user or author and you aren't anal about standards, approaches, or under-the-hood technology, this may seem like meaningless banter. Even if you are, it might still seem that way. I find it interesting, though, and I get the impression that I'm not the only one.


Ryan on February 13, 2007 at 5:32 PM:

Bernie, I agree that the responsible thing to do is to make sure you always link to the correct/authoritative URI. All that I am arguing is that making sure you do so is the only reasonable thing you can do. Certainly, you can try to redirect to an authoritative URL, but in many cases (as I attempted to show) I think it is unreasonable to force this.


Post Comments

If you feel like commenting on the above item, use the form below. Your email address will be used for personal contact reasons only, and will not be shown on this website.


Email Address:



Check this box if you hate spam.