mail usprint this pagerss feed

Liip is hiring!

Cool URIs don't change

Especially not, if they're called "permalink" :)

I'm not talking about a reorganization of your site or a change of the blogging software and the sometimes inevitable change of uris after years or so (and it's most of the time avoidable nevertheless with some mod_rewrite magic), but changing them within a short time after an article was published...

Some blogging software generates the permalink automatically from the title, the date and evt. the category and create a new oneevery time you change the title for example due to a typo. Speaking urls are of course the way to go (see also the latest namics blog post about that subject, in German), but bad for aggregators like Planet PHP or Planet Ping. It leads to double posts...

There are mainly two solutions for the aggregator problem. The blogging software should use the <guid> element (in RSS 2) or the <id> element (in Atom) with a really not changing id (for the last post on this blog it is for example "http://blog.bitflux.ch/archive/id/3128/"). The Planet PHP software does respect those elements and updates the entry accordingly instead of inserting a new one when the <link> changed.

The second solution - and this also helps people, which already linked to your post - is not to change the permalink at all, even if you change the title. You may still have that typo in there, but others won't get annoying 404 pages.

Flux CMS does exactly this. It auto-generates a permalink for you (or better said, it makes a proposal on the fly, which you can change), but if you later change the title, it keeps the old URI. And you still can change it, if you really want to. And of course, it adds <guid> to the RSS 2.0 feed (which never changes, except if you delete the post and make a new one with the same title and content).

So, please dear blogging software vendors, add those features or add at least the <guid> or <id> element and make those really unique and permanent. It makes life for aggregators a lot easier.

Related Entries:
Comment feeds on list.blogug.ch
Planet PHP Sources now on GitHub
Do not steal content from Planet PHP ...
blogug in today's "heute"
Is automated headline-linking to blogs content stealing?
Comments (8) |  Permalink

Comments

Jürg Stuker @ 04.01.2006 10:11 CET
Agree but I don't like ID in the URL... It's rather a robots problem than a human ;-)

If one would really stick to the spec, the identification of the instance auf a ressource is the ETag header. Even if the same ressource is available under different URLs.
Chregu @ 04.01.2006 10:18 CET
Jürg: I'm totally against IDs in the URL, as well. It's ugly ugly ugly and not SEO friendly.

I just wanted say that the URLs shouldn't change after once set, even if there are little typos in it :)

But IDs in the "guid" or "id" elemnt in RSS/Atom feed are just fine, they should be never shown to the end user, but are very useful for aggregators and search engines.

ETag doesn't help much for RSS feeds. And I assume, most sites change their ETag as well, if the content (just slightly) changes, although I don't have hard fact data on that.
fa @ 04.01.2006 11:06 CET
What do you think of URLs like those Serendipity creates?
it's http://myblog/14-example-title and http://myblog/14-example-title-new that map to the same article.
It gives no 404 but the uri can still change, but the old one is still available.
chregu @ 04.01.2006 11:10 CET
fa: Not bad per se and a nice compromise for the 404 problem. I still don't like IDs in the URL, but the way S9Y does it, is acceptable.

Only this would still f*** up the aggregators, but S9Y adds stable guid elements to its RSS, eg:
<guid isPermaLink="false">http://blog.koehntopp.de/archives/1113-guid.html</guid>
Steph @ 04.01.2006 13:02 CET
I had an issue like that on one of my recent posts -- changed the permalink address around 15 minutes after posting. The time on my blog was off by 1 hour, and as I was posting a bit before midnight, it gave the impression the post was being posted the next day. I corrected the publication time of the post, and in the process it modified the url.

Ideally I would have added a redirect in .htaccess... if I didn't have such a mess in there already.
Jürg Stuker @ 04.01.2006 16:24 CET
OK agree. I read it again ;-.) I'll never change existing ULRs (unless once where we displayed the first 15 chars of the title "Google Web Analytics -- for free!"...
Matthew Delmarter @ 04.01.2006 17:04 CET
Out of interest Wordpress 2.0 does not change the permalink after the initial posting - even if the title of the posting changes etc. Not sure about previous versions.
Steph @ 04.01.2006 19:16 CET
WP doesn't change the post slug after the first posting. If the date changes, however, and if the date is part of the url, then that changes.

add a comment

Your email adress will never be published.
Comment spam will be deleted!

For Spammers Only
Name*
E-Mail
URL
Comment*
Notify me via E-Mail when new comments are made to this entry
Remember me (needs cookies)