The Request

I set out on the Crusade for the Holy Grail of no-redirections (named by Denilson Sá) to eliminate every shortened URL on Stack Overflow (except in comments and code). But the foreign hordes are overwhelming me, and I need reinforcements!

The Reason

The reason for removing all URL shortener links are:

  1. URL shorteners were created for services with character limitations, so that long links can still be shared over these services. There is a character limitation on Stack Exchange, but we will not be able to break it with a few links. Therefor using an URL shortener is unnecessary.
  2. URL shorteners obfuscate were the link leads, which means that there is no easy way to see where the link will take you when you click it.
  3. If such a service goes out of business, and it has happened already, there is no way to recover the target location of the link.

In short, using an URL shortener increases the risk that link will go dead without any way to meaningful recover the information that was behind that link. Which ultimately will make the answer less useful, up to completely useless.

The Mission

Find every shortened URL, follow it, check it and inline the unshortened/long version into the post, like this:

For details see the documentation here: http://tinyurl.com/3zbelpa

Turns into:

See the documentation for further details.

Watch out for hidden LMGTFY links and flag them for Moderator Attention if the answer only consists of those. If the answer does also hold valuable information like other links or further information, edit the LMGTFY-Link out, and leave the above link for future reference.

If you encounter links to duplicates, vote to close/flag the question, and edit the answer anyway.

But, watch out for traps! As Joel Coehoorn♦ informed me, there are edge-cases which need the existence of shortened URLs. Including but not limited to:

  • Certain Wikipedia-Links
  • Archive.org Wayback-Machine
  • Browsershots.org
  • Google Books

Make sure that you're not breaking any of these by inlining them.

If you find shortened URLs in comments, there's at the moment not much we can do about them. LMGTFY and other objectionable content needs to be cleansed flagged none the less.

Also there are shortened URLs hiding in the woods (known to some as "Code"), these are no danger to our lands and can therefore be left unchecked and unchallenged.

The Tools

Our most valuable light in the darkness of the night is the search (roughly sorted by number of hits, cleaned ones at the bottom (doesn't mean that they don't come back)):

Feel free to expand and edit that list.

While paying a visit, Rob Hruska showed us the way to a magician which allows us to see beyond shortened URLs without fear for ourselves. Jeff Mercado also showed as an apparatus which does the same. These are only tools on our crusade to protect and help ourselves, we need to cleanse the land from redirections nonetheless.

The Reward

Eternal honor and glory...and of course you can keep every captured Flag-Weight and Badge.

Other versions

