# How to anonymize your links in Discourse?

**URL:** <https://meta.discourse.org/t/how-to-anonymize-your-links-in-discourse/25185>\
**Category:** Support\
**Created:** [2015年二月12日 23:39 UTC](https://meta.discourse.org/t/how-to-anonymize-your-links-in-discourse/25185 "2015-02-12T23:39:25Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![claas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/claas/32/71725_2.png) [@claas](https://meta.discourse.org/u/claas)\
**Post date:** [2016年八月7日 22:33 UTC](https://meta.discourse.org/t/how-to-anonymize-your-links-in-discourse/25185/22 "2016-08-07T22:33:01Z")

</div>

> [@purldator](#):
>
> For example: in less than two minutes, I googled a possible way to remove the referral header for all outbound links via Nginx.

Sorry, but that example you found there is the implementation of a dereferrer and would not hide the referrer when clicking e.g. on that external link you just posted except if you had manually added the `https://www.example.com/hide-referer?` part in your post.

If the Discourse team comes to the conclusion that they don’t want that feature (with or without the optional part), I will have to accept that. But there’s still a chance that they like it (and implement it) or at least don’t mind, so that it could still be implemented as a community PR or hypothetically as a plugin (which would need groundwork though).

---

<div class="post-metadata">

**Author:** ![purldator](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@purldator](https://meta.discourse.org/u/purldator)\
**Post date:** [2016年八月7日 22:40 UTC](https://meta.discourse.org/t/how-to-anonymize-your-links-in-discourse/25185/23 "2016-08-07T22:40:03Z")

</div>

> Sorry, but that example you found there is the implementation of a dereferrer and would not hide the referrer when clicking e.g. on that external link you just posted except if you had manually added the [https://www.example.com/hide-referer](https://www.example.com/hide-referer)? part in your post.

And if that is true, then thank you for pointing that out. But my point still stands that there are options available that do not require the need to make a substantial edification to the source code (hence, the work, the time for that) for this specific feature.

You already pointed out a way to do it using an existing feature (and thank you for doing that; I appreciate it as I too wanted outbound links scrubbed). If others want that, they surely would come to Meta and search for it.

> [@claas](#):
>
> If the Discourse team comes to the conclusion that they don’t want that feature (with or without the optional part), I will have to accept that. But there’s still a chance that they like it (and implement it) or at least don’t mind, so that it could still be implemented as a community PR or hypothetically as a plugin (which would need groundwork though).

You are welcome to submit a PR for it, or build a plugin. That is what those options are there for.

---

<div class="post-metadata">

**Author:** ![claas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/claas/32/71725_2.png) [@claas](https://meta.discourse.org/u/claas)\
**Post date:** [2016年八月7日 22:55 UTC](https://meta.discourse.org/t/how-to-anonymize-your-links-in-discourse/25185/24 "2016-08-07T22:55:15Z")

</div>

> [@purldator](#):
>
> You are welcome to submit a PR for it, or build a plugin.

I would like to, but:

1. PRs need to be discussed on meta first.
2. As of today, this is currently not possible with the plugin api.

And to clarify: I’m not asking anybody to spend time or make “substantial edification to the source code”.

---

<div class="post-metadata">

**Author:** ![purldator](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@purldator](https://meta.discourse.org/u/purldator)\
**Post date:** [2016年八月7日 23:14 UTC](https://meta.discourse.org/t/how-to-anonymize-your-links-in-discourse/25185/25 "2016-08-07T23:14:42Z")

</div>

> [@claas](#):
>
> And to clarify: I’m not asking anybody to spend time or make “substantial edification to the source code”.

It **be** that if the solution is as easy as what you already described above.

[I have not seen a rule anywhere that requires PRs to be discussed before being made.](https://github.com/discourse/discourse#contributing) If you have a link to this, please show me.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2016年八月7日 23:25 UTC](https://meta.discourse.org/t/how-to-anonymize-your-links-in-discourse/25185/26 "2016-08-07T23:25:38Z")

</div>

> [@claas](#):
>
> For corporate Discourse instances, this can be a delicate issue

But as you said

> [@claas](#):
>
> This is a customization that is only available to admins who know about this issue

So, if it is a delicate corporate issue, these admins would be aware of it and can take two minutes to put the customization in Admin, Customize, Header as @riking mentioned. So it is a rare issue, which has an easy solution.

---

<div class="post-metadata">

**Author:** ![claas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/claas/32/71725_2.png) [@claas](https://meta.discourse.org/u/claas)\
**Post date:** [2016年八月8日 20:00 UTC](https://meta.discourse.org/t/how-to-anonymize-your-links-in-discourse/25185/27 "2016-08-08T20:00:43Z")

</div>

> [@codinghorror](#):
>
> So it is a rare issue, which has an easy solution.

As I understand you, this will not be a feature by the Discourse team, right?  
Then let me dig deeper:

- Could this be a feature if the PR came from the community?
- If not: Could this be a plugin feature if the PR for the required PluginApi extension came from the community?

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2016年八月8日 20:50 UTC](https://meta.discourse.org/t/how-to-anonymize-your-links-in-discourse/25185/28 "2016-08-08T20:50:37Z")

</div>

The strongest part of your argument is that this is an important issue for corporate users. @codinghorror’s point is that a corporate user should have a reasonably competent sysadmin who could in 2-20 minutes solve this problem in a way that met the organization’s particular needs.

But if you think a plugin that would solve this problem would be useful (even just to you), you should write one and post here to let people know! Perhaps it’d be useful to lots of people. If that were the case, it would likely get sucked into core on down the road.

---

<div class="post-metadata">

**Author:** ![claas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/claas/32/71725_2.png) [@claas](https://meta.discourse.org/u/claas)\
**Post date:** [2016年八月8日 21:21 UTC](https://meta.discourse.org/t/how-to-anonymize-your-links-in-discourse/25185/29 "2016-08-08T21:21:06Z")

</div>

> [@pfaffman](#):
>
> The strongest part of your argument is that this is an important issue for corporate users.

Clarification: This issue affects _all_ Discourse instances that have _non-public_ topics with external links.

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2016年八月8日 22:55 UTC](https://meta.discourse.org/t/how-to-anonymize-your-links-in-discourse/25185/30 "2016-08-08T22:55:26Z")

</div>

Indeed , But most people aren’t concerned about the issue.

---

<div class="post-metadata">

**Author:** ![daxen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daxen/32/64364_2.png) [@daxen](https://meta.discourse.org/u/daxen)\
**Post date:** [2016年九月7日 13:24 UTC](https://meta.discourse.org/t/how-to-anonymize-your-links-in-discourse/25185/31 "2016-09-07T13:24:30Z")

</div>

https installations don’t send referrer to external sites.  
so it’s no problem for most installations.

edit:  
wrong, no referrer https=\>http, but on https=\>https it sends a referrer  
it can disabled by [meta tag](http://smerity.com/articles/2013/where_did_all_the_http_referrers_go.html): `<meta name="referrer" content="never">`

---

<div class="post-metadata">

**Author:** ![raw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/raw/32/44220_2.png) [@raw](https://meta.discourse.org/u/raw)\
**Post date:** [2016年十二月31日 19:58 UTC](https://meta.discourse.org/t/how-to-anonymize-your-links-in-discourse/25185/32 "2016-12-31T19:58:40Z")

</div>

just to clarify, is this the correct implementation? (@riking @claas)

 ![](https://global.discourse-cdn.com/meta/original/3X/9/c/9c1ba87eb8b51aabd2bf80c731794b9c5608f308.png)

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2016年十二月31日 20:03 UTC](https://meta.discourse.org/t/how-to-anonymize-your-links-in-discourse/25185/33 "2016-12-31T20:03:13Z")

</div>

Looks correct to me. You should view source with it enabled to make sure though.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2019年三月1日 22:36 UTC](https://meta.discourse.org/t/how-to-anonymize-your-links-in-discourse/25185/36 "2019-03-01T22:36:39Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

[上一頁](https://meta.discourse.org/t/how-to-anonymize-your-links-in-discourse/25185.md?page=1)
