289

Moderators on Stack Overflow are currently discussing the addition of common link shorteners (goo.gl, bit.ly, tinyurl) to the site's blacklist. Before we do so, we'd like to see if the community approves of this.

We have discussed this in the past, and the community has seemed to be in favor of it. These links are increasingly being used by spammers and trolls to hide their spam and offensive content, requiring unsuspecting reviewers to click on these links to see what lies behind them. Nine spam posts used goo.gl links to hide their spam in the last month alone.

There is no reason to use link shorteners in a question or answer to work around character limits, because there aren't any such limits in these posts. Comments are character-limited, but even there almost always when I see such a link it's to hide other blacklisted content, like LMGTFY.

The only downside would be in preventing people from asking about the use of these services using direct links, but in those rare cases they could provide the link in a non-clickable form (code-formatted, etc.).

These links are getting to be a real pain to deal with on Stack Overflow, and I'm tired of having to check them and ending up on a porn site on my work computer. I would like to see them blacklisted, but we want to hear the community's feedback on this first.

41
  • 43
    @JonH: because some employers support the notion that we volunteer some of our time keeping this community clean and safe. Mine does, anyway.
    – Martijn Pieters Mod
    Commented Dec 29, 2015 at 16:58
  • 13
    Simple: don't check them. Handle the flags however - delete the posts either way. There are very, very few legitimate reasons to be using link shorteners in places with generous character limits - why a reasonable person would default to them outside of Twitter is beyond me.
    – BoltClock Mod
    Commented Dec 29, 2015 at 17:02
  • 8
    Do it! Just do it!
    – Makoto
    Commented Dec 29, 2015 at 17:03
  • 52
    Well I don't want to end up on porn/malware sites on my home computer either thank you very much.
    – ChrisF Mod
    Commented Dec 29, 2015 at 17:04
  • 15
    The community feedback so far: 3 mods, 2 users, all puns
    – rene
    Commented Dec 29, 2015 at 17:07
  • 27
    @ChrisF ...not by accident, at least. ;) Commented Dec 29, 2015 at 17:09
  • 6
    @BilltheLizard - sshh! ;)
    – ChrisF Mod
    Commented Dec 29, 2015 at 17:15
  • 2
    @rene - Seems consistent.
    – Brad Larson Mod
    Commented Dec 29, 2015 at 17:20
  • 8
    But what about that edge case of including links that are greater than 600 characters (the limit to the comment box)?
    – user4639281
    Commented Dec 29, 2015 at 23:46
  • 3
    @TinyGiant Bummer. I've been in Stack Overflow for very long, and have yet to require the need to link to someplace with 600 characters in the URL.
    – Madara's Ghost Mod
    Commented Dec 30, 2015 at 8:27
  • 3
    @TinyGiant My sarcasm sensors are down for quite a while now. I need to get them repaired.
    – Madara's Ghost Mod
    Commented Dec 30, 2015 at 8:38
  • 26
    Well godbolt uses goo.gl and in the C and C++ tags we use links to there on a regular basis. The underlying links can be pretty large and really clutter up an answer if you like to use links inline. I would be more supportive if this was turned into a privilege instead with some sufficiently high bar. Commented Dec 30, 2015 at 9:40
  • 16
    Or simply implement an own link shortening application to StackOverflow? When clicking the link redirect to a page where it displays the full link you're about to open with for example an accept button on it.
    – deW1
    Commented Dec 30, 2015 at 9:47
  • 7
    Would it be possible to white-list particular destination sites? E.g., given the play.rust-lang example in one of the answers below, if a post (especially a comment) includes a shortened link (regardless of which link-shortening service is used), it would be expanded, and if the expansion is a play.rust-lang link, it would be allowed, but otherwise it would be disallowed? Commented Dec 30, 2015 at 22:53
  • 6
    For those suggesting SE create their own link-shortening service or develop some facilities for evaluating these links as part of a whitelist, these are good suggestions but they will require development effort and will take time. Adding a blacklist entry for content in posts does not require a developer to implement and can be enacted in minutes. It's not perfect, but it's something that can be done right now to address ongoing problems.
    – Brad Larson Mod
    Commented Dec 30, 2015 at 23:33

15 Answers 15

65

Ok, this just went live:

