umputun / remark42

comment engine
https://remark42.com
MIT License
4.81k stars 374 forks source link

Google marks remark iframe urls as duplicate content #1683

Open meinto opened 10 months ago

meinto commented 10 months ago

Can we add an option to the frontend configuration to set a canonical link?

https://remark42.com/docs/configuration/frontend/

akellbl4 commented 9 months ago

@meinto hey, could you please provide a bit more content about the problem?

meinto commented 8 months ago

Hi @akellbl4

I took a closer look at the problem. It probably only happens on pages that don't have any comments yet. In this case the /web/iframe.html looks the same on different websites. This results in duplicate content, because the same .html file appears on different pages. In my opinion, the solution would be to define a canonical URL for the Remark42 pages. This would signal to the search engines that your own page is the correct URL. In general, you don't actually want the iFrame URLs to be indexed, but only the pages on which the iFrame is integrated.