Saturday, 19 September 2015

In search of the perfect URL

For the most part, I really don't care about URLs, at least those on public-facing websites. I mean, when do you actually type a full URL beyond the domain name? Not very often. On some browsers and mobile phones, the URL is shortened or hidden, and that's fine too.

There are those who spend a lot of time worrying about URLs for the purposes of Search Engine Optimisation (SEO). The URL should contain the right keywords, imply the correct hierarchy etc.

They're very welcome to try, although I'm not sure what difference it makes. I don't imagine that the engineers at Google (note: other search engines are available) have spent the last eighteen years crafting a search algorithm that radically alters its understanding of content based on an easily manipulatable address, much like I don't expect banks to predict my credit rating using the numbers on my credit card. However, in common almost everybody else, I don't know this for sure, and so the business imperative to mess around with URLs remains.

The particular problem with URLs is that they are keys on the web, that massive distributed database of which we each control only a tiny portion. Changing URLs breaks links from parts of the web outside of our control. Redirects can be set up for each change, which creates extra work, and extra complexity. Software engineers hate complexity, because therein await the bugs.

Anyway, I was sent a link the other day that's been doing the rounds on the Internet. It was an article from the lovely news site Quartz.

Being utterly inconsistent on that day with my initial assertion in this post, I spent longer reading the URL than the article (the girl was probably bored and disconnected from wifi, let's try not to panic). I was interested that they put a numeric ID in the URL (which my current organisation is moving mountains to remove).  I made an experiment, and changed the latter part of the URL:

Hey! It still works. A redirect takes you back to the original URL. They've opted for a permanent 301 redirect, but otherwise they could still change the original, provided the ID remained intact.

This is the sort of solution that I really like. The SEO folks can fiddle with the URL until the cows come home, the engineers have the luxury of a straightforward rule, and the user never sees a broken link. Is this simple structure enough to keep everybody happy?


  1. Funny enough, the Phone app on my phone is also hidden inside a folder, so my first guess from looking at the URL "whats-missing-from-this-13-year-old-girls-iphone-home-screen" was in fact "the phone"! :-)

    I actually handle URLs on my site this way as well. The slug for my posts can be changed arbitrarily, since it's not used to identify the post in my storage. This lets me change the slug if I rename the article later.

    Here's a bunch more thoughts on URL design you might be interested in:

    (Originally posted at

  2. Chrome Web Store has the same approach, except instead of a tiny ID it's an enormous and ugly hex string.. :)

  3. Zillow does the same thing with a zipid that allows the address in the URL to be formatted in various ways for SEO.