(https?:)?\/\/(www\.)?((zi\.mu)|(zi\.ma)|(yhoo\.it)|(yfrog\.com)|(yep\.it)|(y\.ahoo\.it)|(xurl\.es)|(xrl\.us)|(xrl\.in)|(wp\.me)|(url\.ie)|(url\.co\.uk)|(url\.az)|(ur1\.ca)|(u\.nu)|(twurl\.nl)|(twurl\.cc)|(tr\.im)|(to\.ly)|(tnij\.org)|(tinyurl\.com)|(tinylink\.in)|(tiny\.pl)|(tiny\.ly)|(tiny\.cc)|(tcrn\.ch)|(ta\.gd)|(t\.co)|(t\.cn)|(su\.pr)|(sp2\.ro)|(snurl\.com)|(snipurl\.com)|(snipr\.com)|(shrt\.st)|(shorturl\.com)|(short\.ie)|(shorl\.com)|(shar\.es)|(sameurl\.com)|(safe\.mn)|(post\.ly)|(ping\.fm)|(ow\.ly)|(om\.ly)|(nyti\.ms)|(nsfw\.in)|(moby\.to)|(migre\.me)|(lnkd\.in)|(linkbun\.ch)|(linkbee\.com)|(liip\.to)|(krunchd\.com)|(korta\.nu)|(j\.mp)|(is\.gd)|(hurl\.me)|(huff\.to)|(goo\.gl)|(fwd4\.me)|(fff\.to)|(ff\.im)|(fb\.me)|(fav\.me)|(eepurl\.com)|(doiop\.com)|(dlvr\.it)|(disq\.us)|(digg\.com)|(digbig\.com)|(decenturl\.com)|(cutt\.us)|(cot\.ag)|(cli\.gs)|(clck\.ru)|(cl\.ly)|(chilp\.it)|(budurl\.com)|(bit\.ly)|(binged\.it)|(bacn\.me)|(arst\.ch)|(alturl\.com)|(afx\.cc)|(adjix\.com)|(adf\.ly)|(4sq\.com)|(3\.ly)|(0rz\.tw)|(we\.tl)|(ouo\.io)|(bfy\.tw)|(bit\.do))\/[a-z0-9]+    

I pulled the list of shorteners from http://longurl.org/ (which seems to be down at the moment) and reduced it to the ones that've actually been used on Stack Overflow. Naturally we can block others if they crop up, but given the predominate use appears to be spam these days we can also just delete the posts.

Matches produce:

Please avoid using URL shorteners; they can break without leaving any useful artifact and are often used to obscure spam or malicious links.
Editors: please replace the short URL noted above with the URL it redirects to!
For details, see meta.

I'm allowing amzn.to, youtu.be and flic.kr links, because as far as I'm aware they're special-purpose and not especially worse than the full URLs to those services. If I'm wrong about this (if, for example, you can craft an amzn.to URL that points to an arbitrary location), let me know and I'll add them to the list.

Please report any problems that this causes (apart from the "it makes editing these posts annoying" problem; that's unfortunate, but kinda necessary if we're ever to get rid of them). In particular, if this breaks the creation of a legitimate post that doesn't contain short URLs, let me know and I'll try to fix it.

48
  • 29
    i.sstatic.net/4hkCk.jpg
    – Martijn Pieters Mod
    Commented Mar 21, 2016 at 19:49
  • 4
    is this feature intended for use / deployed only at Stack Overflow or some other sites can have it (or already have)?
    – gnat
    Commented Mar 22, 2016 at 7:40
  • 1
    Assuming it doesn't cause problems here, it could be rolled out to other sites, @gnat. I'll have to get the message translated and so on, so not in a big hurry there.
    – Shog9
    Commented Mar 22, 2016 at 20:27
  • 1
    I think there is an issue with your regex. The http(s) is optional, so is the www, but the two slashes in-between aren't. Meaning I am allowed to type www.goo.gl/rzXOxa
    – Wouter
    Commented Mar 22, 2016 at 21:21
  • 2
    That's not a link, @Wouter, so I don't consider it a problem. More importantly, requiring the matched text to be linkable eliminates a whole pile of false-positives; the problem with these short URLs is that they often match bits and pieces of longer URLs and/or code if you're not careful with them.
    – Shog9
    Commented Mar 22, 2016 at 21:24
  • 1
    in light of this, is there any chance that this proposal will be implemented: discourage url shorteners in comments: don't add link's href size to the total comment size?
    – jfs
    Commented Mar 23, 2016 at 13:27
  • Oops Manual http:///goo.gl/JF37aJ Auto goo.gl/JF37aJ
    – o11c
    Commented Mar 23, 2016 at 16:49
  • 5
    Not blocked on meta, @o11c...
    – Shog9
    Commented Mar 23, 2016 at 16:53
  • What about other redirects and proxy/like things? For example, I've seen spammers (although not SE spammers yet) use Google Translate to obscure links (sometimes with frame busting code to break out of the translate skin): translate.google.com/… Commented Mar 23, 2016 at 17:49
  • There are tons of ways to obscure links, @Alexander - posting spam on Y! or Quora and then linking to the threads here is another favorite. The problem with shorteners tends to be that they require so little effort - folks can use different links for every post if they want. Coupled with legitimate uses and the false positive / negative rate for spam filters goes up.
    – Shog9
    Commented Mar 23, 2016 at 17:54
  • 4
    fb.me is also probably safe, as that can only point to facebook.com.
    – ale
    Commented Mar 31, 2016 at 19:46
  • 1
    @Shog: pretty common at Web Applications.
    – ale
    Commented Mar 31, 2016 at 20:02
  • 1
    @Shog9: Add a .info at the end of a goo.gl URL and you can see all kinds of meta information for it, including the target URL.
    – ale
    Commented May 24, 2016 at 17:48
  • 1
    Please blacklist bfy.tw for being a LMGTFY enabler: stackoverflow.com/a/31823060.
    – Laurel
    Commented Jun 6, 2016 at 0:35
  • 1
    @Shog9 Why isn't it in the regex? Is there a comprehensive list that I can keep my own list up to date?
    – Laurel
    Commented Jun 8, 2016 at 5:52
