News for hackers. Stuff that matters.
Re:Bit.ly was down by jhund on Sunday January 13, 2013 @10:45AM (#5050966)
As far as I can tell, the two primary reasons for using URL shorteners are the ability to

a) share long URLs via twitter and

b) track clicks on shared links.

The downsides to URL shorteners are:

a) single point of failure for links. This one is very significant, more below.

b) obscurity of a link's destination. This is mostly annoying and enables spammers to obfuscate their spam URLs.

We can't overestimate the seriousness of having a single point of failure on web links: URL shorteners are a man-in-the-middle, or a choke point for the connection to a web page. All traffic has to go through the server that hosts the shortened link. And if that man-in-the-middle for some reason doesn't want to, or can't redirect to the next destination, your link is broken. And nobody can tell where it pointed to. So not only is the link broken for as long as the man-in-the-middle is not available, but nobody can find out where it led to originally. There is no workaround! So why would the man-in-the-middle not redirect the link? Here are a few reasons:

* the server is down for technical reasons. This happens all the time, most recently with bit.ly.

* the company that runs the server goes out of business. What do you know about the financial situation of your link shortening service provider? How can you be sure that they will still be paying for and looking after their servers in a month, a year, in 10 years?

* somebody who doesn't like what you are linking to makes sure that your links are not being redirected. The incredible democratic power of the internet is being subverted by installing choke points on the internet that allow selective disabling of certain locations on the internet. And how convenient would be the ability to disable all links that point (via a choke point) to an unwanted URL. Not only could somebody break those links, but they could also destroy the information about the location of that unwanted URL with an encrypted string like "bit.ly/SDJHGe65sef". Nobody would know where the link pointed to without access to bit.ly's database.

* the URL shortening service's DNS stops working. Bit.ly is registered in Libya. Who knows what regime will be in power there in a few months. Will they continue to allow Western companies to use '.ly' TLDs?

By sharing shortened links on twitter, you're not dealing with one man-in-the-middle, but two: Your own shortening service and Twitter's t.co shortener. So you have two single points of failure in series. You just doubled the probability of your links being broken.

It seems to me that the disadvantages and risks far outweigh the benefits of using shorteners (at least for links that I hope to be around for a while).

So what are the alternatives to using shorteners? Twitter already distinguishes between displayed and expanded URLs, so there is really no need to apply choke-point shortening. The click tracking is a bit more complex. If you share links on a platform you control, you could do something similar to what google does with their search results click tracking. Or, if you want to share your links on somebody else's platform, make sure that the platform can provide you with non-invasive click analytics.

Re:Bit.ly was down by matb33 on Sunday January 13, 2013 @11:26AM (#5051047)
Does a URL shortener service exist that compresses the URL instead? It wouldn't be as short of course, but then you could recover the original URL yourself if the service is down. A browser could, should this become a popular enough method, be capable of detecting such compressed URLs and doing the decompression and redirect
Re:Bit.ly was down by kmfrk on Sunday January 13, 2013 @11:45AM (#5051097)
Depending on how obscure your links are, you can use .htaccess to go from mysite.com/blog/2012/05/05/somethingsomethingsomething to mysite.com/s/1231, assuming it's not a static website.

Stack Overflow do the same for instance.

Re:Bit.ly was down by pavel_lishin on Sunday January 13, 2013 @11:54AM (#5051128)
I think he's talking about something that shortens any arbitrary link.
Re:Bit.ly was down by kmfrk on Sunday January 13, 2013 @01:12PM (#5051328)
That was my impression, too, but I just wanted to cover a - comparably - dead-simple solution, since we sometimes forget the old-school approaches to an agonizing problem.

With .htaccess, there isn't really anything external - a new point of failure - to screw up the redirects.

Re:Bit.ly was down by niggler on Sunday January 13, 2013 @12:42PM (#5051257)
>By sharing shortened links on twitter, you're not dealing with one man-in-the-middle, but two: Your own shortening service and Twitter's t.co shortener.

does Twitter shorten links that have already been shortened? Seems strange

Re:Bit.ly was down by jhund on Monday January 14, 2013 @12:51AM (#5053445)
Yes, as far as I can tell, twitter shortens every URL they encounter. I assume that they want their own share of the analytics cake.