10 Aug 2009 8 am eastern

Shorten this

In April of 2009, in a post every web designer, publisher, or business person should read, Joshua Schachter told how URL shortening services like TinyURL and Bit.ly came to be, and why the latest ones were so addictive. (Missing from Joshua’s account of their utility is the benefit URL shorteners can provide when sharing an otherwise obscenely long link on the printed page.)

The prescient post concludes that, despite their benefits, such services ultimately harm the web, decreasing clarity while increasing the odds of linkrot and spam:

[S]hortening services add another layer of indirection to an already creaky system. A regular hyperlink implicates a browser, its DNS resolver, the publisher’s DNS server, and the publisher’s website. With a shortening service, you’re adding something that acts like a third DNS resolver, except one that is assembled out of unvetted PHP and MySQL, without the benevolent oversight of luminaries like Dan Kaminsky and St. Postel.

There are three other parties in the ecosystem of a link: the publisher (the site the link points to), the transit (places where that shortened link is used, such as Twitter or Typepad), and the clicker (the person who ultimately follows the shortened links). Each is harmed to some extent by URL shortening.

There’s more, and you should read it all.

One of Joshua’s recommendations to minimize some of the harm is that websites do their own URL shortening instead of relying on middlemen. I’ve done some of that here, via the ShortURL plug-in for WordPress. Thus I use zeldman.com/x/48 instead of a much longer URL to notify my friends on Twitter about a new comment on an oldish thread. Likewise, zeldman.com/x/49 redirects to yesterday’s big post, “Write When Inspired.”

Rolling your own mini-URLs lessens the chance that your carefully cultivated links will rot if the third-party URL shortening site goes down or goes out of business, as is happening to tr.im, a URL shortener that is pulling the plug because it could neither monetize nor sell its service.

tr.im is now in the process of discontinuing service, effective immediately….

No business we approached wanted to purchase tr.im for even a minor amount.

There is no way for us to monetize URL shortening — users won’t pay for it — and we just can’t justify further development since Twitter has all but annointed bit.ly the market winner.

The Short URL Plugin for WordPress installs automatically. It provides simple statistics, telling you how many times a link has been clicked, sets up redirects automatically, allows you to choose a custom link style, and more. You’re not limited to shortening your own URLs, although that’s mainly how I use it; you can also shorten third-party URLs, turning your site into a miny TinyURL. I’ve used this plugin for months, with nothing but joy in its cleverness and usability.

[tags]ShortURL, plugin, WordPress, plugins, joshua schachter, tr.im, bit.ly, URL, Twitter, TinyURL, web, usability, internet, links, security[/tags]

Filed under: apps, Blogs and Blogging, Design, industry, plugins, Publishing, software, Standards, State of the Web, Usability, wordpress

