File Under: Web Basics

Why URL Shortening is a Threat to the Web

The popularity of Twitter has caused an explosion of URL shortening services, but who really benefits from short URLs? The answer, according to Joshua Schachter, is not you. The only real winners are the shortening services themselves, which get huge amounts of traffic for their proxy-like services.

The rest of us, however, are getting screwed. The most obvious problem is that shortened URLs could lead anywhere — a spam site, a phishing site, a porn site, a malware site, who knows?

Of course this isn’t a new problem. Twitter may be responsible for thrusting URL shorteners back into the mainstream, but the idea began as a way to fix the shortcomings of some e-mail clients (we’re looking at you here Outlook), which often wrapped long lines, making links impossible to click on. However, URL shorteners quickly fell out of popularity, and for good reason: the proliferation of spam and link hijacking made most of us reluctant to click on something that could lead, well, anywhere.

Then there’s the problem of long-term viability of your links. As Schachter points out, shortened links are, thanks to the additional layer of a shortening service, even more vulnerable to link rot:

The extra layer of indirection slows down browsing with additional DNS lookups and server hits. A new and potentially unreliable middleman now sits between the link and its destination. And the long-term archivability of the hyperlink now depends on the health of a third party. The shortener may decide a link is a Terms Of Service violation and delete it. If the shortener accidentally erases a database, forgets to renew its domain, or just disappears, the link will break. If a top-level domain changes its policy on commercial use, the link will break. If the shortener gets hacked, every link becomes a potential phishing attack.

So is there a solution? Schachter suggests that sites which generate long URLs (think for example, Google Maps or Amazon.com) could provide their own shortened URLs.

Blogger Jason Kottke has another possible solution: make the URL shortening part of Twitter. “In cases where shortening is necessary, Twitter should automatically use a shortener of their own,” Kottke writes, adding, “that way, users know what they’re getting and as long as Twitter is around, those links stay alive.”

Given that URL shortening servers are incredibly easy to set up (there are Django apps, PHP libraries, and quite a few Ruby-based solutions that Twitter could use) the overhead for Twitter seems very low. If Twitter disappeared the URLs would too, but so would all the pages that use them, so there’s no real loss.

Perhaps eventually Twitter will add a built-in URL shortening feature, but in the mean time, shorten with care.

[Update: Another proposed solution is Robert Spychala's idea of using the HTML tag to allow auto-discovery of canonical short URLs. In other words each page could define a its own short URL and link to it in the head tags. Very well reasoned argument and probably, in the end, the best idea I've seen.]