Allowing Longer URLs for Permalinks

15th Jan 2006 stk
Question & No-hack Options

A member asks, "Can I change the maximum allowed length for permalink URLs?"

The answer: YES

We present three possible solutions. Two do not involve a core hack. If you want the hack option, follow the easy step-by-step directions. Both the pre-Phoenix versions of b2evolution (v0.9.0.x) and post-Phoenix versions (v1.6+) are covered. We also take a look at the believe that having a longer permalink URL helps page rankings (i.e., SEO). You might be surprised by the information presented.

We hope that you find this article useful and appreciate your questions and feedback.

Question from a member:

Where can I change the maximum allowed length (in characters) of the permalinks for a post?

There appear to be three possible solutions:

  1. Don't use really long URL's Long URLs are ugly, using them isn't doing your visitors any favors and long URLs can break in an email (a broken URL is an unlinked URL). Generally speaking, URLs should be short, easy to type and unique.

    You can specify a long title (e.g., Watch Me Kill The President! (Jan 13) "Ridiculous In America" on ABC ), but then a shorter "URL Title" (e.g., killing_the_president). There is a spot for this in the Back Office. You don't HAVE TO use your title as the default "URL Title". Many people do this when they have a long title.

    We recommend this 'short URL' solution over anything else.

    HOWEVER ... search engines parse the title for words .. (not sure how they handle the underscores) but you *might* end up with better rankings with a long (and descriptive) title. (We've discovered some interesting information regarding rankings and URLs, which you can read about on the last page, below).

  2. Use "Post called up by its URL title". A possible solution if your server supports "clean urls" or "extra-path info". (To set this option in the back office, go to ... settings --> Link Options --> select the "Use extra-path into" box.

    Instead of "URL title", try "Post on archive page, located by it's title". This may achieve most of what you're looking for, as it yields the full title in the URL and doesn't require any core file hacking.

  3. Hack your b2evolution installation to allow for longer URLs. There are some changes you must make to enable really LONG urls. Here's what you do ...(depending on which version you have, select the correct page, below). Unsure?

  1. Question & No-hack Options
  2. Dawn (v0.9.1.0) or Earlier
  3. Phoenix (v1.6 Alpha) or Newer
  4. Longer URLs & Page Ranking