93

In most cases, a permanent link is much better than a shortened one, as for the shortened one there are 2 reasons of breaking instead of 1 for the usual link. Also some shortened links can contain ads.

But there is a special case — links in comments. Comment length is limited and sometimes it's impossible to fit the normal link into comment length. See comment with demo for this answer: the real link length is 785 characters but the comment length is limited by 600. It's just a link without text. In the case of a link with text the situation becomes even worse.

So I see two ways:

  • allow shortened links in comments
  • or do not count the link length as part of the comment length. For example [Demo](http://smth-very-long.com/and-even-longer?yep) should count as 4 symbols, not as 53.

I think the second way is better, but I'm afraid that the length limit comes from the database.

17
  • 9
    I would argue that if a comment is that long, it should likely be added to the respective question/answer or whatever (same goes for the link). I don't think we should allow shortened links in the comments. However, I do like your second proposal, but I highly doubt that would get implemented. Commented Dec 29, 2015 at 17:18
  • 65
    To be fair, I don't know if I'd trust a link that's 785 characters long either.
    – Stryner
    Commented Dec 29, 2015 at 17:18
  • 8
    @Stryner, the whole code is included into the link to online interpreter and we are not on code golf site :)
    – Qwertiy
    Commented Dec 29, 2015 at 17:20
  • 3
    Should count as 4, OK, fine, and where should those other 53 chars go? The comment field in the db is only 600 chars.
    – rene
    Commented Dec 29, 2015 at 17:30
  • 4
    @rene, my last sentence is about this possible problem. By the way are you absolutely sure that the limit goes from the database, not just from the idea that comments need to be short?
    – Qwertiy
    Commented Dec 29, 2015 at 17:32
  • 1
    Yes, I'm pretty sure it is limited in the db: meta.stackexchange.com/a/258861/158100
    – rene
    Commented Dec 29, 2015 at 17:35
  • 4
    @rene, it's possible to move [long] links to special table and add constant overhead to the description length (like 22). Or just join multiple consecutive comments like parts of sms. Or enlarge field width. Anyway, it should be soleved by developers who know the structure and can measure negative effect of such change, not by the users who can provade tons of solutions and all of them will be unsuitable for concrete case.
    – Qwertiy
    Commented Dec 29, 2015 at 17:41
  • 3
    The second solution has been requested before; it's annoying in practice though, because you can't easily tell how much of your limit you've used up without parsing the markdown (and even then, you get these weird twitter-style situations where you type one character and suddenly your count moves backwards).
    – Shog9
    Commented Dec 29, 2015 at 17:43
  • 2
    @Shog9, I don't think that changing the count backword is a problem. Markdown in comments is very limited, so it's not difficult to count length. By the way - there is a preview for post, so it's possible to parse markdown.
    – Qwertiy
    Commented Dec 29, 2015 at 17:45
  • 7
    It's not that it's impossible, it's that it's confusing. This shortens the rendered character count vs. typed characters, while stuff like Stack Overflow and Motor Vehicle Maintenance & Repair lengthens it. All for the sake of a few people who should probably be posting answers anyway...
    – Shog9
    Commented Dec 29, 2015 at 18:27
  • 24
    SO should have its own link shortener for this purpose.
    – totymedli
    Commented Dec 30, 2015 at 12:46
  • 2
    @JoshCrozier What if I'm not the OP and I don't yet have an answer to post? I often find myself posting comments containing links to documentation as part of the process of clarifying what the problem is. Sometimes those links happen to be quite long.
    – ali_m
    Commented Dec 30, 2015 at 23:01
  • 1
    @ali_m So long as each single URL is no longer than 500 characters (like godbolt), you can in theory post multiple comments with one URL in each comment. Commented Mar 24, 2016 at 16:34
  • 2
    @Stryner, pages from reputable sites (e.g. google.com) have insanely long URLs and they are getting longer and longer (cf. the raison detre of goo.gl).
    – Pacerier
    Commented Apr 13, 2016 at 17:59
  • 3
    This is frustrating. The comment length is limited to 600. But sometimes I want to post a link to some code on typescriptlang.org/play whose URL is ~ 650 chars long. But with no allowed way to shorten it, I'm stuck. I am strongly in favor of the suggestion to not count the link length as part of the comment length. "For example Demo should count as 4 symbols, not as 53." Exactly. The comment length should only be concerned with how big/long the comment appears on the screen. Why should it care about the URL length of its links?
    – Tyler Rick
    Commented Oct 24, 2019 at 23:29
