How to anonymize your links in Discourse?

Hi guys, can anyone suggest some sort way or java script or plugins for discourse that will allow me to anonymize the url links?

1 Like

What do you mean by “anonymize”?

something like this

http://anonym.to/en.html#anleitung

1 Like

@Huey_Le you means all links will be redirected to an external domain ? As I see, there is a script in their home page. You can take a look at that

That’s exactly what I want. I’ve tried to copy the script and paste that into the Header ( Admin Panel, Customize --> CSS —> Header ), but it’s still not working

Try pasting that into the footer, as it says on the site. Why do you need to “antonymize” them?

1 Like

The basic reason is perhaps his forum is talking about something or someone and links to what’s being talked about need to be antonymized so his forum and the discussions don’t show up in the target’s referrer backlogs and see what’s going on.

While this can be used for abusive means, I have used it to make sure my members can speak about other forums that are abusive to fans and link to proof of that without the other forum knowing they are actually being talked about.

Have you tried using https://archive.today?

3 Likes

Hmm, that would be very useful. I was also looking at linkonym too, mostly because it’s hosted by google (their app engine) so there’s little chance it will suddenly poof.

Have you successfully implemented this feature yet? Will you be able to share what plugins or method that you used?

linkonym’s current status.

Hah! Figures. Thanks for the update.

Only idea I have so far is to make a custom button for the composer to add part of the anon-izer to the front of a user’s link. But seeing that linkonym is a bust effort I’ll possibly use archive.today and use their API (if it’s usable).

Another one is http://nullrefer.com, which seems to be quite stable and is used by some “chans”.
Usage:

  http://www.nullrefer.com/?http://www.google.com

I think the best approach here would be a server-side plugin (instead of JS executed in browser) that adds the service as a prefix to all external URLs inside of .cooked posts. That way web crawlers would not leak referrer information to linked sites.

1 Like

Note that all links by users below TL3 are rel=nofollow.

3 Likes

Did anybody come up with a way of enabling a dereferrer for outgoing links?

I was considering a JavaScript solution, but this does collide with Discourse’s link counting (which redirects the user via /click/track, but doesn’t change the fact that the original post’s URL will appear in the Referrer header).

Update: As long as there is no setting or plug-in for this, the only way to solve this problem would be to add the following JavaScript:

jQuery(function() {
  $('body').on('mouseover', 'a', function(evt) {
    $(evt.target).attr('rel', 'noreferrer');
  });
});

Solution: It’s best to customize your Discourse instance by adding the following snippet before </head> , which is at least supported by current versions of Chrome and Firefox (but not e.g. in IE 11).

<meta name="referrer" content="never" />

The supported values and corresponding referrers being sent (taking this topic as an example) are:

9 Likes

@codinghorror Any chance to make this a feature? Ideally, we would have

  1. a global setting like “ Suppress referrer [for external links]” which would set the <meta> tag (or whatever is needed to suppress the referrer in the future).
  2. (optional) a way to configure a dereferrer service (such as dereferer.me) using a URL with a placeholder (e.g. https://dereferer.me/?%s). (The trickiest part is probably not to interfere with the link click counting.)
2 Likes

You can do this right now with Admin -> Customize. Put the tag in the head section.

3 Likes

Yes, but:

  • This is a customization that is only available to admins who know about this issue.
  • This it not a setting that is available (more precisely: discoverable) to all admins.

For corporate Discourse instances, this can be a delicate issue, because the referrer may disclose information about

  • internal network structures (the instance might be accessible from outside, even if login restricted) and/or
  • internal topics you discuss (like unpublished projects or strategies or competitors).

And for the record: It is currently not possible to configure a dereferrer service to be used by Discourse.

This information may be best suited for the default topic auto-posted with every installation, as it appears only a small demographic need to remove the referrer for all outgoing links.

RE, Corporations; Discourse itself may not offer/allow an easy installation for these kinds of referrer-removal services. But an entire intranet do. These services are only proxies, and proxies come in various forms.

For example: in less than two minutes, I googled a possible way to remove the referral header for all outbound links via Nginx.