The embed set canonical url site setting might help with the problem:
It’s worth looking at Google’s documentation though:
- How to Specify a Canonical with rel="canonical" and Other Methods | Google Search Central | Documentation | Google for Developers (why is the the text for this link in French?)
- 5 common mistakes with rel=canonical | Google Search Central Blog | Google for Developers
The reason I linked to the docs is because I’m not certain about the case of enabling the embed set canonical url setting when the embed truncate setting is enabled. When embed truncate is enabled, only a snippet of the original article is actually available to be crawled by Google on Discourse. The full article is displayed in an iframe if users click the “Show Full Post” button. I’m fairly sure the iframe content is not crawled by Google. The first point in the “5 common mistakes” article kind of addresses that issue.
