# Exempt Links to other Topics/Posts from Link Limit?

**URL:** https://meta.discourse.org/t/exempt-links-to-other-topics-posts-from-link-limit/17112
**Category:** Feature
**Created:** [2 Julho , 2014 15:38 UTC](https://meta.discourse.org/t/exempt-links-to-other-topics-posts-from-link-limit/17112 "2014-07-02T15:38:55Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [2 Julho , 2014 15:38 UTC](https://meta.discourse.org/t/exempt-links-to-other-topics-posts-from-link-limit/17112/1 "2014-07-02T15:38:55Z")

</div>

Continuing the discussion from [Tmp/cache needs to be manually cleared when developing plugins](https://meta.discourse.org/t/tmp-cache-needs-to-be-manually-cleared-when-developing-plugins/17109):

> [@toolness](#):
>
> My original post contained more links that specifically referred to the comments I mentioned, but I was told after all this hard work that as a new user, I can only mention two links in a post, which was extremely frustrating. While I doubt I can convince anyone to drop such a “distrust-by-default” policy, it would be nice if the UI could inform users that they have too many links in real-time (rather than after they’ve peppered their post with helpful links and submitted the form), **and it would also be nice if links to certain sites (such as other threads on the same discourse installation) could be exempted from the quota.**

I think this has a lot of merit (especially the part I bolded). Thoughts from everyone else?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [2 Julho , 2014 17:35 UTC](https://meta.discourse.org/t/exempt-links-to-other-topics-posts-from-link-limit/17112/2 "2014-07-02T17:35:40Z")

</div>

This makes sense to me. If not completely exempt, a higher limit.  
The only way I can see this possibly getting abused is if someone wanted to link to multiple SPAM posts in the site.  
Edge case and not likely to go unnoticed for long.

---

<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: [3 Julho , 2014 02:17 UTC](https://meta.discourse.org/t/exempt-links-to-other-topics-posts-from-link-limit/17112/3 "2014-07-03T02:17:49Z")

</div>

Already exists, edit the whitelist in the admin settings.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [3 Julho , 2014 11:28 UTC](https://meta.discourse.org/t/exempt-links-to-other-topics-posts-from-link-limit/17112/4 "2014-07-03T11:28:25Z")

</div>

Are you talking about this setting?  
 ![](https://global.discourse-cdn.com/meta/original/3X/8/7/87f79b32afdf6afb438b7e5d639ef4d4497f4d9d.png)

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [3 Julho , 2014 11:39 UTC](https://meta.discourse.org/t/exempt-links-to-other-topics-posts-from-link-limit/17112/5 "2014-07-03T11:39:35Z")

</div>

Nope. Doesn’t work. I found two whitelist locations, the one above and one in onebox and neither permit a new user to post more than 2 links based on the domain of the site.

Can you elaborate your proposed solution?

---

<div class="post-metadata">

### Author: ![toolness](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toolness/32/114496_2.png) [@toolness](https://meta.discourse.org/u/toolness)
#### Post date: [7 Julho , 2014 21:20 UTC](https://meta.discourse.org/t/exempt-links-to-other-topics-posts-from-link-limit/17112/6 "2014-07-07T21:20:02Z")

</div>

If this feature does exist, it’d be nice if this meta discourse forum whitelisted itself, so that my intra-site links (to reference other posts) didn’t count against my limit in my original post. Whitelisting URLs that point to the Github project for Discourse would also be ultra cool.

---

<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: [22 Julho , 2014 07:57 UTC](https://meta.discourse.org/t/exempt-links-to-other-topics-posts-from-link-limit/17112/7 "2014-07-22T07:57:29Z")

</div>

Sorry about that, what I meant was, you won’t get blocked for posting tons of links to sites on the whitelist. However, maybe we should allow an unlimited number of links to any sites in the whitelist even from new users – @techAPJ can you look into that?

Also can you verify @techapj that _internal_ links from new users, e.g. a brand new user who just created a new account, can create as many internal links to the local Discourse as they want?

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [23 Julho , 2014 16:55 UTC](https://meta.discourse.org/t/exempt-links-to-other-topics-posts-from-link-limit/17112/8 "2014-07-23T16:55:16Z")

</div>

Okay, I just tested this thoroughly. Here are the conclusions:

> [@codinghorror](#):
>
> we should allow an unlimited number of links to any sites in the whitelist even from new users

This is already implemented. If you add a domain in `white_listed_spam_host_domains` setting, it will allow new users to post unlimited number of links to that domain.

@cpradio I found in my testing that including `http://` or trailing `/` in domain breaks this functionality. Maybe you included them in domain you added? I sent a PR to make this clear:

[https://github.com/discourse/discourse/pull/2576](https://github.com/discourse/discourse/pull/2576)

* * *

> [@codinghorror](#):
>
> internal links from new users, e.g. a brand new user who just created a new account, can create as many internal links to the local Discourse as they want?

This is already implemented. New users can post unlimited local Discourse links.

* * *

Also while testing this, I caught a bug:

[https://meta.discourse.org/t/oneboxing-oneboxed-post-renders-distorted-ui/17953?u=techapj](https://meta.discourse.org/t/oneboxing-oneboxed-post-renders-distorted-ui/17953)

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [23 Julho , 2014 17:06 UTC](https://meta.discourse.org/t/exempt-links-to-other-topics-posts-from-link-limit/17112/9 "2014-07-23T17:06:51Z")

</div>

> [@techAPJ](#):
>
> @cpradio I found in my testing that including http:// or trailing / in domain breaks this functionality. Maybe you included them in domain you added? I sent a PR to make this clear:

I used localhost:4000 initially, I also used 127.0.0.1 and localhost. None of them had worked in the environment I was using, but I’d have to set it up again to try it out. So I’m not sure what I did wrong, it may be how I had my environment setup to test it.

---

<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: [23 Julho , 2014 17:49 UTC](https://meta.discourse.org/t/exempt-links-to-other-topics-posts-from-link-limit/17112/10 "2014-07-23T17:49:48Z")

</div>

This URL restriction of not allowing trailing slash or leading http does  
not make sense to me, I would call that a bug, not a copy change @techapj

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [24 Julho , 2014 16:42 UTC](https://meta.discourse.org/t/exempt-links-to-other-topics-posts-from-link-limit/17112/11 "2014-07-24T16:42:17Z")

</div>

Fixed:

[https://github.com/discourse/discourse/pull/2580](https://github.com/discourse/discourse/pull/2580)

---

<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: [6 Janeiro , 2015 09:20 UTC](https://meta.discourse.org/t/exempt-links-to-other-topics-posts-from-link-limit/17112/12 "2015-01-06T09:20:10Z")

</div>


