# Links in popular links appear without nofollow

**URL:** <https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974>\
**Category:** Bug\
**Created:** [29.Август.2017 08:26:06 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974 "2017-08-29T08:26:06Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Idan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/idan/32/198212_2.png) [@Idan](https://meta.discourse.org/u/Idan)\
**Post date:** [29.Август.2017 08:26:06 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974/1 "2017-08-29T08:26:06Z")

</div>

Is it possible that the links in the “popular links” section will appear with nofollow as well, they do in the post itself. In the settings I’ve enabled the nofollow option, but for some reason the links in the popular links section don’t show it.

---

<div class="post-metadata">

**Author:** ![Stranik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stranik/32/85638_2.png) [@Stranik](https://meta.discourse.org/u/Stranik)\
**Post date:** [29.Август.2017 09:13:14 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974/2 "2017-08-29T09:13:14Z")

</div>

nofollow no ☹

 ![Untitled-2](https://global.discourse-cdn.com/meta/original/3X/5/1/512bc89d325f5ea714456482da058b88c886363d.jpg)

And if just add here: nofollow (topic-map.js.es6)? It does not make sense to open in 2 places. Messages already have a link.

```
  buildAttributes(attrs) {
    return { href: attrs.url,
             target: "_blank",
             'data-user-id': attrs.user_id,
             'data-ignore-post-id': 'true',
             title: attrs.url };
  },

```

---

<div class="post-metadata">

**Author:** ![Idan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/idan/32/198212_2.png) [@Idan](https://meta.discourse.org/u/Idan)\
**Post date:** [29.Август.2017 10:30:51 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974/3 "2017-08-29T10:30:51Z")

</div>

having follow links there is a golden gate for spammers.

---

<div class="post-metadata">

**Author:** ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)\
**Post date:** [29.Август.2017 11:31:50 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974/4 "2017-08-29T11:31:50Z")

</div>

While I’d like to see this added so spammers don’t even _think_ they can place a good link there, this isn’t an actual problem – these links are not visible to search engines. Here’s how this page looks like to Google:

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

---

<div class="post-metadata">

**Author:** ![Stranik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stranik/32/85638_2.png) [@Stranik](https://meta.discourse.org/u/Stranik)\
**Post date:** [29.Август.2017 11:46:08 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974/5 "2017-08-29T11:46:08Z")

</div>

Yes, I agree. If the costs are minimal, then why not add? Spammers can not look at the document that they see to search engines (and not all, but only those that are written in the file: crawler\_detection.rb)

I already have cases where spammers target this part of the code and register to add a link.

---

<div class="post-metadata">

**Author:** ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)\
**Post date:** [29.Август.2017 11:48:39 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974/6 "2017-08-29T11:48:39Z")

</div>

> [@Stranik](#):
>
> and not all, but only those that are written in the file: crawler\_detection.rb

This should cover all search engines that are either detected or do not execute JavaScript, I think that this misses almost nothing 🙂

---

<div class="post-metadata">

**Author:** ![Stranik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stranik/32/85638_2.png) [@Stranik](https://meta.discourse.org/u/Stranik)\
**Post date:** [29.Август.2017 12:27:54 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974/7 "2017-08-29T12:27:54Z")

</div>

In file: crawler\_detection.rb

```
  def self.crawler?(user_agent)
    !/Googlebot|Mediapartners|AdsBot|curl|HTTrack|Twitterbot|facebookexternalhit|bingbot|Baiduspider|ia_archiver|Wayback Save Page|360Spider|Swiftbot|YandexBot/.match(user_agent).nil?
  end

```

Mozilla Firefox 34.0 → about:config → general.useragent.override

I add those bots that are not on the list. In fact, a lot of search engines:StackRambler, Teoma and etc.  
As a result, I see a normal page

Am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)\
**Post date:** [29.Август.2017 12:28:42 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974/8 "2017-08-29T12:28:42Z")

</div>

To get the screenshot above, I simply disabled JavaScript. 🙂

---

<div class="post-metadata">

**Author:** ![Stranik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stranik/32/85638_2.png) [@Stranik](https://meta.discourse.org/u/Stranik)\
**Post date:** [29.Август.2017 12:31:51 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974/9 "2017-08-29T12:31:51Z")

</div>

I understand everything, thank you. )

---

<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:** [29.Август.2017 12:31:58 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974/10 "2017-08-29T12:31:58Z")

</div>

To me this looks like a bug a pretty bad bug.

---

<div class="post-metadata">

**Author:** ![sam\_sock](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@sam\_sock](https://meta.discourse.org/u/sam_sock)\
**Post date:** [29.Август.2017 12:33:31 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974/11 "2017-08-29T12:33:31Z")

</div>

I am sam’s sock, posting a link to [www.cnn.com](http://www.cnn.com)

---

<div class="post-metadata">

**Author:** ![Stranik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stranik/32/85638_2.png) [@Stranik](https://meta.discourse.org/u/Stranik)\
**Post date:** [29.Август.2017 12:41:35 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974/12 "2017-08-29T12:41:35Z")

</div>

I do not know the engine well, but I looked at the complaints from the search engines. Many search engines want, for example, to see a header (h1) on each page. In my copy, I had to manually insert this header into the source (on some pages: latest, for example). If there is a problem with the links (not in Google, Yandex, and in other lesser known systems), then I think it’s probably worth considering more carefully.

---

<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:** [29.Август.2017 12:42:14 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974/13 "2017-08-29T12:42:14Z")

</div>

Note, this will only impact crawlers that use JavaScript. Nonetheless the trivial fix is just to disable follow in that section. It adds a minimal amount really.

---

<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:** [02.Сентябрь.2017 04:59:14 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974/14 "2017-09-02T04:59:14Z")

</div>

Can you add this to your list @techAPJ? I think it is pretty easy, just always have nofollow in this section. I don’t think it applies to crawlers since it doesn’t appear there.

---

<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:** [04.Сентябрь.2017 10:53:47 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974/15 "2017-09-04T10:53:47Z")

</div>

> [@codinghorror](#):
>
> just always have nofollow in this section

Done via:

> <https://github.com/discourse/discourse/commit/3b7128102c12d72d0303c83e4f113aa06c23655c>
>
> https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/6897…4

---

<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:** [04.Сентябрь.2017 20:50:42 UTC](https://meta.discourse.org/t/links-in-popular-links-appear-without-nofollow/68974/16 "2017-09-04T20:50:42Z")

</div>