49

I completely agree with banning such links on posts, but do not ban them on comments! Spammers rarely have reputation to comment, and you would annoy regular users.

For example, the community uses http://is.gd/ a lot, because the "jsbin equivalent" stores the user's code on the querystring, making URLs huge. In fact, the tool itself provides a button that automatically shortens the URL.

Such addresses would never fit into a comment, either discouraging clarification requests or increasing the amount of low-quality or non-answers (someone would be tempted to post a answer with such long URL on it, but still redact it as a comment).

Example of such URLs1:

1: Source: Is it possible to have a struct generic over U and V, where U : V?

26
  • 3
    If it's a rust fiddle equivalent, it belongs as an edit to the post not as a comment.
    – ryanyuyu
    Commented Dec 30, 2015 at 22:20
  • 20
    That seems like a problem that should be addressed by fixing the tool or implementing some workaround. Stuffing the entirety of the code into the query string is a ridiculous design decision anyway. Commented Dec 30, 2015 at 22:20
  • 19
    @NathanTuggy Seems perfectly reasonable to me. Storing the text in the URL could be the difference between "static web page" and "dynamically rendered site that needs a database".
    – Ajedi32
    Commented Dec 30, 2015 at 22:44
  • 8
    @ryanyuyu You've never had to use code in a request for clarification before? You've never posted a link to JSFiddle in a comment? This is an incredibly common and perfectly valid use case IMO.
    – Ajedi32
    Commented Dec 30, 2015 at 22:48
  • 1
    @Ajedi32 actually I have never posted a link to jsFiddle or plnkr or dotnetfiddle in a comment. I've always edited them into the post instead.
    – ryanyuyu
    Commented Dec 30, 2015 at 22:50
  • 7
    @ryanyuyu Aren't substantial revisions to code in answers discouraged? What if you want to suggest a change to code in an answer that significantly changes its result? Or what if the answer is simply wrong and you want to use a code snippet to demonstrate why? These are all things I've had to do rather frequently.
    – Ajedi32
    Commented Dec 30, 2015 at 22:53
  • 5
    @Ajedi32: URLs aren't really suitable for passing large amounts of data between unaffiliated sites (URL shortener databases -> fiddles), so this is a flawed design, however handy it might be to get a toy site up and running. Commented Dec 30, 2015 at 22:54
  • 6
    @NathanTuggy Maybe from an architectural perspective that's true, but in practice it actually works quite well for short code snippets.
    – Ajedi32
    Commented Dec 30, 2015 at 22:57
  • 4
    @ryanyuyu Just because you can demonstrate an answer is wrong, doesn't mean you know what the right answer is. And I'm not talking about adding a link to code that's already in the answer, I'm talking about using the snippet with code that's different from what's in the answer. (Like an improvement that's too minor to make an entirely new answer out of, but too major to simply edit into the answer without consulting the answer's author.)
    – Ajedi32
    Commented Dec 30, 2015 at 23:00
  • 1
    @Ajedi32: See also the existence of POST vs GET-query-strings. The unsuitability of URLs for data-passing is baked into HTTP. Commented Dec 30, 2015 at 23:01
  • 5
    @NathanTuggy POST would be semantically incorrect to use for a page like play.rust-lang.org. You're not storing anything, just requesting a page with the given code already in the editor. Again though, this is mostly an academic concern. Regardless of what the "right thing" to do is from a theoretical standpoint, in practice encoding the code in the URL works great.
    – Ajedi32
    Commented Dec 30, 2015 at 23:05
  • 8
    @ryanyuyu It's not just RUST. Babel's site also does this, as does Opal, and many other "try this language in your browser" type sites. And I know this sort of thing is frequently needed because I've had to do it several times myself.
    – Ajedi32
    Commented Dec 30, 2015 at 23:08
  • 6
    @NathanTuggy With what practice? The practice of banning the use of URL shorteners in a text field limited to 600 characters? Passing code snippets in URL parameters works great, but tends to generate long URLs. That's a definite downside when you want to post a link somewhere that has limited space, but that's a problem that URL shorteners solved long ago. Banning URL shorteners in a text field with a character limit "unsolves" this otherwise solved problem.
    – Ajedi32
    Commented Dec 30, 2015 at 23:14
  • 2
    @Ajedi32: "Solved", perhaps, but only if you discount the possibility for abuse that requires restricting those same services. Which of course is the very problem in front of us. A hacky design that fails because the hacky workarounds fail in a particular situation is one that has failed in practice. Period. Maybe it's useful other times, even often enough to justify the hackiness in general. But trying to pretend there are no practical problems with something that very clearly has practical problems — in order to argue for making a special exception so that thing will work! — is absurd. Commented Dec 30, 2015 at 23:21
  • 11
    I also have never seen spam on comments, particularly because of the rep gate. So banning shorteners on comments is a non-solution that affects legitimate users.
    – Kroltan
    Commented Dec 31, 2015 at 0:20
