Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why doesn't t.co (and, in fact, any URL shortener) follow the redirect chain first, before shortening the URL?


Because it's a semantic thing. If I tell Twitter that I want to link to a web page, they damn well better link me to that web page, and not what it redirects to, because I've asked them to link me to that web page. I could be using the link shorteners for analytics, all sorts. Maybe I'm targeting different URLs to different users. Yes, for almost all users removing the shorteners is preferable, but the SEO people would be up in arms. The real thing here is that modern browsers don't have problems with links - they don't need link shorteners. Twitter adding t.co to every link is unnecessary - they could just have a hyperlink etc.


Consider what happens when someone decides to give it a URL that redirects infinitely -- it is possible to make an infinite loop, as someone demonstrated 4 years ago while also complaining about URL shorteners:

http://breakingcode.wordpress.com/2010/01/11/having-fun-with...

(The infinite loop in that example unfortunately seems to have broken, illustrating another downside to URL shorteners - they can go away rather quickly.)


Detect the loop and reject the URL. I'd rather twitter protect me from ever clicking on an infinitely-redirecting link, although browsers tend to handle that case fairly gracefully.


The only real complaint in the article seems to be the redirect chain and your suggestion would solve it. I'm working on a URL shortener (for universities) at the moment and I see no reason not to implement this.


This is the quickest route to solving the problem halfway and it's better than the crappy status of URL shorteners today.

Every URL shortener should follow redirect chain before shortening.


I think you've forgotten that there are different types of redirect, with different permanency semantics.


potential side-effects, if you have a cookie set following the url might end at a different final URL than if you don't have any cookie set. e.g. login here




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: