URL design

It pays to keep your URLs clean. Preferably just directories, no trailing filenames, and certainly no default.aspx type stuff on the end. Why? Because you’re aiming at humans, most of whom can’t remember that kind of stuff, and don’t want to be bothered typing it.

Everything that Jakob Nielsen wrote five years ago still applies. You want URLs that are memorable, easily typable, short enough to send in emails without getting chopped-up, that don’t automatically add weird parameters screwing up bookmarks and browser autocomplete, and can be passed by word of mouth.

Hey Joe, look at this site. www dot geekrant dot org

wins over

Hey Joe, look at this site. h t t p colon slash slash w w w dot geekrant dot org slash index dot php

every time.

This stuff is not hard. For Apache people, .htaccess works wonders. For the IIS crowd, fiddle with the default page settings. There is no excuse for www.microsoft.com/windows forwarding to www.microsoft.com/windows/default.mspx. Anybody who bookmarks that will be in for a shock the next time they move to a new scripting technology and change their file types.

Hide the default/index.html/asp/aspx/cgi/php/whatever from your users by linking back to your index pages without using the filename… eg root of this directory “./”, parent directory “../” and so on. Also aids in what Nielsen calls “hackable URLs”.

Redesign them by all means, give your 404s options to go to the home page, or search, or a site map. But don’t make your 404s jump to special page, changing the URL. Do you know how irritating it is to get a 404 that’s hidden what you typed, so you don’t know what you got wrong?

Though it’s become kinda fashionable to chop it, I still lean towards including www on the front in URLs, because it means you can put it in written form without the http:// and there’s no doubt what you’re talking about.

PS. Which browser vendor will be the first to hide http:// in the address bar when it’s not needed? Newbies really don’t need to be trying to type that every time, especially as no browser requires it to be entered.

PPS. Yeah I still call them URLs, not URIs. As the W3C says, an http URI is a URL. So there.

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

2 thoughts on “URL design

  1. Andy Merrett

    I like the http to be honest because it is then obvious when it changes to a secure page or some other type of page (local filesystem, ftp, etc.). Consistency breaks if only one of these is removed. I don’t know if newbies do try to type that bit in or not?

    I agree with all your methodology and I try to employ it on my own blog (not sure how it will translate to my future project on another domain yet – I’ll try…) – however we both use the date format in our URLs – how would someone fare trying to direct someone to an individual article? Not too well. It is possible to employ a double-naming scheme (perhaps just having the article ‘slug’ after the domain name and first slash).

    So, for this article, we might be able to go to ‘geekrant dot org forward slash url hyphen design’ (maybe lose the hyphen) – instead of ‘geekrant dot org forward slash two thousand and four forward slash ten forward slash twenty nine forward slash url hyphen design’.

    😀

  2. Daniel

    http when sending URLs in electronic form, certainly, since many email systems only hyperlink it if that’s there.

    But a no-no for paper print, I’d argue. Yes, I have seen newbies carefully type “http://” only to stuff it up, and wonder why it didn’t work. “www” should be indication enough as to what you’re getting. Secure or not is rarely relevant when promoting the site offline.

    The date, particularly for sites with multiple-contributors, is probably inevitable. Either that or some kind of numeric system to ensure unique URLs over time, since on most sites a topic (and even a headline/article title) is likely to be revisited eventually.

Comments are closed.