76 Responses to “Shorten this”

  1. Chris Coyier said on

    Having your own-domain hosted URL shortner is definitely the way to do it.

    Even without a plugin, WordPress has short URL’s by way of the default URL structure. For example: http://www.zeldman.com/?p=1234 points to Jeffrey’s article about Super Duper. It’s a few extra chracters though, and not as pretty what with the question mark and equal sign. And this will only work for posts/pages, not any ol’ thing.

  2. Jeffrey Zeldman said on

    Chris:

    For example: http://www.zeldman.com/?p=1234 points to Jeffrey’s article about Super Duper.

    True. How did you discover that URL, by the way? Lucky guess?

  3. Ricky Onsman said on

    Good thinking, as usual.

  4. Eduf said on

    Yeah. At WP, we don’t need plugins at all. And we can just use Google Analytics to check the data about our traffic. Sounds old fashioned, but it works. :)

  5. Jack Osborne said on

    Cheers Jeffrey, I was wondering what plugin you were using to do this, after a quick Google last week I found this exact plugin and it does indeed work a treat.

  6. Chris Coyier said on

    @Jeffrey – Yep I just know that’s how WordPress blogs work and randomly typed in “1234”. You don’t have to guess though, you can find post ID’s through the admin. It’s a little obtuse, but they are part of the URL’s when (for example) editing a post (screencap)

  7. Chris Janton said on

    the post ID can be found in the last tiny bit of JS on the page – at least for now.

  8. Lee Phillips said on

    You are right: these things are stupid and harmful and
    you should never use them unless there is no other choice. Publishers
    should use short URLs so that people will not need to shorten them.
    A URL does not need to include the complete title of your
    article, the name of the author, and how you were feeling when you wrote
    it. It’s just an index into your content; it does not need to carry its
    own parcel of information.

    It’s trivially easy to use short URLs if you roll your own rather than use canned website software, too.

  9. kOoLiNuS said on

    Well man … you’ve sold me the use of the plugin for my selfhosted WordPress blog and, in general, made me think on an important aspect which I’ve never took time to ….

    Thanks!

  10. Joe Fiorini said on

    Another advantage to using your own link shortener, besides technical, is it helps keep your brand intact. What is the likeliness of someone clicking a link in a tweet like “Great article on URL shorteners http://bit.ly/1234567” vs. “Great article on URL shorteners http://zeldman.com/x/48“. The latter example immediately gives a little more strength to Zeldman’s brand.

    Another example, http://meetinbetween.us uses a built-in link shortener on a shortened domain. Any map a user generates will have a URL such as http://mtbwn.us/a1b2c3d4 along with a longer counterpart. That way we don’t lose our brand to tinyurl or bit.ly.

  11. Michael Kozakewich said on

    Since everyone wrote about Twitter shortening links, I’d been using a PHP script that lists $key and $value (from each $_GET), filters out the default WordPress keys (‘p’, ‘m’, ‘s’, ‘cat’, ‘feed’, ‘paged’, ‘page_id’, ‘preview’, and ‘tag’), and then redirects if the $key is equal to something I choose. For example, cozycabbage.com/?c goes to my business card.
    I’m getting into CakePHP, so I’ll be investigating if I can just do something like cozycabbage.com/c and skip out on that one last character.
    Ideally, I’d love to get cozy.ca/bbage and use that.

    I’m going to try that plugin, though, because it sounds awesome.

  12. Stephanie Leary said on

    The ID is also part of the post’s header tag ID in most themes — h2 id=”post-1234″ for example — which makes it easy to locate with Firebug without digging around in the WP back end.

    I’ve added the short URL to my theme next to the other meta data so I don’t have to look for it on every post (and everyone else can find it). I’ve posted the relevant code over on my WordPress as CMS blog.

  13. Zinni said on

    I completely agree with this and would love to shorten my own urls, however I think that you are neglecting that not all of us bought our domains at the dawn of the internet. Unfortunately for me an example of a shortened url for me would be: http://positivespaceblog.com/x/105 at 36 characters long that is a little over 25% of a tweet’s content.

    One other benefit of shortening your own urls that was not mentioned is the use of custom retweet buttons. It would be possible to create your own “Tweet this” links without having to worry about external shortening services going down, or the complexity of caching the generated link. This totally removes complexity.

  14. 일모리와 웹표준 said on

    [...] Shorten this » Jeffrey Zeldman 3 hours ago [...]

  15. Tr.im cierra sus puertas | Denken Über said on

    [...] el otro servicio de acortamiento de URLs que lideraba el uso dentro de Twitter junto a Bit.ly, y como dice Zeldman, todas las cuentas y links que uno acortó quedarán en el limbo hasta, quizás el 31 de diciembre [...]

  16. Kathy said on

    But if everyone starts using real URLs instead of hiding them behind gobbledygook, how am I going to trick people into clicking on my affiliate links for “products” no one needs?

  17. Daryl said on

    I think we need a solution similar to canonical URLs, but for short URLs. The problem is when I, as a user, tweet a link to your post… I would use bit.ly… not your fancy URL-shortener. Wouldn’t you rather have full-control over what URL I use?

  18. Zeldman on URL Shortening « Year of the Code Monkey said on

    [...] Zeldman has written an interesting article on URL shortening and, more specifically, how he rolled his own using a plugin for WordPress. He [...]

  19. Aaron Bazinet said on

    I like how John Gruber uses his own at Daring Fireball, like this: http://✪df.ws/dli. Not sure how he did that with the ✪ though.

  20. Lee Phillips said on

    Not sure how he did that with the ✪ though.

    It’s unicode “circled white star”; E296AA in utf8.

  21. Charles Roper said on

    It’s actually really easy to create your own URL shortening service in just 40 lines of code using Sinatra, a micro-web-framework written in Ruby. You can even have it hosted for free on Heroku. That’s pretty cute.

  22. Malware por descentralización, otra consecuencia más del cierre del Tr.im said on

    [...] que todo llegue a nuestro dominio, hagamos promoción a nuestra propia dirección. Zeldman hoy nos recordaba del Short URL Plugin y básicamente vamos a ver más direcciones cortas por todos [...]

  23. Joshua Schachter said on

    I updated my essay.

    It’s short URLs that are useful for print, not URL shortening services. Print would make the URL ever more durable, and the services even less so. So the idea of having the short URL be paired with the content as you suggest is even more attractive in this case.

    Joshua

  24. Geoff Thibeau said on

    @Aaron
    Symbols can be registered in domain names, mostly to appeal to the international market. For instance, say for some reason I wanted to register a Spanish domain name: sí, which translates as ‘yes.’ If I bought si.es, that would not be the same as sí.es, because ‘si’ (without accent mark) means ‘if.’

    But, for whatever reason, other characters were allowed that have no value towards pronunciation/clarification. Such as that star, or even ♬.ws.

    For more information, read this article from Wikipedia on punycodes.

  25. Andrew Warner said on

    I’d like to create my own short URL’s, but this plugin doesn’t work with TweetMeme. So, when users click the TweetMemem button my site, they still get bit.ly links.

  26. Aaron Bazinet said on

    It’s unicode “circled white star”; E296AA in utf8.

    Sorry, I meant not sure how he uses the ✪ in a domain. Also, last I heard, not all Twitter clients and browsers can parse them correctly. I wonder if that’s still the case.

  27. Michael Kozakewich said on

    You know, I just tweeted this to someone, and I had a hard time finding the link. I basically just guessed it was x/50, tried it to make sure, and then sent it off. (I’ve always hated how WordPress skips around so you can’t just alter the ?p string.)

    You should have the link in plain text at the top and bottom of your post, or a ‘Tweet this!’ button at the bottom.

  28. URL Shorting - Web Design Forum said on

    [...] [...]

  29. Shorter URLs | Aaron Mentele, Charisma 18 said on

    [...] I see now that Zeldman has a recent post on the topic. At quick glance, the plugin he’s using seems to require [...]

  30. Daring Fireball Linked List: Shorten This said on

    [...] Shorten This [...]

  31. Matt said on

    I’m surprised no one has mentioned Get Shorty. I’ve used it for a college newspaper to get shorter links to older stories and standing features — worked like a charm.

  32. Ged Maheux said on

    So Jeffrey, should everyone also host their own pictures on their own domains because Flickr might eventually go under? How about their own online bookmarks? Or their own Twitter pictures?

    Shortening your own URL’s no more guarantees they’ll be around 5 years from now than using Bit.ly or Tiny URL. The key is to pick the service that you feel and the market has shown is the most secure with and go with it. Rolling your own anything isn’t always the best or most economical answer.

  33. Byekick said on

    For those of you using ExpressionEngine or Textpattern rather than WordPress, Colly has a great piece on url shorteners for ExpressionEngine here:
    http://colly.com/s/774

    …and Stef Dawson produced one for Textpattern in double quick time here:
    http://forum.textpattern.com/viewtopic.php?id=30975

  34. Phil Nelson said on

    I’d like to take this opportunity to point out my own WordPress url shortening solution, la petite url, which has been out for a few months, and allows customization of the characters used for URLs. You can, for example, use only numbers, uppercase letters, lowercase letters, or any combination of both.

  35. Phil Nelson said on

    Both? Obviously I meant all three. I have no excuse.

  36. Shorten This « said on
  37. The Briefing: Who’s going to save your URL shortener from extinction? - Publishing 2.0 said on

    [...] Shorten this zeldman.com | August 10, 2009 Ryan Sholin says: Zeldman on URL shorteners: “Rolling your own mini-URLs lessens the chance that your carefully cultivated links will rot if the third-party URL shortening site goes down or goes out of business, as is happening to tr.im, a URL shortener that is pulling the plug because it could neither monetize nor sell its service.” (Note the link to an excellent WordPress plugin for short URLs deep in this post.) [...]

  38. Jeffrey Zeldman said on

    Publishers should use short URLs so that people will not need to shorten them.

    There are findability (“SEO”) benefits to writing longer URLs. Everything else being equal, a user’s search will turn up http://www.example.com/topics/xhtml-considered-harmful before it turns up http://www.example.com/?123 .

    Thus it makes sense, from the point of view of getting your content read, to have the system generate URLs based on your title, and to back up those URLs with your own short URLs when you want to provide a link on Twitter, in a printed magazine article, and so on.

    Short meaningless URLs (www.example.com/x/23) are of course infinitely preferable to long meaningless URLs—if a publishing system grinds out long URLs by default, these should be converted to short URLs before being exposed to the reader—but a mid-length URL that conveys information about the page’s content benefits publisher and reader alike.

  39. Faruk Ateş said on

    Django makes it ridiculously easy to host your own URL shortener, as I’ve employed on my newly-launched, Django-powered version of FarukAt.es. Much like WordPress’s, you can just let it take the ID of a post and have a single, one-line command in Django to redirect. Example: http://farukat.es/p285.

    I use the “p” addition to indicate that this is a blog post, in case I add other sections in the future (like a dedicated Link log) that would get their own ID column in the database. With Django, it’s almost too easy to do this, so there is really no excuse for a Django-powered site to not also have its own URL shortener.

    (also, I think WordPress should ship with that plugin, for slightly better URL shortening than the querystring example that is the default URL setup)

  40. Michal Migurski said on

    Ged, two things.

    Running your own shortener for your own work means that the lifetime of the link is at least somewhat related to the lifetime of the content and the reputation of the poster, rather than the lifetime of a third party.

    Also, I’m curious what the market would’ve said about tr.im 48 hours ago? “Looking good … looking good …. looking good …. aw, shit.”

  41. The death of tr.im, or why you are your own product manager (Jarrett House North) said on

    [...] contrast, Jeffrey Zeldman went the “buy” path, installing a WordPress URL shortening plugin to share pointers to his own content. For him, having [...]

  42. Tech News said on

    [...] [...]

  43. Erik Mogensen said on

    Jeffrey, I hope you still control those short URIs. What happens if you switch blogging platform, do you think that it could support your own tiny URIs?
    Remember, Cool URIs don’t change

  44. Online News, Videos, and Blogs from TechBlips said on

    [...] Comments vote downundo vote up SlashGear found this 6 days ago 1 Shorten This http://www.zeldman.com — Zeldman: Rolling your own mini-URLs lessens the chance that your [...]

  45. Evan Skuthorpe said on

    Thanks for the tip. I’ve only recently started using TinyURL for twitter!

  46. Jeffrey Zeldman said on

    @Erik:

    Jeffrey, I hope you still control those short URIs. What happens if you switch blogging platform, do you think that it could support your own tiny URIs? Remember, Cool URIs don’t change

    If I were to change blogging platforms, all my WP URLs would be lost—not just the short ones I use as links in Twitter. But there’s no danger of that. I won’t switch blogging platforms. WordPress is my love.

    Nor do I worry that WP will go out of business. They are widely distributed and know how to support themselves. They’ve found a magical balance between money and free. They are too good (and too profitable) to die, and too smart (and having too much fun) to sell out to a bad buyer who then wrecks the service.

    Remember, Cool URIs don’t change

    Tell me about it.

    http://www.zeldman.com/icon.html

    http://www.zeldman.com/15/

    http://www.zeldman.com/zlink.html

  47. JamesWilding.net - Clone TinyURL (and friends) with Rails said on

    [...] is closing down, and the blogs are a-chatter about why URL-shortening services are probably a bad idea if you care about your links, and why you should roll your own service if you [...]

  48. Lee Phillips said on

    a mid-length URL that conveys information about the page’s content benefits publisher and reader alike

    Since you’re replying to me, let me say that I think this and the other points in your response are absolutely correct. (Although I think the advantage in search engine placement is marginal, since once your page is indexed it will be found through its title, etc.; but marginal is not nonexistent.)

    My problem is that I don’t have any interest in Twitter and that, therefore, what you call a mid-length URL I think of as a short URL. I was recommending “short” URLs in contrast to the monstrous URLs generated by some publishers, that span several lines in an email. I think your mid-length URL is certainly short enough for a printed article. I appreciate that people who use Twitter need even shorter URLs, and your solutions seem ideal for them.

  49. Lee Phillips said on

    If I were to change blogging platforms, all my WP URLs would be lost

    But why? Your URLs don’t refer to anything WP-specific. You could host all your content with another platform, or place it all on a server as static pages, and use all the exact same URLs, no?

    Not that you would abandon your love, of course.

  50. Gonzo said on

    @Daryl, one can use link element with rev=”canonical” in the head of the document, to point to the appropriate short url. See what Jeremy Keith wrote few month ago.

    @Jeffrey, just to add about WP availability, the WordPress platform is GPL and it will always be arround, no mather what happens. Even if Automatic dispears (knock, knock), the software will stay available.

  51. Ash Searle said on

    Just a few thoughts on twitter and short-urls in general:

    1. Twitter should handle URLs without an “http://” prefix – I’m surprised they don’t do that already.

    2. more sites need to adopt the ‘no www’ philosphy. Publishing URLs without ‘www.’ and redirecting immediately to http://www.zeldman.com is something far too many sites seem incapable of doing.

    3. a short-url convention would be nice for all sites. People rarely (if ever) use paths beginning ‘-‘… it’s easy to add a rewrite rule to detect this, and it’s easy to read out (“blah blah slash dash blah”) – so maybe example.com/-urlid could be a convention (i.e. zeldman.com/-48)

  52. Five Minute Argument said on

    Twitter and SEO should shoulder a large part of the blame for this situation.

    It’s crazy that Twitter should count a URL as part of the character limit, and crazy that it doesn’t have a mechanism for linking actual text, as the web has always intended. 99% of people don’t need (and don’t care) to see a URL anyway.

    SEO techniques that make use of specific wording in the URL are insane. Very easy to fake, harder to guarantee uniqueness of URLs, and inconvenient.

    The point about twitter and bit.ly is particularly worrying. Is there any room in the market for both bit.ly and tinyurl? If not, an AWFUL lot of links are going to be lost – maybe not today, maybe not tomorrow …

  53. Sodo Minor said on

    WordPress is my love. Nor do I worry that WP will go out of business. They are widely distributed and know how to support themselves. They’ve found a magical balance between money and free. They are too good (and too profitable) to die, and too smart (and having too much fun) to sell out to a bad buyer who then wrecks the service.

    Man, have you ever swallowed the Kool-Aid.

    Love stinks, and everything else you just said could have been said by Wall Street, WAMU, GM (well, maybe not), the home mortgage industry, the major record labels and Napster.

    Enjoy the ride. Could be shorter than your URLs.

  54. URL Shortening Tip : Remember the User said on

    [...] makes a great point about URL Shortener plugins and services. What happens when they go down? All your links are [...]

  55. Haber Başlıkları - Cenk Demirdover said on

    [...] Shorten this Roll your own mini-URLs. [...]

  56. nezmar.com - Your own url shortener: the way to go? said on

    [...] According to Jeffrey Zeldman the solution is rolling your own mini-URLs [which] lessens the chance that your carefully cultivated links will rot if the third-party URL shortening site goes down or goes out of business [...]

  57. Sean O said on

    If running WordPress, the ShortURL plugin can work. If you want to create a URL shortener for your own web site, regardless of blog/CMS engine (if any), I recently posted an article on how to do so in under 50 lines of code, using PHP & MySQL:

    http://sean-o.com/short-URL

  58. IMAP | Weekly Digest for August 14th said on

    [...] Jeff Watson shared Shorten this [...]

  59. Preparation for the Fall | CoPress said on

    [...] Facebook, FriendFeed, and tr.im. Jeffery Zeldman, a notable designer, has taken the approach of not using any third-party URL shorteners and instead runs all of his posts off his own domain with a WordPress plugin called, you guessed [...]

  60. URL shorteners | Publishing 2.0 Reading | Newsgroup | Publish2 said on

    [...] Shorten this [...]

  61. Things I Shared This Week — kevinbriody.net said on

    [...] Shared Shorten This [...]

  62. Chris Neale said on

    @Ash Searle #comment-47070

    Re: 1. Twitter does link www. -prefixed URLs

  63. SitePoint Podcast #24: Those Frames are Ironic said on

    [...] Shorten This (Jeffrey Zeldman) [...]

  64. Short Links, IDNs (and Wordpress) - Who is Chris Neale? said on

    [...] This http://zeldman.com/x/50 and the comments attached to [...]

  65. Are URL shortners reliable? — Steve Kinney said on

    [...] Gruber, Jeffrey Zeldman, and Joshua Schachter all recommend that sites consider rolling their own shortened URLs.  Zeldman [...]

  66. Rahim Snow said on

    Jeffrey,

    Help me understand. The Short URL plugin allows you to manually create shortened urls. This means that once you finish a blog post, you go to this plugin, create a short url, and point it to your new blog post’s long url. Only then do you have http://zeldman.com/x/50, correct? Or am I mistaken? I tried the plugin and this is how it appears to behave.

    What I’m looking for is a plugin that automatically generates short urls of all your existing posts and pages. That way, as soon as you activate the plugin, the following urls become available

    http://zeldman.com/2009/08/10 (WP already does it for you)

    http://zeldman.com/?p=50 (WP already does it for you)

    http://zeldman.com/x/50 (the plugin would take care of this)

    Do you or anyone else know of a plugin that does that?

    Thanks so much!
    Rahim

  67. Rahim Snow said on

    Alright,

    Thanks to Dean Robinson’s comment at http://cdevroe.com/notes/wp-short-urls/, I found the answer I was looking for.

    Adding this line in your .htaccess

    RewriteRule ^x/([0-9]+)$ ?p=$1 [R=301,L]

    automatically gives your blog posts their own short URLs based on their post ID.

    http://zeldman.com/2009/08/10 (WP already does it for you)

    http://zeldman.com/?p=50 (WP already does it for you)

    http://zeldman.com/x/50 (that new line in your .htaccess takes care of this)

    Enjoy!
    Rahim

  68. bb said on

    Hi, please try this multiple URL shortener:
    http://0xbb.us
    It’ll shorten many links into one page, and provide visit count!
    It will work perfectly when you want to share many links at once,
    especially for contents like news, pictures….

    I hope you find it useful! ^^

  69. Tim said on

    Love this Plugin. This gives the links I offer to people a bit of legitimacy, just as emailing from my own email address does.

    Also, birds fly south in the winter.

  70. Indirizzi abbreviati? I grandi del web li gestiscono in proprio / Web 2.0, Social Network, Motori di ricerca, Blogging, P2p, Virus, Applicazioni web / Web *.0 / Mytech said on

    [...] soluzione più ovvia -suggerita anche da Jeffrey Zeldman- è quella di creare un proprio servizio di abbreviazione, cosa che diversi siti e servizi [...]

  71. Linky na vkend 253 | conBLOG pe Ji Bure said on

    [...] Shorten this [...]

  72. Permanent Redirect with an Action Filter | {funky fresh} said on

    [...] “Shorter URLs” and really enjoyed the insights. At the bottom of his post he credits Zeldman with a similar post, both focusing on the potential pitfalls and frustrations with URL shortening. [...]

  73. The Internet said on

    [...] in August Jeffrey Zeldman posted an article called Shorten This about the evils of URL shortening services. He says that publishers should publish their own short [...]

Comments off.