30

As well as the obfuscation problem, by their nature short links redirect, and the redirect can change over time, so they can end up not pointing at the information that the answerer intended.

So, I'm certainly in favour of banning all third-party shortened links (though first-party links, such as flic.kr links, where the link is run as an integral part of the service, are generally fine).

1
  • 2
    No, the redirect cannot change for sites like goo.gl. And for sites where the link could change, it can only be done by the person who created the link. This is for a good reason, because the original link can break and the redirect thus should change to point to the right URL. (cf. you can't edit a comment)
    – Pacerier
    Commented Apr 13, 2016 at 18:05
29

If you want something done right, do it yourself

Since the root cause of the problem is lack of control over the content of a shortened link, it may make sense to create a small, fully automated, link re-direction service within Stack Exchange. When someone pastes in a link with length exceeding some pre-defined limit into a comment, SE would create an entry in its redirection database, and put its shortened version into the content of the post.

This way SE would accommodate links of arbitrary length while retaining full control of their destinations.

1
  • It seems that Amazon links get this treatment still: I just had a 151-character Amazon link get changed into one of the rads.stackoverflow.com/amzn/click/ variety. It was still 52 characters, but that's at least "proof of concept".
    – Dɑvïd
    Commented Aug 10, 2016 at 19:45
23

The solution could be to simply make the use of existing and future URL shorteners a reputation based privilege.

This permits such services to be available for questions, answers, comment, etc for the members who have proven their respect for SO/SE community to properly use such services. If someone violates SO/SE rules by misusing such a service, that member can have that privilege deactivated for their account. This way, it will not cause annoyance to the members by precluding their use in situations where they are truly needed. This will also aid in maintaining this site's performance and reduce bandwidth consumption that would otherwise result if the ability to use shorteners is disabled entirely.

2
  • 1
    I like this solution; it's highly unlikely that someone with sufficient rep is going to be a spammer. Another answer suggests banning them everywhere except in comments since spammers rarely have enough rep to leave comments anyway so getting the comment and URL shortener privilege at the same time/rep level makes sense.
    – BSMP
    Commented Jan 7, 2016 at 1:26
  • hig reputation user account get "stolen" somehow. Then posts / edits to malicious links all over the place. I'd rather have the link protection enabled as a second safety net. Maybe it's not that common, but I'm sure SO and SE network are sufficiently well known to be a potential target for this kind of attack.
    – Pac0
    Commented Jul 3, 2018 at 11:41
17

I'd encourage you to use a service like LongUrl to take shortlinks and automatically expand them in a comment / answer / question. This allows humans to keep using shortlinks, but the SO software can use the full URL for all the reasons that a longer URL is good.

Why I think shortlinks are good

  • As a human, I like shortlinks for their communicability. I can easily read aloud a short url to a coworker.

  • Some URL shorteners are permalinks themselves. I've gone to many a conference where the shortlinks are what the presenter uses to distribute information. Sometimes these are "vanity" short URLs.

  • I often post in , and the main online playground automatically shortens URLs with is.gd, as mentioned elsewhere.

Because of these reasons, I think it's worth keeping the ability for a human to communicate to Stack Overflow using a shortlink. However, that doesn't mean that SO has to keep the shortlink. Expand it, run spam checks on the expanded version, and then keep the expanded version.

2
  • 1
    I much prefer the Gist-shortened URLs, (eg. play.rust-lang.org/…) since they're both short enough and don't hide the site being visited.
    – Veedrac
    Commented Dec 31, 2015 at 20:48
  • 4
    Hilariously, LongUrl itself appears to have disappeared; glad that didn't become a dependency. Ultimately, these are just more trouble than they're worth; this isn't Twitter.
    – Shog9
    Commented Mar 23, 2016 at 3:10
14

SO could implement something that would shorten the links, but upon hovering or performing some other desired action (I'm not sure what else would be appropriate at this particular moment) it would display the original link in its entire length. So, the actual original unshortened link would be stored on SO and it could be shortened automatically if posted in a comment. That way, shortened links through other services could be "banned," while ensuring that we don't get links that spawn the maximum of a comment.

1
  • 7
    Agreed. I see the point in banning external link-shorting services, but doing so removes the possibility of using them in comments where URL length is actually an issue. I would also like to see SO itself implement link-shortening, perhaps requiring higher rep to make use of the feature to provide an additional barrier against misuse. The user could specify the actual URL as well as friendly-text to show in the comment. As a nice side-benefit, it would allow individuals to set up commonly-used short links for use in comments (e.g. a link to the Winsock FAQ, or a custom link to the MCVE page). Commented Dec 30, 2015 at 23:23
7

Yes, please do blacklist the most common URL shorteners.

My employer blocks every URL shortener I've tried. I'm sure they're not the only ones who do this.

A blocked URL shortener makes a shortened URL as worthless as a dead one. Worse, even, because I'm taunted by the possible solution on the other end that I can't reach.

It's bad enough that many imgur images are blocked as well. (Thankfully stack.imgur.com isn't.)

7

Personal thoughts

First off - I welcome this change (despite we won't be able now to post our rebecca links on Fridays now, hehe). This is a justified decision and so if you already see the negative impact on the community - steps must be taken.

From my side - I can say the following thing - whenever I asked or answered something I never used such shorteners. Because - the quality of answers or questions here in my eyes requires direct, primary source links (official documentation, manual pages, original articles and so on). Yes - I can not say that no one from the community ever used shorteners in valid posts - but on the other hand, I believe all good posts tend to refer a primary source and there is no reason to proxy it through any other web-resource.

Pro

I would try to summarize my thought about benefits coming from the decision:

  • As already stated, it will restrain spammers and trolls. There is no place for that on Stack Overflow or any Stack Exchange web-site and restricting the very mechanics that allows them to behave like that is a proper change
  • It will improve quality of the posts. Especially "canonical" ones (I do not believe, however, that any such post has shorteners inside). Because - there is no guarantee that shortened link will be valid across all time. There's no guarantee as well for the primary source, but definitely those links live longer.
  • It will raise security. Because there is nothing in the middle when the shortener is out of the equation. I would guess, the security on Stack Overflow is on a very high level, but no one is safe from security breaches and though it's far more safe to rely on official primary resource then on some shortener that can attempt to do something.. inappropriate with the user data if that's possible.

Con

With all of the above being spoken, I see some disadvantages in the decision too. While I see this as a welcome change, it would be fair to tell about them:

  • Again, as already spoken, this will limit the functionality a bit that has restrictions on characters count. Yes, it's about two things: comments and chat messages. For that:
    • Comments: yes, normally, if you can not fit into the limit, may be it's a sign to post an answer. But I do believe there can be rare occasions when the comment may need such a limit.
    • Chat messages: tricky one. Here it is much oftener the case when a limit is an obstacle, and you don't want to split the message, especially if there's an active parallel discussion. But the thing more concerning to me is: What about code-source sites? Like pastebin.com and Co? They also can be easily used for spam / trolling and behave similar with shorteners. Will they be allowed? If yes, why? If no, also, why? Here I would like to remind that if a person wants to "show some code" - in most cases the only possibility is to use such a resource. The question also applies to on-line code sandboxes (3v4l.org and Co).
  • There could be workarounds. I mean - if someone has an intention to spam or to troll - they can easily create a web-site like mentioned in this question. There's nothing that prevents them from doing this, meaning - the blacklist can not ensure all of such attempts are cut off. And also this means that may be legitimate users of these shorteners will suffer while spammers won't care. Normally, it's a "war in many battles" against the moderation team and such spammers/trolls. Each side tries to invent a solution to another side's moves. But I would like to remind - often in such wars, regular users are ones who suffer. I also believe that the decision above is well-thought and this point is just a reminder about taking steps carefully.
1
  • 2
    I don't believe that this change is proposing anything with chat - just on the Q&A portion.
    – hichris123
    Commented Dec 30, 2015 at 18:31
7

I'm using cloudapp application for OSX, that generate short links by default cl.ly and I can't use it in my comments :(

10
  • 3
    Which means this block is working just fine.
    – Cerbrus
    Commented Dec 22, 2016 at 7:19
  • @Cerbrus cl.ly/iZTu Commented Dec 24, 2016 at 9:14
  • It works here, but I can't add it to a big comment Commented Dec 24, 2016 at 9:15
  • 2
    "A big comment"? Also, I'm not clicking that link..
    – Cerbrus
    Commented Dec 24, 2016 at 11:05
  • 1
    this is a screenshot @Cerbrus Commented Dec 25, 2016 at 11:19
  • 2
    The comment above could have been written more clearly, but this is not a URL shortener. It's a quick way of automatically uploading screenshots to the web to be accessible. See this for example: cl.ly/0z0E391p3r3C This service should not have been lumped with URL shorteners because that's not the primary purpose it serves. It's basically a hyper-efficient web-facing personal dropbox / imgur. Commented Jun 20, 2017 at 15:33
  • @Shog9 Is cloudApp going to be removed from this list given the above comments?
    – geoboy
    Commented Jan 16, 2018 at 3:03
  • cl.ly/rO4n still doesn't work Commented May 6, 2018 at 14:47
  • 1
    Ran into the same issue today. Frustrating
    – jdixon04
    Commented Sep 5, 2019 at 23:20
  • Stack Overflow has its own image hosting (via Imgur) which doesn't suffer from random link rot, permission surprises, and obscure (lack of) reputation.
    – tripleee
    Commented Jul 6, 2020 at 6:04
1

I could not pos such link https://sharplab.io/#v2:C4LghgzgtgPgAgJgIwFgBQcDMACR2DC2A3utmbjgCYCmAxgJZRgA22AsgBSUD2ArgEbNq2SgEpipclLgB2bABE+g6gBVu8uoxZcANNgCsogNySyAX1MURmpqzYIuSoSPEk0U6XMUChajQ1sHSj1DE3dyC3CySxoAlgUnVXUbbR4fYQA3Fl5qPXoAO2BsfN4ofmoAJwB5ADN/LWYABWYwWmoIUTcPMll2MGAACwA6ACU+fMoOLhTmUSzmHL0Sssra+ttm1vbjS0ipSxiZhPS/GaDE7HnF7AKi5fLqupnNto6u7t62fuGx3gmp2INObZXL3VZPOJNFqvUQAaks3WwHAADGwAFQAmaiL6DIaNbgAdw4SGROgAtGDHusWC9tqIdlFsHtyAc0GYgA inside comment for an answer as it is too long, and SO rejects shortener (

Perhaps add own shortener then?

3
  • Can't you post the code itself in an answer?
    – BSMP
    Commented Jul 13, 2020 at 17:43
  • I can not, it's not an answer, but comment for an answer, and it is length restricted and don't allow linebreaks. Commented Jul 13, 2020 at 17:45
  • I have similar issue with tinyurl.com/FindingNiceFraction link. It's very very very long since it stored the benchmark code in the URL itself... Commented Nov 27, 2021 at 1:30
0

I think what SO and others really need is a URL shortener that can be trusted to point to something reliable.

For example, if it generated, and validate, URLs of the form https://example.com/AAAAAAAA?domain=stackoverflow.com

Even if the AAAAAAAA entry gets lost in their database, it still promises not to forward you anywhere other than stackoverflow.com. And if the entire domain disappears or is squatted, well, that's already a problem with any domain.

5
  • 1
    Why do we need URL shorteners though? Especially for internal links; it's not like post ids are all that long - /q/319595 is hard to beat for a short URL.
    – Shog9
    Commented Mar 23, 2016 at 17:50
  • 1
    The godbolt long-url case is why it is needed, I just wanted to make my example generic.
    – o11c
    Commented Mar 23, 2016 at 17:55
  • IMHO, that's an argument in favor of extending our own snippet tool, not more obscured links.
    – Shog9
    Commented Mar 23, 2016 at 17:56
  • 1
    IMHO, that's orthogonal. StackOverflow is far from the only site that has a good reason to blacklist most URLs, but the exceptions will vary from site to site and won't always be code snippets.
    – o11c
    Commented Mar 23, 2016 at 21:31
  • Let's be careful here: there's a distinction between URLs that get blacklisted because they're abused (spam, LMGTFY, etc) and URLs that get blacklisted because they facilitate abuse. I don't think anyone has a problem with gcc.godbolt, and it certainly isn't blacklisted... But the means by which some folks were using it also facilitated abuse, and so that was dropped.
    – Shog9
    Commented Mar 23, 2016 at 21:45
-3

In mirroring another previously provided (but poorly explained) comment, this regex is currently catching CloudApp which is not a url shortener.

Per their website, it's a quick way of automatically uploading files to web accessible locations. This service is not replacing a longer canonical URL. The URL CloudApp creates is the canonical URL. It's an efficient web-facing file dropbox.

See this example (which happens to be an image) I was going to use in a post. I could just as easily be including a multitude of other file formats in my URL.

Which begs the question, why is a Dropbox link allowed, but not a CloudApp link? The regex should either be updated to block Dropbox, or to allow CloudApp, because besides length of URL they're serving the same purpose.

0
-7

There appear to be three main benefits to URL shorteners:

  1. They enable comments to be posted with longer links. Comments are limited to 800 characters, and include all the characters in link URLs. Users have posted multiple specific examples of comments which cannot be posted without URL shorteners.
  2. They enable the same link to be posted quickly and easily in multiple locations. Short links are often much easier to remember and much shorter to type, whereas long links can typically only be copied/pasted. Long links also create problems if they get copied into an email, for example, because they can get wrapped and broken. Shortlinks can also be read aloud to a coworker.
  3. Some URL shorteners are permalinks themselves. For example, in conferences shortlinks may be what the presenter uses to distribute information. Sometimes these are "vanity" short URLs.
  4. Some online playgrounds automatically shortens URLs (ie rust shortens links with is.gd).

However, there are a number of problems which have been articulated:

  1. The actual linked URL is obscured, making it more difficult to determine, at a glance, whether the end content is suitable to be posted on the site. This has allowed individuals to create links to inappropriate websites and have them remain on the site for long periods of time.
  2. URL redirect websites may display advertisements which annoy or delay the end user.
  3. URL redirect websites may experience downtime, or go down entirely, breaking the links in the future.
  4. URL redirect websites may be blocked at many workspaces and schools.

Almost all of these problems are caused by third party websites. They would all be solved by StackExchange offering an independent URL shortening service. Such a service would also make it even easier for the StackExchange community to monitor posted links, while ensuring no advertising or downtime for the links.

A StackExchange URL shortening service would offer a huge number of benefits to the community as a whole:

  1. Short links enable less data to be stored in the database and transmitted to end users. Small differences multiplied over dozens of links on hundreds of pages served to thousands of visitors can make a large impact over time. Say 20 links x 500 pages x 1,000,000 page views each x 100 bytes saved on average = 1 Tb of bandwidth. The savings continue into perpetuity from the database, through all the layers of the internet, through to the end user's browser or mobile phone. This difference would save StackExchange hosting costs every month and also be significant for some users. For example, mobile or remote users may pay by the megabyte.
  2. Links that are used in multiple locations are only stored in the database once, saving database storage. The full link no longer has to be stored in the question/answer/comment. For example, if the link is http://shortstack.url/d4Tw2Q, you could store it as a link to just d4Tw2Q and expand it when the page is viewed. For a comment, they means your 200-character link is now counting as only 6 characters.
  3. By regularly and automatically checking links, which are now in a handy sorted list, StackExchange could immediately know about and flag any broken links in any questions, answers, or comments, anywhere on the site, before they impact the experience of any user of the site. Broken links could instantly be updated or redirected if content moves.
  4. By tracking click-throughs, a page could be created with the top links for the whole site, allowing all community members to benefit from knowing about the links that are used most often, which are likely to be the most useful and helpful links.
  5. New links can easily be added to a review page where other community members could quickly spot inappropriate websites. They could even be searched for specific keywords.
  6. This would allow StackExchange to track exactly where visitors go when leaving the site through external links. This is useful information to know how users are using the site, and improve the user experience. If they notice that a lot of users are leaving the site through a specific link, it is probably a useful link which is answering the user's question.

As with any service, we need to make sure the benefits do not cause any disadvantages. The user should never have to do anything extra to use the URL shortening service. Link conversion should be automatic from whatever format a link is supplied in. If it's supplied as plain text, the conversion happens behind the scenes without the user even needing to be aware that their link has been shortened. If the link comes from a shortened link using another popular URL shortening service, it can be followed and then converted to use the StackExchange service, so the link points to the final end URL instead of routing through any third party URL shortener. Every attempt should be made to process the link before an error is displayed to the user.

In addition, we need to make sure that the title of the link is relevant to the actual content at that URL. A link should never display as the short URL, as that tells the end user nothing about what they will find when they click the link. If no title was specified in creating the link, the full URL or the title of the end page should be used.

8
  • 1
    No. Why does anyone writing a question/answer need a URL shorterner? Commented Jan 1, 2016 at 0:11
  • 1
    The short answer is that it's not a need, but that there are many benefits. I've rewritten my post to feature those at the top.
    – azoundria
    Commented Jan 6, 2016 at 23:05
  • 6
    I'm sorry, but I'm not buying the whole "save memory" argument. Sites that stick source code into a URL should be blacklisted for contributing to stupidity. Google searches like that are of dubious value for this site. And the rest are nothing more than a rounding error as far as bandwidth is concerned. As for easy to remember, I also don't buy that. Most shortened URLs are primarily composed of random letters/numbers. Not exactly easy to remember. Commented Jan 6, 2016 at 23:15
  • 3
    I see no reason, like nicol, to have that at all. And I see even LESS reason for stack to implement this. Honestly, "it takes less memory".... is that a joke? If you're devving and need to count your bandwidth to the KB.... rethink your work environment, because it doesn't make sense. So to recap your reasons FOR a shortener: 1) post multiple comments, edit your link it, post your own answer 2).... no, just no 3) to post the same like quick and easy, copy paste, and paste, and paste. 4) the fact SOME are doesn't change the fact MOST aren't 5) these SPECIFIC playgrounds could be whitelisted.
    – Patrice
    Commented Jan 6, 2016 at 23:43
  • 1
    Someone who's providing a free service to others should not have to store multiple obscure piece of code that may or may not ever be used again indefinitely so that you can have a nice short link. But that's exactly what a URL shortener is anyways.
    – azoundria
    Commented Jan 6, 2016 at 23:44
  • 1
    Most of this post is good, but your utterly absurd example of saving bandwidth by posting a shorter URL was awfully hard to get past. I upvoted despite that, but I'm reasonably sure that's the main source of downvotes. (I've been on satellite Internet with a chafing bandwidth cap, and I would never have seriously considered shorter URLs as a route to optimizing bandwidth.) Commented Jan 9, 2016 at 23:10
  • @azoundria: Changing "bandwidth" to "screen space" doesn't really help. Your argument just goes from painfully unconvincing to... making no sense at all. People usually don't show links directly; they use link text instead. So how long a link is has nothing to do with saving screen space. Commented Jan 12, 2016 at 4:25
  • I've removed this point for now since it goes against the mainstream view. I hate waste, in principle, no matter how small or large of a waste it is, and I think that small things can make a big impact when multiplied over millions of users. I have to be respectful of others viewpoints though.
    – azoundria
    Commented Jan 12, 2016 at 14:12

You must log in to answer this question.

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