Wednesday, July 23, 2003

I recently led an effort at work to make our URL structure more logical. The purpose was to allow our URLs to offer more information about the linked page before users clicked and also to reflect the site structure through the URLs. In usability testing months ago I noticed that some users would click on the logo to return to the homepage—a common enough behavior—but were unsure this actually returned them to the homepage. The uncertainty was due, understandably, to the fact that the homepage URL wasn’t a simple protocol and domain (, but instead had a lot of unnecessary key-value gobbledygook that followed. Even typing in the simple homepage URL would redirect to this unfriendly URL. This was clearly broken, and there was no evidence as strong as watching this same uncertainty occur again and again in each users’ own idiosyncratic way.

In an effort to practice what I preach, last night I did some housecleaning on Contact Sheet. First, I changed the permalink filenames into meaningful, readable slugs. Rather than using an arbitraty number such as 0000117.html, the filename should reveal easy-to-associate clues about the content, like friendly_urls_site_maintenance.html. This is done in Movable Type by using the “dirify” option which loosely turns the entry title into the file name.

Next, I organized the article directory structure by date to make it easier to browse down a level and view entries by day or month. I’m guessing I’m not the only one that edits URLs in the address bar as a shortcut to navigation. MT doesn’t easily allow you to view by year and that’s fairly useless anyway, so it bumps you down to the complete archives if you try to view by year. Including the date in the directory structure or slug also tells the user how timely a piece of content is without having to click.

These changes likely duplicated my complete set of RSS entries in most RSS readers since it changed all entries’ permalinks. The old URLs will still work, they just won’t be updated with comments that are added after the changes were made last night. Had I known how to set these features up from the beginning I would have—changing URLs of content is never a good thing. If this were a professional revenue-generating site, I would insist on redirects. It is not, and I offer my sympathy.

What does any of this have to do with design? Well, it has little do to with graphic design and everything to do with information design. If users know any incremental information about a link, especially when obscurely referenced in an embedded fashion like so, they’ll be that much more likely to find some relevance and click. (Notice the hypocricsy in the last Jakob Neilsen link, even though he talks about domain names and not complete URLs as claimed.) In my case, users will know the date and approximate title of the linked entry in Contact Sheet.

To configure Movable Type like I’ve described above, you can manipulate the directory structure by choosing Weblog Config, then Archiving, and make sure the boxes are checked next to Individual, Daily & Monthly. Then fill in the Archive File Template field like so:

Individual: <$MTArchiveDate format="%Y/%m/%d/"$><$MTEntryTitle dirify="1"$>.html
Daily: <$MTArchiveDate format="%Y/%m/%d/index.html"$>
Monthly: <$MTArchiveDate format="%Y/%m/index.html"$>


by Dave S. » Jul 25, 2003 11:36 AM

Thanks for the elucidation Scott, it was enough to get me started on Googling to fill in the rest.

The nice thing about making a change like this in MT is that when you re-build, it re-creates your archives, but leaves the old files. Links don't break, and when someone goes to comment on an old post, the comment is automatically added to the new version. Very cool.

I'm all changed over. Now to work on better comment listings...


by Scott Steffens » Jul 25, 2003 11:55 AM

I'd suspected as much, Dave, since your RSS feed had 15 "new" entries, just like mine. ;)

I also added my methods above.


by Kristian » Jul 26, 2003 10:15 AM

I've been using a similar method for a while now, but I have one problem that sticks in my craw-- I must give my entries titles for this to work. If you're writing columns like John Gruber, this isn't a problem: Logically you should be titling your posts anyway. If you're just tossing out 1 line links, titling the posts doesn't make much sense.

I worked out a solution that was the ugliest kludge I've ever done. It gives me nightmares every time I look at it:

<$MTEntryDate format="%Y/%m/"><MTIfEmpty var="EntryTitle"><$MTEntryDate format="%B_%d_%I%p"$></MTIfEmpty><$MTEntryTitle dirify="1"$>/index.php

It works. It's horrendously ugly. It requires Brad Choate's MTIfEmpty plugin.


by jon » Jul 26, 2003 12:04 PM

yikes, it's *that* easy? let me try this and if i have any gotchas, i'll report back :)



by jon » Jul 26, 2003 9:00 PM

grrr my only issue now is that it has broken my "recent comments" page, and i can't figure out the incantation to make that section work...i.e. inside of my

there seems to be no way of referring to the original date of the archive (as opposed to the comment date, which generates an incorrect link)

yak. still hacking at it.


by jon » Jul 26, 2003 9:02 PM

uh oh, it blanked out my MT code... between the paragraphs it should say

<$MTComments lastn="5"&rt;


by bugger » Jul 26, 2003 10:31 PM

okay, obviously you have recent comments and friendly URL's working. i'm ready to see the secret whenever you're ready to tell.

j(yikes 4 comments in a row--sad)


by jon » Jul 26, 2003 11:18 PM

feel free to remove all of my comments. i needed to have my MTEntryDate inside of a MTCommentEntry inside my MTComments.

for added effect (and to let me switch languages at will) i added a handler for .jon files, so now all my stuffs is .jon's. word.


by Scott Johnson » Jul 27, 2003 1:52 PM

I like your template for the complete archives. How does that one work?


by jon » Jul 28, 2003 7:14 AM

oh you mean
? that was the hardest one to accomplish; i handcoded it all.


by Scott Steffens » Jul 28, 2003 11:13 AM

The stop design archives system is much more elegant, but here's how mine works:

<a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a> <font class="posted">(<$MTCategoryCount$>)</font><br />
<br />

<MTArchiveList archive_type="Monthly">
<a href="<$MTArchiveLink$>"><$MTArchiveTitle$></a> <font class="posted">(<$MTArchiveCount$>)</font><br />
<br />

<h3>Ad Nauseam </h3>
<a href="<$MTArchiveLink$>"><$MTArchiveTitle$></a> <font class="posted">(<$MTEntryDate format="%B %e, %Y"$>)</font><br />


by Scott Steffens » Jul 28, 2003 12:20 PM

Further reading on human-readable URLs:


by Sunny » Jul 29, 2003 10:22 AM

Thanks a lot for the info and template. Very helpful!


by Scott Steffens » Aug 1, 2003 11:04 AM

After using this "friendly URL" configuration for a week, one thing that I don't like: if you change the title of an entry for whatever reason, the URL changes.

A better solution for MT would be a user-defined slug (the UI could suggest one based on the working title) and have it stick with the article as a separate, editable field.


by phentermine » Dec 6, 2003 6:31 AM

agree with u


by Hale Scott » Dec 20, 2003 3:29 PM

The Tao's principle is spontaneity.



RSS: .91 / 1.0 / 2.0