New permalinks

I'm now running the title-based permalink provider and while permalinks based upon titles do have their disadvantages (e.g. they change if the title changes and can be long), I do prefer having links that are more memorable and human-readable. The algorithm I'm using is fairly simple and based upon the following rules.

  • Titles are converted to lowercase and all words in the title are used.
  • All non-word characters (i.e. not a-zA-Z0-9) are stripped.
  • Spaces, full-stops, commas, semi-colons, colons, slashes and dashes are converted to underscores.
  • Extraneous underscore characters are stripped.
  • If this results in a zero length permalink (e.g. because the title only contains punctuation or international characters), the blog entry ID is used in the same way that it is used in the default Pebble permalink scheme.
  • Subsequent entries with the same title in the same day are appended with the blog entry ID (title-based permalinks still have a date portion to greatly reduce the chances of permalink clashing).

I'm sure there will be enhancements to this, but I think this is a good start. Let me know if you find any links that don't work in the way you expect!



Re: New permalinks

I changed my own blog to use pretty much the style of hyperlink you describe. Google refused to index my blog entries until I did so, now it indexes fine. I did also read that having words in your URL ranks higher than having them just in your page.

Re: New permalinks

I've never had any problems with being indexed by Google, but I did do some research on whether underscore or dash characters were better word separators. The conclusion I came to is that it doesn't matter too much anymore. I hope I was right!

Add a comment Send a TrackBack