There is also a version of this page on the Ask Different Meta site.

  • 15
  • 3
    Here's another site that can expand the links for us for many different sites: longurl.org Commented Jul 20, 2011 at 20:32
  • 15
    While fixing these, please don't just put a "+" after the shortened link to go to the shortener preview page; inline the full site URL.
    – Rob Hruska
    Commented Jul 20, 2011 at 21:12
  • 2
    `@Bobby and @Rob: Sorry, that was probably me. I didn't realize my mistake until I had already "fixed" about a dozen posts. Commented Jul 20, 2011 at 21:28
  • 1
    @Chris - NP, I think I got most of them.
    – Rob Hruska
    Commented Jul 20, 2011 at 21:29
  • 5
    That explains the edit queue number. I've never seen it that high before.
    – mmyers
    Commented Jul 20, 2011 at 22:24
  • 12
    Reminder: funky Wikipedia links and links that include URLs in the querystring will usually be properly encoded if copied out of the Firefox or Chrome address bar. IE users can continue to sell their souls to URL shorteners, or get a real browser.
    – Shog9
    Commented Jul 20, 2011 at 22:33
  • 3
    I guess we should extend this quest to other sites from the stackexchange family! Commented Jul 20, 2011 at 22:58
  • 3
    Some time ago we looked at http status codes for a sample of the links found in stackoverflow posts - over 10% returned 301. Commented Jul 20, 2011 at 22:59
  • 2
    This question title delivers the lulz. When you need a break, take a moment to enjoy everything that live.lmgtfy.com has to offer.
    – Brad Mace
    Commented Jul 21, 2011 at 6:38
  • 1
    We need some way to educate our users. I've seen the hit count for some URL shorteners go up from yesterday! Commented Jul 21, 2011 at 17:04
  • 1
    Related questions in Meta: meta.stackexchange.com/questions/64450/… and meta.stackexchange.com/questions/29518/… Commented Jul 21, 2011 at 17:23
  • 5
    As a part of this effort, could a dev remove the shortened url from the post-ban message please?
    – M. Tibbits
    Commented Jul 27, 2011 at 18:46
  • 2
    @Nightfirecat: Despite the ensnaring thought, do not engage into edit-wars of any kind. If somebody rolls back these changes, only roll back once and leave a comment with further explanations. If the user rolls back again, flag for Mod Attention. Though, my heart bleeds if I think about bothering the mods with such peanuts, it's better then to engage into a vendetta with a user. Don't forget, we have the blessings of the Diamonds with us. Commented Nov 7, 2011 at 7:50
  • 2
    @Matt The basic idea is to get rid of URL shortener links for three reasons: 1, It is unnecessary (they are designed for usage with services with character limitations, we don't have that). 2, Getting rid of the obfuscation, so that you can see where the link will take you. 3, If such a service goes out of business, the link is dead with no easy way to recover it. Commented Jul 15, 2018 at 18:40

11 Answers 11


That's great, but we also need some way to remove URL shorteners from the comments.

During this quest of the Holy Grail of no-redirections, I've found many short URLs in the comments, and it makes me sad that I can't do anything to fix those.

  • Awesome title! I have to get this somewhere into my question! And you're right...we can flag LMGTFY-Comments, but can't really do anything about the others, I fear. We'll see, maybe a Mod comes along with a good idea. Commented Jul 20, 2011 at 20:40
  • Eh,.... LMGTFY?
    – GUI Junkie
    Commented Jul 20, 2011 at 22:16
  • 33
    @GUI Junkie, what? You don't know LMGTFY? lmgtfy.com/?q=LMGTFY :-) (Okay, I admit, this was kinda mean…) Commented Jul 20, 2011 at 22:18
  • I'm smiling now
    – GUI Junkie
    Commented Jul 20, 2011 at 22:24
  • I thought there would be viagra somewhere for me
    – GUI Junkie
    Commented Jul 20, 2011 at 22:32
  • 2
    Yep. Go ahead and flag them in comments, and a mod can edit the comment. LMGTFY comments can be flagged for removal.
    – nhinkle
    Commented Jul 20, 2011 at 23:20
  • 11
    So far the only legitimate use for a url shortener that I know of is the one Jon Skeet uses when hinting to question askers that they should improve their question. It even has a much friendlier name. tinyurl.com/so-hints vs msmvps.com/blogs/jon_skeet/archive/2010/08/29/…, I'd prefer the shortened version as long as I know it's safe and has a friendlier name than a random hash. Commented Jul 21, 2011 at 0:41
  • @Jeff - and so as not to take up too much of a comment when including long links or multiple links.
    – tvanfosson
    Commented Jul 25, 2011 at 15:44

Thanks to the people who are going through the database and fixing posts. But please don't blindly replace URLs by the longer URLs, take the time to go through the posts review them.

  • Do not replace shortened URLs if they are part of the question. Example: Split Twitter RSS string using Python — the question is asking how to parse a string that happens to contain a short URL; replacing it by the longer URL would not make any sense.
  • If the URL was directly in the text (and was intended as a link, not as part of the question as above), don't leave [http://bit.ly/abcde](http://real-url.example.com/wibble) in the markdown, take the time to write a real description for the link, like [the description of the `wibble` command in the official documentation](http://real-url.example.com/wibble).
  • If the URL is to an image, upload it to Stack Exchange's image hosting (press Ctrl+G, click on from the web and enter the URL image).
  • If you see other problems in the post, such as a signature or spelling errors, take the opportunity to improve the post.

Please remember, don't bother with posts that only contain a link. If there is no context around that link (if the link breaks, is the answer still useful?) .. flag the post as a non-answer.

I just deleted a few non-answers that had been edited to expand the actual URL, I hate to see people waste time :)

  • Go ahead and edit the link anyway, if you have edit permissions - no point in the link staying in that form for any amount of time regardless. Commented Nov 4, 2011 at 21:24

You'll likely get better search results for posts entered prior to the last data dump via SEDE. And add a search for http://tr.im/ — It's defunct now but was still active when Stack Overflow first launched.

Aside from that, we've had this discussion before (can't find the link right now) and from that I'll caution that there are a few edge cases where the shortened urls are required. Examples includes links into archive.org's wayback machine, browsershots.org, and certain wikipedia links (though I think the last has since been fixed).

  • Good points about the links, I'll add that. Commented Jul 20, 2011 at 19:05
  • I'm quite interested to see that previous discussion. I can't imagine why you would need obfuscated URLs for links to the Wayback Machine to work. The regular links work just fine for me across sessions, and as I understand it, the obfuscation services just store that same URL to be expanded later. Commented Jul 21, 2011 at 4:09
  • 1
    @Cody - the issue is that you have to include the full url for the original page as a query string parameter for the wayback machine, and the regex kept choking on the second http:// . A quick check shows they've made improvements since then, but I'd still be wary of edge cases. Commented Jul 21, 2011 at 4:32
  • 1
    Since tr.im is now defunct, how can we "fix" those links? Or... We can't?! Commented Jul 21, 2011 at 16:54
  • 1
    @Denilson - In many cases, we'll be able either infer where they were pointing or run a google search to find an equivalent link. In others, we may just need to flag the post for moderator deletion or edit that part of post out. Commented Jul 21, 2011 at 17:18
  • tr.im is no longer defunct Commented Oct 29, 2015 at 20:33

Maybe somewhat less used, but CloudApp has a URL-shortener called cl.ly.

  • 1
    You just hit a pot of gold! 232 hits on SO. Thank you very much! Commented Jul 20, 2011 at 21:57
  • 2
    Huh... Most times I find a cl.ly link, it's actually for image hosting. Thus, I don't believe those image-hosting links should be removed. Commented Jul 20, 2011 at 23:20

Another nefarious purpose for shortened URLs: hiding amazon.com affiliate tags. (Other affiliate tags as well, presumably.)

I just fixed one of those. I'll not be surprised to find others.


There's a list of 339+ URL shorteners at the LongURL site.


I admire the zeal of the quest and would bang my head through a rock before ever adding a short.url. However, would it not be possible for the asker to propose a more automated approach? It would surely be a flick of the wrist for the SE programmers (Superero without H) to replace that for a 'click here'?

And let me please finish with... amiright?

Edit As George comments, the approach would be to do that on the fly.

  • 3
    Better yet, have the system check the answer for shortened URLs before the answer is posted. Commented Jul 20, 2011 at 23:14
  • 1
    Actually, as the original question proposed, not only we are replacing the short URLs, but are also adding relevant link texts. Oh, and from what I saw, there are so many different cases that an automated approach would be a pain to write, and would still fail a lot. Commented Jul 20, 2011 at 23:23
  • I was getting at what George is suggesting, but alas, brevity is always mine enemy.
    – GUI Junkie
    Commented Jul 21, 2011 at 5:45
  • @Denilson, it may not be trivial. But a link has either a text that can be respected o a link that can be replaced with a 'click here' textlink. The end result might not be so nice as a manual edit, but would be workable.
    – GUI Junkie
    Commented Jul 21, 2011 at 6:42

I wasn't aware that shortened URLs were considered poor form. Personally, I always use full URLs in questions and answers, but often use shortened URLs in comments due to the character limit.

If SO policy is to eliminate shortened URLs, then we should:

  • Tell people. I don't know if SO has a mechanism for making announcements, but there should at least be a mention of this in the FAQ.
  • Stop counting URLs against the character limit in comments.
  • Filter new questions, answers, and comments to catch shortened URLs.

Before embarking on this crusade, however, I'd want to know if shortened URLs are really a problem on SO. I understand the theoretical security risk, but in practice how often does it happen that someone posts a shortened URL on SO that points to something other than what's represented? I'd expect those cases to be pretty rare, and I'd hope that such posts would be downvoted into oblivion.

  • 13
    Point 1: a short URL that points to another question in StackOveflow won't show up in "Linked" list of questions at the right side. Point 2: it is better for the user experience to know the destination of a link. Sometimes I decide if I should follow or not a link based on the URL itself. Point 3: Shorteners don't improve the user experience in any way. Actually, as I said, they degrade the experience. Point 4: Shorteners are usually used by new users that still don't know how to correctly insert links. Commented Jul 20, 2011 at 22:48
  • 1
    1: Fair enough, but links to other SO questions aren't terribly long anyway -- I'm not sure I'd bother shortening such a link. Links to documentation on other sites (very common in SO comments) can be quite long and shortening them helps in comments. 2: I agree, but on the other hand it's better for the user experience if I can use as many characters as I need to in order to explain something. 3: See 2. 4: Rather than banning shortened links, then, perhaps we should help the new users? I'm not arguing for more shortened URLs, just not convinced that eliminating them is useful.
    – Caleb
    Commented Jul 20, 2011 at 22:59
  • 3
    Side note: there is a short form for links to SE posts: site.stackexchange.com/q/postID, e.g. meta.stackexchange.com/q/99164 for this one.
    – nhinkle
    Commented Jul 20, 2011 at 23:26
  • 10
    @Denilson - you forgot the big one: Point 5: link rot - if/when the shortening service goes belly up (eg. tr.im), then all those links become dead & the question/answer/comment they're used in becomes, at least partially, useless.
    – Alconja
    Commented Jul 21, 2011 at 3:52
  • 10
    They're poor form everywhere. I'm not going to click links that I don't know where they point. That's just irresponsible. Commented Jul 21, 2011 at 4:07
  • @Alconja: True, but that also happens on non-redirected links. Anyway, the lesser is the number of redirections, the lower is the probability of link rot. Commented Jul 21, 2011 at 4:17
  • 3
    @Cody - they're not poor form on Twitter, they're absolutely essential when you're character limited. Granted, comments are as limited as tweets, but long urls can seriously cut into your comment space, esp. if you include multiple links (such as to ref. docs).
    – tvanfosson
    Commented Jul 25, 2011 at 15:46
  • 1
    @tvanfosson: I don't think Stack Exchange has bought Twitter yet. Can't wait, though; it'd really help that site out to redirect the focus on content rather than noise. Commented Jul 25, 2011 at 15:49
  • 3
    "Shorteners don't improve the user experience in any way" I'd disagree with this point at least. IBM has hundreds of SupportPacs all with 4-char names. If you know that they live at bit.ly/SupportPacs and that SupportPac XXXX is at bit.ly/SupportPacXXXX then you can get to them from any browser without resorting to search. I can see why they were expanded but I'm hoping that if can transfer these form bit.ly to IBM's URL shortener that I can restore the mnemonic links in my answers.
    – T.Rob
    Commented Jul 28, 2011 at 0:43

I was just now haunted by an unearthly creature in the form of: "http://kjkh.me/oXek9p". It crept out of this dungeon. In my bewilderment I turn to the noble crusadors of LMFTFY for council. What is the righteous path for for a lowly peasant?
Downvote? Comment? Friendly advice? Refer to this page?

  • 3
    Edit it to link to the actual page. I just did. Downvote, comment, friendly advice optional. Commented Oct 4, 2011 at 1:27

It has been brought to my attention that you can search for links using the url: option. I don't know precisely how smart this functionality is, but it does seem to ignore links embedded in code. We might be able to leverage this functionality to automatically detect shortened URLs before they are ever posted.

Not the answer you're looking for? Browse other questions tagged .