Brainstorms and Raves

Notes on Web Design, Development, Standards, Typography, Music, and More

Sun

28

SEP

2003

More on Friendly URLs

Friendly, lasting URLs are easy enough to manage when you create the site architecture and URLs yourself, but with the increasing popularity of weblogs and content management programs there’s been increasing interest in what can be done to ensure friendly URLs that can be permanent regardless of programs used, changing servers, or changing programs. Today’s post looks at a few possibilities and pitfalls with Movable Type.

Movable Type’s URL Approach

One of the many reasons I switched to Movable Type is its ability to customize the URLs; however, as wonderful as Movable Type is, even Movable Type doesn’t yet have a separate field for the entry URL. The default uses the entry ID, but a certain amount of customizing is possible, including using the entry title.

Many have come up with helpful hacks and workarounds, but these may still rely on using one of MT’s other fields, especially the entry title field or the keywords field.

MT’s Default Entry ID for Entry URLs

Using MT’s default Entry ID to generate your entries' permalinks can be a nightmare as soon as the webhost’s server upgrades or if you change webhosts, both of which are common. When MT is installed on the new server all the entry IDs can change which in turn changes all your entries' permalinks. That, of course, breaks all the links to any of your entries and can mess up your search engine rankings.

Unfortunately, many people don’t find out about this nightmare until after the fact when they’ve got a huge mess on their hands.

Using Keywords for Entry URLs?

I’ve written about using keywords before, such as in my post last month, Movable Type Entry URL Choices. I’m using keywords to generate URLs for other portions of this site, but I haven’t used them for my weblog post URLs. Mark Pilgrim is using keywords to generate his URLs, and it seems to work fine for him.

This approach does indeed give the user control over the entry URL. I’m hesitant to use that approach for my entry posts, however, because of potential problems if you want to use keywords for other things, such as to help the MT Search feature. As I mention, though, this can be a very good solution for some, and I do use it elsewhere, just not for my weblog posts.

Using Dates for Entry URLs?

Using dates for entry post URLs may be the safest approach for the moment, and they do indeed have some meaning to human eyes, too. I’ve been impressed with Már Örlygsson’s Howto: Future-proof URLs in Movable Type, and I’ve followed most of his suggestions. However, I also wanted to use meaningful words for the entry URL.

Entry Title for Entry URLs?

As I mentioned, I’m following most of Már Örlygsson’s future-proof URLs in Movable Type suggestions. The exception is that instead of using the time for the entry URL I’ve been using the entry title. My solution has been a compromise, though, as I’m still using another MT field—the entry title field—to generate part of the permanent URL.

The advantage to this approach is that it provides meaningful words for the entry URL, which I prefer. That has made it worth the compromise to me; however, I haven’t been totally happy with this, either.

The disadvantages:

  • If I decide to change the title, or if I catch a typo in it, for example, that also ends up changing the entry’s permanent URL.
  • More than 3 or 4 words makes the URL too long.

Prior to launching the redesign of my site using Movable Type I looked around for plugins or scripts to allow me to even use just the first couple of words of the entry title, but I came up dry.

There are ways to generate a specific number of letters but not the number of words, at least not without using PHP or other scripting that my ISP doesn’t support. This could prevent the entry URL from getting too long, but it also cuts off words right in the middle of them. An example of this is at Nick Bradbury’s Typepad-based weblog. Click on some of the permalinks and check out the URLs and you’ll see what I mean. This approach solves the dilemma of entry title-based URLs getting too long. The meaningful words are compromised, though.

Keyword Field Compromise for Entry URLs?

Dave Dribin has just created a Movable Type plugin solution that seems like the best of everything to me for right now, his new Movable Type Short Title Plugin. This plugin utilizes the keywords field but it only uses the words that you place within brackets.

For example, this is what I’ve used to create this entry’s URL:

[URLs]

If you look in your browser’s address bar you’ll see the result following the date:

.../urls/

I can still use the keywords field for any other purpose without altering the entry’s URL. The keywords within the brackets are also still available for other uses, too.

So if you’re going to use keywords for your entry URL, Dave’s new plugin is the way to go.

Using Dave’s Short Title Plugin, if you don’t put any keywords within brackets, the entry title will be used for the URL. You can read all the details at his post Fixing Movable Type’s Permalink URLs and download the Short Title Plugin from his website.

For now this is what I’m choosing to utilize. The ideal, though, is for MT to provide a dedicated URL field so that we don’t have to create hacks and workarounds using other MT fields.

Dave’s Index Patch

While you’re at Dave’s site, also check out his new Index Patch, too. It allows MT’s archive index templates to use a directory index rather than the page name, such as /archives/ rather than /archives/index.html.

