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”
Comments off.

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.
Chris:
True. How did you discover that URL, by the way? Lucky guess?
Good thinking, as usual.
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. :)
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.
@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)
the post ID can be found in the last tiny bit of JS on the page – at least for now.
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.
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!
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.
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.
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.
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.
[...] Shorten this » Jeffrey Zeldman 3 hours ago [...]
[...] 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 [...]
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?
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?
[...] Zeldman has written an interesting article on URL shortening and, more specifically, how he rolled his own using a plugin for WordPress. He [...]
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.
It’s unicode “circled white star”; E296AA in utf8.
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.
[...] 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 [...]
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
@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.
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.
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.
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.
[...] [...]
[...] I see now that Zeldman has a recent post on the topic. At quick glance, the plugin he’s using seems to require [...]
[...] Shorten This [...]
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.
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.
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
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.
Both? Obviously I meant all three. I have no excuse.
[...] Original source : http://www.zeldman.com/2009/08/10/shorten-this/… [...]
[...] 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.) [...]
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.
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)
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.”
[...] contrast, Jeffrey Zeldman went the “buy” path, installing a WordPress URL shortening plugin to share pointers to his own content. For him, having [...]
[...] [...]
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,
[...] 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 [...]
Thanks for the tip. I’ve only recently started using TinyURL for twitter!
@Erik:
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.
Tell me about it.
http://www.zeldman.com/icon.html
http://www.zeldman.com/15/
http://www.zeldman.com/zlink.html
[...] 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 [...]
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.
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.
@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.
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)
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 …
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.
[...] makes a great point about URL Shortener plugins and services. What happens when they go down? All your links are [...]
[...] Shorten this Roll your own mini-URLs. [...]
[...] 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 [...]
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
[...] Jeff Watson shared Shorten this [...]
[...] 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 [...]
[...] Shorten this [...]
[...] Shared Shorten This [...]
@Ash Searle #comment-47070
Re: 1. Twitter does link www. -prefixed URLs
[...] Shorten This (Jeffrey Zeldman) [...]
[...] This http://zeldman.com/x/50 and the comments attached to [...]
[...] Gruber, Jeffrey Zeldman, and Joshua Schachter all recommend that sites consider rolling their own shortened URLs. Zeldman [...]
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
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
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! ^^
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.
[...] soluzione più ovvia -suggerita anche da Jeffrey Zeldman- è quella di creare un proprio servizio di abbreviazione, cosa che diversi siti e servizi [...]
[...] Shorten this [...]
[...] “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. [...]
[...] 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 [...]