Fixed Google Indexing Irrelevant 'Reply to Thread Pages'

Affected version


I have enabled guest posting so guests can reply to any thread. But now google started to index so many urls of single thread like this

Here is the examples my site pages being indexed by google

site   Google Search.png

When I open the source code of the pages, I find that there is no canonical url in these links. So I think the problem is, it does not have canonical url.