Good find @Moin
Currently, we already add
noindexto /u routes. However, due to robots.txt blocking this, search engines are not able to see the header.
So then we are referred to a previous change FIX: Always noindex /u routes - Pull Request #27712 - discourse/discourse - GitHub
which says
Secondly,
SiteSetting.hide_user_profiles_from_publicraises aForbidden, which disallows ourafter_action: add no index headerfrom triggering.
This PR makes sure that the no index header gets added via
before_actioninstead. We may consider removing /u fromdiscourse/app/controllers/robots_txt_controller.rb
Line 24 in 2900cbe
DISALLOWED_WITH_HEADER_PATHS = %w[/badges /u/ /my /search /tag//l /g /t//.rss /c/.rss]
Unfortunately, that does not always work. While /u/rgj does have a x-robots-tag: noindex header, /u/rgj/summary does not, so it seems like the most recent change is having some unwanted side effects.
(Moving to Contribute > Bug)