# Add rel="nofollow" admin setting is not working right, its making parent domain link as nofollow

**URL:** https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226
**Category:** Feature
**Created:** [2015 年 5 月 25 日午後 6:50 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226 "2015-05-25T18:50:08Z")
**Posts on this page:** 16
**Page:** 2

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015 年 5 月 27 日午前 12:20 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226/21 "2015-05-27T00:20:18Z")

</div>

We are going to need an extra site setting.

if `forum.ninjas.co.uk` then `www.ninjas.co.uk` should be followed.

if `beta.forum.ninjas.com` then `www.ninjas.com` should be followed.

So we need a site setting here for:

`follow_links_domains` which user can set. Which will help for lots of other cases. Like `ninjas.community` wanting `www.ninjas.com` followed.

---

<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: [2015 年 5 月 27 日午前 12:20 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226/22 "2015-05-27T00:20:25Z")

</div>

Yes this only applies to the domain part of the URL.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015 年 5 月 27 日午前 12:30 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226/23 "2015-05-27T00:30:28Z")

</div>

However, I think our default behavior is correct now.

`meta.discourse.org` should only include follow for `a.meta.discourse.org` etc. Otherwise we need to carry around logic that tells us who is a TLD

eg:

`.community` vs `.com` vs `co.uk` vs `co.il`

OR we need to do DNS queries and add extra complex logic.

---

<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: [2015 年 5 月 27 日午前 12:31 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226/24 "2015-05-27T00:31:32Z")

</div>

No we don’t need to do any of that, we just need to add one more site setting: it contains

`discourse.org`

or

`example.com`  
`example.co.uk`  
`example.website`

We know that anything with a period added to the front of that is allowed. **If this setting is not specified, then nofollow is super strict.**

Note that @techapj said he fixed a bug with the current handling that seems kind of severe..

> [@techAPJ](#):
>
> Also there was bug when domain like [foo.com](http://foo.com) is added in exclude\_rel\_nofollow\_domains setting, then domain like [nofoo.com](http://nofoo.com) was also being allowed to be excluded from nofollow. Fixed that too.

So we need that fix..

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015 年 5 月 27 日午前 12:33 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226/25 "2015-05-27T00:33:20Z")

</div>

Sure, just saying current behavior is correct.

Also site setting should allow for a list of domains, not just one.

---

<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: [2015 年 5 月 27 日午前 12:33 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226/26 "2015-05-27T00:33:55Z")

</div>

According to @techapj current behavior is _not_ correct (at least for `exclude_rel_nofollow_domains`)

---

<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: [2015 年 5 月 27 日午前 4:20 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226/27 "2015-05-27T04:20:25Z")

</div>

> [@sam](#):
>
> So we need a site setting here for:
> 
> follow\_links\_domains which user can set.

Yes, I agree. However I think we should just rename setting `exclude_rel_nofollow_domains` to `follow_links_domains`, because `exclude_rel_nofollow_domains` is essentially doing the same thing. So:

- By default `meta.discourse.org` will only follow `meta.discourse.org`, `a.meta.discourse.org`, etc.
- If the user adds `discourse.org` to `follow_links_domains` setting then `meta.discourse.org` will also follow `discourse.org`, `www.discourse.org`, `try.discourse.org`, etc.

Sounds good?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015 年 5 月 27 日午前 4:31 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226/28 "2015-05-27T04:31:57Z")

</div>

I think this is fine:

[https://github.com/discourse/discourse/commit/93ab03966ea9395f86b39fded3ef8f70e274857a](https://github.com/discourse/discourse/commit/93ab03966ea9395f86b39fded3ef8f70e274857a)

I don’t want rename this site setting, seems pointless.

---

<div class="post-metadata">

### Author: ![lovechopra1](https://avatars.discourse-cdn.com/v4/letter/l/4af34b/32.png) [@lovechopra1](https://meta.discourse.org/u/lovechopra1)
#### Post date: [2015 年 6 月 3 日午前 4:33 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226/29 "2015-06-03T04:33:20Z")

</div>

Is it fixed? If I upgrade to latest version will it work or do I need to wait for next release?

Also do I need to do anything for old posted links or ‘no-follow’ will automatically get removed from older root domain links?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2015 年 6 月 3 日午前 5:38 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226/30 "2015-06-03T05:38:20Z")

</div>

It works fine but you need to plugin the domain name into the site setting

---

<div class="post-metadata">

### Author: ![lovechopra1](https://avatars.discourse-cdn.com/v4/letter/l/4af34b/32.png) [@lovechopra1](https://meta.discourse.org/u/lovechopra1)
#### Post date: [2015 年 6 月 8 日午前 9:06 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226/31 "2015-06-08T09:06:13Z")

</div>

@sam its working fine for newly add links but for older content it is still adding rel=“nofollow”, please suggest how can I remove rel=“nofollow” for all the older content for my parent domain?

---

<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: [2015 年 6 月 8 日午前 9:22 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226/32 "2015-06-08T09:22:08Z")

</div>

Rebake the previous content – look up the command to rebake all posts.

---

<div class="post-metadata">

### Author: ![lovechopra1](https://avatars.discourse-cdn.com/v4/letter/l/4af34b/32.png) [@lovechopra1](https://meta.discourse.org/u/lovechopra1)
#### Post date: [2015 年 6 月 8 日午前 10:21 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226/33 "2015-06-08T10:21:57Z")

</div>

Thanks a lot, it work like a magic 😄

---

<div class="post-metadata">

### Author: ![Aaron\_Seminoff](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aaron_seminoff/32/39709_2.png) [@Aaron\_Seminoff](https://meta.discourse.org/u/Aaron_Seminoff)
#### Post date: [2015 年 6 月 14 日午前 7:47 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226/34 "2015-06-14T07:47:49Z")

</div>

Sorry guys I am a newbie with nofollow and have a question: I want to take content from by blog on my normal site and also post it as a thread on my discourse site which is a subdomain of my main site ([animalhearted.com](http://animalhearted.com) vs. [community.animalhearted.com](http://community.animalhearted.com)). Do I need to add a rel cononical tag to each thread I post individually so that google won’t penalize me for having duplicate content on my site? Please let me know what I need to do in order to post duplicate content and not get an seo dock from google.

Thanks so much!

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [2015 年 6 月 14 日午後 2:15 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226/35 "2015-06-14T14:15:51Z")

</div>

Typically what’s done is the embedding feature, which will put a short excerpt on Discourse with a “Show Full Post” button.

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [2025 年 12 月 4 日午前 11:35 UTC](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226/36 "2025-12-04T11:35:57Z")

</div>



[前のページ](https://meta.discourse.org/t/add-rel-nofollow-admin-setting-is-not-working-right-its-making-parent-domain-link-as-nofollow/29226.md?page=1)
