ShortURL

The Short­URL Word­Press plu­gin allows you to use your blog as your own URL short­ern­ing ser­vice by imple­ment­ing both the HTML and the HTTP Short URL Autodis­cov­ery spec­i­fi­ca­tions. Your short URLs will be in the form of http://domain/-code.

The autodis­cov­ery fea­ture allows third-party ser­vices that honor it to use your own short URLs instead of gen­er­at­ing new ones using ser­vices such as TinyURL, bit.ly, and oth­ers. This gives your posts and pages canon­i­cal short URLs that give you all SEO ben­e­fits and don’t leak traf­fic out to exter­nal domains and will pre­vent linkrot. The home­page short URLs is set to just http://domain/ as a unique feature.

The other great ben­e­fit of the Short­URL plu­gin is that the gen­er­ated short URLs won’t break if you change the perma­link struc­ture of your blog or rename the slug of a par­tic­u­lar post or page.

Due to the recent choice of both the micro­for­mats com­mu­nity and WordPress.com to use rel="shortlink" vs the alter­na­tive pro­pos­als, the Short­URL plu­gin is also using it now.

More on the topic:

DEMO: The short URL of this page is: http://nikolay.com/-1z

Plu­gin Statistics
Down­loads: 1,573
Rat­ing: 3 stars by 3 users
Cur­rent Version: 0.4.2 released 902 days ago

Down­load Ver­sion 0.4.2 (requires Word­Press 2.7 or later)

Please, visit the Short­URL at WordPress.org for more sta­tis­tics and reviews!

24 thoughts on “ShortURL

  1. I unzipped the packet, uploaded and acti­vated the plu­gin. For the life of me, I can’t see the plu­gin any­where in the set­tings, or where to actu­ally use the plu­gin. Please help.

    • As of release 0.4.2, the plu­gin doesn’t have any cus­tom set­tings — it just silently cre­ates, han­dles, and exposes to ser­vices your short URLs with­out any bells and whistles.

      If you want to pro­mote your own short URLs, then you cur­rently have only one option — to use either the_shorturl(), or get_shorturl() func­tion in your blog’s template.

  2. Here’s the error mes­sage
    Warn­ing: preg_match(): Com­pi­la­tion failed: unrec­og­nized char­ac­ter after (?< at off­set 10 in /wp-content/plugins/shorturl.php on line 87

    • I guess you have an older ver­sion of PHP. I’m gonna roll out a fix in a bit. I will ping you once it’s avail­able. The new release will also add sup­port for Tweet­able, which is pretty decent and will auto­mat­i­cally tweet your new posts using your own URL shortener.

  3. I pro­pose an option to show the short URL on the page. That way if any­body feels like shar­ing it they don’t have to have to go through the trou­ble of a shortener.

    I added a quick and dirty func­tion to the script if you’re inter­ested, and could be an input that auto-selects text for the user for easy copy and past­ing, but more than any­thing I just wanted to show demand for such func­tion­al­ity:
    http://blowintopieces.com/blog/wp-content/uploads/2009/08/shorturl_showURLOnPage.patch

    Chee­rio.

    • Yes, that’s the idea I’m work­ing on. When you use an alter­na­tive domain like mybl.og in your exam­ple, the dash/tilde won’t be nec­es­sary, which would make the short URLs even shorter.

  4. Sounds very great! The top-notch would be a fea­ture like already imple­mented in the “Synected” plu­gin: That vis­i­tors can gen­er­ate their own short-url (option­ally with an own string after the dash) — how­ever: Let me know if you need some beta-testing, my site is still under heavy devel­op­ment so I’m always able to test things out.

    Greet­ings,
    Olli

  5. I pro­pose an option to show the short URL on the page. That way if any­body feels like shar­ing it they don’t have to have to go through the trou­ble of a shortener.

    I added a quick and dirty func­tion to the script if you’re inter­ested, and could be an input that auto-selects text for the user for easy copy and past­ing, but more than any­thing I just wanted to show demand for such func­tion­al­ity:
    http://blowintopieces.com/blog/wp-content/uploads/2009/08/shorturl_showURLOnPage.patch

    Chee­rio.…

  6. Hi Niko­lai,

    the redi­rect is work­ing fine, but the_shorturl() or get_shorturl() aren’t. I’ve found that it’s because of a var name in line 15 (should read $id, not $post_id) and now it’s work­ing ok.

    Thanks a lot for the plu­gin, it solves per­fectly a prob­lem I had with twit­ter and exter­nal shorteners.

  7. Hey, I really like the plugin.

    I’ve got a cou­ple of minor fixes to make it com­pat­i­ble with more ver­sions of PHP.

    Also, I’ve got a sim­ple options page to make it eas­ier to set up the seper­a­tor char­ac­ter, etc.

    Please con­tact me, I’d like to con­tribute to the plugin.

  8. Hello,
    I installed the plu­gin, acti­vated in wp-admin and then used both the func­tion in the fol­low­ing man­ner —–>

    and

    and I got noth­ing echo’ed/printed.

    This is really annoy­ing. Can any­one tell me why noth­ing is being echo’ed/printed??

    Thanks,
    Quanta

  9. I’ve installed Short URL and Tweet­able but can­not find out how they inter­act. I would like Tweet­able to tweet my posts with Short URL, but I can­not find the set­ting to make that hap­pen. Can you enlighten me?

  10. Are you still work­ing on this? I’m inter­ested on the Tweet­able func­tion. I hope there will be a new ver­sion in the near future.

    Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>