A Word on the Permalinks

By Richard X. Thripp at 2008-05-25T14:02:40Z in News, with these tags: permalinks, jump to comment form. 337 words.

I want to tell you why I picked the structure for the permalinks, which is /%postname%-%post_id% (thripp.com/blog/threaded-comments-9 is a recent example). While /%year%/%monthnum%/%day%/%postname%/ is the norm and seen with such blogging services as Wordpress.com, I dislike it for a few reasons:

• When you have 2004/12/16 in your URI, even if your post is as relevant now as ever, I’m going to think it’s dated as soon as I hover over the link. Dating your posts simply doesn’t work for timeless content.
• Too many slashes. It’s an eye-sore, especially when scribbled.
• The trailing slash. Almost no one leaves the trailing slash in a URI, when telling it in print or over the phone. It’s supposed to signify a directory (where no slash means a file), but now that mod_rewrite is so accessible, to distinguish is pedantic. The trailing slash is ugly, archaic, and pointless.
• Not abstracted enough. Cool URIs tell you nothing about the content. But since Google doesn’t like that, I put the post title in there. We don’t need the date too.
• The post ID is good because you can have any number of posts with the same title, even on the same day. It’s unique to your blog, so it stays short and sweet, and I’ve put it at the end of the URI, so the most important text is first. You could go with no post ID, but then you risk name clashes and other incompatibilities.

Downsides of /%postname%-%post_id%:
• If you delete the post, you lose the ID and thus the permalink.
• You can use up post IDs with drafts, galleries, and test posts, and they’re created as soon as you save a draft, so if you don’t publish for a while, your posts will not have incremental post IDs. So the post ID is not a counter. It doesn’t need to be, though.

If you don’t like your permalinks at thripp.com, you can change them! Just go to Settings > Permalinks in your administrative section, and choose “Day and name” or whatever format you like.

Post to Twitter Post to Plurk Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Ping.fm Post to StumbleUpon



One Comment — continue the discussion. RSS feed for this entry.


Have no fear — commenting is here. Comments RSS feed.

These HTML tags work: a href, abbr, acronym, b, blockquote, code, em, i, strike, strong, u. You will be emailed if anyone replies to your comment. Gravatars work here. Thanks for commenting!