How to add noindex to an entire category?


(Francisco Espinoza) #1

Hi guys, I just open a new discourse community…of course we wanna be index on Google and it’s friends, but we’re gonna open a category that we don’t want to show with any search bot. So the simple question is How to add “nofollow” to an entire category?

Cheers.


(Jay Pfaffman) #2

Change the permissions to require being logged in.


(Francisco Espinoza) #3

Not so bad. But what if I just want to hide it from the search bots?


(Kane York) #4

Links already have nofollow added to them. If staff users want to post nofollow links, you can make an <a> tag instead of the other methods of making links.


(Jay Pfaffman) #5

Oh. I totally missed the question. I thought he wanted the category not to be indexed.

Right. All links have nofollow for TL2 and below.


(Francisco Espinoza) #6

Right. I just want an entire category and all its posts not to be indexed. I don’t care about the links. I’m talking about the post.


(Kane York) #7

Ah. I don’t think there is a facility to add noindex to posts in a category, and you certainly couldn’t add it to parts of the topic list without tanking the ranking of your entire site.

You’d have to write a plug-in that adds the meta directive to the crawler layout, I don’t think there’s much hope for adding it with JavaScript.


(Jay Pfaffman) #8

If you want the posts to be publicly available, but denied in robots.txt, you need a plugin. I sort of wrote one. If you’ve got a budget or I find the time, I’ll make it available.


(Kane York) #9

Two problems with that: Noindex breaks if you deny the page in robots.txt (can’t load the page to see the noindex), and that would make the list extremely large.


(Jay Pfaffman) #10

He wants the posts in the category not to be indexed, so denying the category is, I think, what he means.


(Francisco Espinoza) #11

Exactly. The things is that I’m trying to connect WP with Discourse with the plugin and manage the comments of my blog posts with Discourse. But I don’t want Google indexing the entry on Discourse because it would be a duplicate of the Wordpress entry, thinking on SEO of course. So I think the proper way to do this is creating a Category, like ‘Feedback’, on Discourse and adding a nofollow by default to all entries on it.


(Jay Pfaffman) #12

Oh. That. See Is it possible for the feverbee blog posts to be pulled in full? - Forum Support - FeverBee Experts - The Community for Online Community Managers .

I see. I’m not an SEO person. I think that adding the no follow for the category to robots.txt will do what you want.


(Mittineague) #13

I think the effectiveness depends on whether or not any links get exposed

https://support.google.com/webmasters/answer/93710?hl=en

… the page can still appear in search results, for example if other pages link to it.

I think your best options are to either put those posts in a non-public category (no “everyone” permissions) or to not worry about which one Google chooses to return in the results.