How to noindex topics within a specific category?

How can we set noindex for all topics in a specific category?

I know you can hide a category from public view, but that’s a workaround, not the goal.

Thanks so much!

So you want everyone except for search engines to be able to see topics in that category?

What’s the use case?

You’ll need a custom plugin if I understand what you’re wanting.

1 Like

Hey Jay, hope you’re well.

I don’t mind if search engines crawl the content, no problem. I just don’t want them to index it. It makes little sense for a Bible forum to have garden, recipes, lounge talk, and what not indexed. Those are just off topic items that do not reflect what the forum is about.

So topics in those categories should never be indexed.

I figured there must be a setting somewhere and keep missing it…

I’m pretty sure that’s not the case. I suspect making your off-topic stuff accessible only to people who are logged in is the way to go.

And here’s this from ask.discourse.com

Setting Noindex for Discourse Category Topics AI

pfaffman:

How can we set noindex for all topics in a specific category?

DiscourseHelper:

Thinking

Searching
Searching for: How to automatically set noindex for every topic created within a certain Discourse category, using settings, moderation, or plugins, and ensure that search engines don’t index those topics

Reading
Read: Is it possible to specify noindex for all topics in a specified category?

Reading
Read: How to add noindex to an entire category?

Reading
Read: Need a way to add “meta robots noindex” in topics from a category

Reading
Read: Need to find a solution to block indexing topics from a category

Reading
Read: How to noindex topics within a specific category?

Reading
Read: Deindex a single discussion without archiving

Discourse does not currently include a built-in setting to automatically set noindex for all topics in a specific category if the category is still publicly viewable. The most reliable way to prevent indexing of topics in a category is to restrict the category’s visibility so only logged-in users can view it, but this may not fit your needs if you still want public access.

Key findings:

  • There is no core feature or admin setting to add a noindex meta tag to all topics in a specific category.
  • Adjusting robots.txt via the /admin/customize/robots setting will only affect the category listing page, not the individual topics inside that category (source).
  • A plugin would be required to automatically add noindex to topics in a specific category (source).
  • Other workarounds like “unlisting” or only showing categories to logged-in users either reduce public accessibility or don’t affect indexing by search engines (source).

Summary Table:

Method Effect on Search Engines Public Access
Restrict category to TL0 Blocks search engines & guests, not truly public :cross_mark:
Custom robots.txt Only blocks category listing, not individual topics :white_check_mark:
Plugin (custom development) Needed to add <meta name="robots" content="noindex"> to topics :white_check_mark:
Unlist topics Topics remain public & indexable if directly linked :white_check_mark:

References:

If a plugin solution is required and you are hosted by Discourse (Pro/Business/Enterprise), you should contact team@discourse.org to discuss your needs, as hosted plans do not allow custom plugins directly but may offer professional services or alternative solutions.

Let me know if you need more details or help with communicating your requirements to the Discourse team!

2 Likes

Thanks for the information.

I might end up doing that, I’ll have to think about this one.

2 Likes

It’s a shame to be forced to hide content from visitors to also hide it from indexing robots. You may want your visitors to discover this Off content to show how fun, enjoyable, open your community is…

Does Discourse not plan to offer a simple checkbox for each category to index, or not, its content?

1 Like

A good way to support that feature request is to add your vote to it btw

3 Likes

Hey thanks for chiming in folks.

I figured there would be a setting, this is really basic stuff, and Discourse is so advanced. @chapoi thanks for the note, I voted on that, but it’s a different use case. I imagine that’s why there are so few votes.

1 Like

What do you mean?

Wouldn’t that solve it for you?

Definitely buddy.

I should have been more clear, the users main concern was with his integration with Wordpress (which I use) so perhaps people see that and look away from the thread.

I just have a hard time understanding how only 3 people voted for it. So my rationalization showed up. :grin:

1 Like

but it’s not “visitors” – it’s “visitors who don’t care enough about your site to register for an account” – and the request is not for it to be hidden, but to let the bots see it, use your bandwidth to get it and then, if they choose to follow your instructions, not add it to their index.

If you think your off-topic information is so alluring and fun that you want people to see it without creating an account, then why not have it indexed so they can find it?

I am not trying to be difficult–I have no authority here, but I don’t see how the request is going to help you. Perhaps those who have influence over what goes in core understand.

1 Like