I set out on the Crusade for the Holy Grail of no-redirections (named by Denilson Sá [1]) to eliminate every shortened URL [2] on Stack Overflow. But the foreign hordes are overwhelming me, and I need reinforcements!
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 [3].
Watch out for
hidden LMGTFY links
[4] 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♦ [5] informed me, there are edge-cases which need the existence of shortened URLs. Including but not limited to:
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.
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 [26] showed us the way to a magician which allows us to see beyond shortened URLs without fear for ourselves [27]. Jeff Mercado [28] also showed as an apparatus which does the same [29]. These are only tools on our crusade to protect and help ourselves, we need to cleanse the land from redirections nonetheless.
Eternal honor and glory...and of course you can keep every captured Flag-Weight and Badge.
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.
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.
[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)
.Ctrl+G
, click on from the web
and enter the URL image).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 :)
You'll likely get better search results for posts entered prior to the last data dump via
SEDE
[1]. 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).
[1] http://data.stackexchange.com/tr.im
is now defunct, how can we "fix" those links? Or... We can't?! - Denilson Sá
Maybe somewhat less used, but CloudApp has a URL-shortener called cl.ly
.
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.
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.
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:
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.
site.stackexchange.com/q/postID
, e.g. meta.stackoverflow.com/q/99164 for this one. - nhinkle
I was just now haunted by an unearthly creature in the form of: "http://kjkh.me/oXek9p". It crept out of
this dungeon
[1]. 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?
It has been brought to my attention that you can search for links using the url: option [1]. 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.
[1] http://stackoverflow.com/search
http://github.com
links redirect to thehttps://github.com
equivalent. That one is not so bad, but such redirects are perhaps evidence of the onset of link rot. - martin claytont.co
was on there and cleared previously, and now it's been re-added. - agf