Thursday, August 11, 2011

howto check for safety of Shorten URLs before opening them in your browsers

Short URLs were in fashion a while back and now they are in requirement.
No matter which social, professional or public web portal you browse, you get to see short url.

But Short URLs from so many sources are not secure as a carefully planted short url redirecting (sometimes single redirection and sometimes multiple) to an infected web portal.
So, all the short links from non-reliable sources must be first traced back to original links and only visited if they cross-check successfully.

So, how to know the actual portal to be visited without using that URL and following it to final location.

[] from your shell
$ curl --head -L http://short.en/url | grep Location:
so, place the short url to be checked in place of "http://short.en/url" in the command provided above and then you can see the entire url trace and the final url to be visited...

[] from the web-app
At this portal paste in the link in Short URL text box and click the 'Unshorten' button to see the actual redirected URL.



  1. Avi, I din try it but will it work for other short URLs like tiny or goo ?

  2. yes, it would work each and every URL... even if the URL is not a short-en url... the pattern of it's working is follow the URL until it's redirected to a final resource and then display the resource... it even works for links from twitter which I heard uses JS for redirection