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!

Thanks for the information.

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