Related Entries

04:26 pm, pdt28 September, 2003 Comments, Trackbacks (14) ·

Categories: Colophon, Development, Movable Type, Usability, Weblogs

Comments

Comments, Trackbacks: 14 so far. Add yours!

  1. Nick Bradbury points to Paul Hammond's An open letter to tableless recoders. Follow that with his More on tableless recoders...

    29 Sep, 2003Trackback from Rodent Regatta

    trackback #1 permalink ·

  2. 1) The hard part for me about changing to each URL to a single keyword is that I have to...

    29 Sep, 2003Trackback from LibraryPlanet.com

    trackback #2 permalink ·

  3. Yesterday, I had an opportunity to be semantic or use good semantics or be a member of the semantic web...

    30 Sep, 2003Trackback from Rodent Regatta

    trackback #3 permalink ·

  4. During the past 36 hours most permalinks have changed on this site. Following others, who ranted about the problems with...

    30 Sep, 2003Trackback from NetFactory

    trackback #4 permalink ·

  5. 1) The hard part for me about changing to each URL to a single keyword is that I have to...

    01 Oct, 2003Trackback from LibraryPlanet.com

    trackback #5 permalink ·

  6. Cruft-free URLs in Movable Type: Mark Pilgrim has created a great URL scheme in Movable Type for the cleanest URLs I've seen yet. Clean URLs are an anal-retentive obsession with me. I found this a great page at Brainstorms and...

    02 Oct, 2003Trackback from Gadgetopia

    trackback #6 permalink ·

  7. During the past 36 hours most permalinks have changed on this site. Following others, who ranted about the problems with...

    03 Oct, 2003Trackback from NetFactory

    trackback #7 permalink ·

  8. ...to Shirley Kaiser's work because this is simply some of the best content in the world of weblogging for those...

    05 Oct, 2003Trackback from Rodent Regatta

    trackback #8 permalink ·

  9. Yesterday, I had an opportunity to be semantic or use good semantics or be a member of the semantic web...

    15 Oct, 2003Trackback from Rodent Regatta

    trackback #9 permalink ·

  10. Hi, do you understand how to install or apply Dave Dribin’s Index Patch? I can’t seem to figure this one out. THANKS!

    04:27 am, pdt 9 August, 2004Comment by dave

    comment #10 permalink ·

  11. Hi, Dave,
    I use Dave’s Short Title Plugin, but I have not used Dave’s index patch, so I don’t have any tips for you on that.

    Have you contacted Dave Dribin regarding your questions about this? If not, I suggest contacting him directly. His contact info is located at his website via his Contact Dave Dribin page.

    09:00 am, pdt 9 August, 2004Comment by Shirley Kaiser

    comment #11 permalink ·

  12. Hello, I’m wondering if your MT hacks are still functioning if you’ve upgraded to MT 3.11...? Thanks for your time.

    08:36 am, pdt 7 September, 2004Comment by Dave

    comment #12 permalink ·

  13. Hi, Dave,
    I haven’t upgraded to MT 3.x anything yet. I’m still using the same version from a year or so ago.

    Have you upgraded, and if so, is this plugin still working fine? Keep me posted, as I want to make sure that still works before I upgrade. :-) Thanks!

    09:49 am, pdt 7 September, 2004Comment by Shirley Kaiser

    comment #13 permalink ·

This discussion has been closed. Thanks to all who participated.

top


Visit iStockPhoto - Royalty-free stock images. Click Upload Earn, Click Download Create 

I Wrote a Book

Deliver First Class Web Sites: 101 Essential Checklists  Via amazon.com: Deliver First Class Web Sites: 101 Essential Checklists, by Shirley Kaiser. SitePoint Books (July 2006). 

Available now via: SitePoint Books, Amazon.com, Amazon.ca (Canada), Amazon.co.uk (UK), Amazon.fr (France), Amazon.de (Germany), Amazon.co.jp (Japan), Tower Books U.S. and elsewhere! You'll also help support this site and its owner if you purchase via any of these links.

Learn more at SKDesigns - Deliver First Class Web Sites and via SitePoint Books.

Recommended Books

Cover - Beginning CSS Web Development: From Novice to Professional. by Simon Collison.

 Book cover: Transcending CSS: The Fine Art of Web Design (Voices That Matter). by Andy Clarke, Molly Holzschlag. 

Hand-picked best book recommendations for Web site design, CSS, graphics, Photoshop, color, accessibility, more

In association with
 In Association with Amazon.com 
http://brainstormsandraves.com/archives/2003/09/28/urls/
Page last modified 14 July, 2007 - 10:19pm PDT Page load time: 0.011187 seconds.