Old topics published via WordPress embed are missing x-robots: noindex and canonical tags

Hi everyone,

I’ve noticed a strange behavior with old topics that were automatically published from WordPress to Discourse (to be used as the comment section).

Normally, when a post is published this way, Discourse correctly adds the X-Robots-Tag: noindex to the HTTP header and sets the canonical URL pointing back to the WordPress blog post.

However, I discovered that older topics are losing these tags. The noindex header disappears, and the canonical tag is no longer present. Here are some examples of topics where this is happening:

Does anyone know a way to fix this issue?

Keep in mind that I have no way of knowing exactly how many topics have been affected so far, but it looks like it’s quite a few.

It would be great if there were a checkbox in the category (or tag?) settings that, when enabled, would automatically add noindex to all topics published under that category. Something like:

[ ] Hide Topics from this category in search results.