The discussion revolves around the canonical structure of /u/* URLs in Discourse, which are causing thousands of extra URLs to be indexed by Google. stance455 explains that while most URLs have correct canonicals, the /u/* subpages (like /u/FlyNumber/summary or /u/FlyNumber/activity) currently have canonicals pointing to themselves, leading to unnecessary indexing. They propose that these subpages should canonicalize to the main user profile page (/u/FlyNumber) instead. justin notes that /u/ URLs are normally not indexed due to robots.txt and headers, but stance455 confirms they are using a custom setup with Cloudflare workers to allow indexing. stance455 suggests removing the canonicals entirely or using JavaScript via Cloudflare workers to rewrite them, but seeks help on how to dynamically extract the username and set the correct canonical URL. They also consider modifying Discourse code directly if needed.
I’d like to also point out that removing the canonicals altogether for those urls would be a step in the right direction. (IMHO my method is better for SEO)
As stated above, it’s set to noindex so not sure why Discourse generates the canonical at all.