Hi everyone,
I installed a Flarum forum in a subfolder of one of my blog 2 weeks ago (and I also use the SEO extension) and I love it so far. After the first discussions have been crawled by Google, I quickly saw a lot of urls being indexed in my google search console. I have 3 types of urls being indexed for each comment in each discussion:
- With
?near
parameter: https://novo-media.ch/forum/d/3-savoir-si-un-theme-est-ok-niveau-code?near=2
- With
/commentId
: https://novo-media.ch/forum/d/3-savoir-si-un-theme-est-ok-niveau-code/2
- With
/postId/commentId
: https://novo-media.ch/forum/d/3/2
All urls with the same post id (regardless of the comment id) generate the same HTML (even if it scrolls down to a different comment)... So to avoid duplicate content and help google not to crawl to many urls, I think best practice is to use the rel canonical tag as follows (for the example url above):
<link rel="canonical" href="https://novo-media.ch/forum/d/3-savoir-si-un-theme-est-ok-niveau-code">
But Flarum actually generates a different rel canonical tag for every comment on the page like so:
<link rel="canonical" href="https://novo-media.ch/forum/d/3-savoir-si-un-theme-est-ok-niveau-code?near=2">
<link rel="canonical" href="https://novo-media.ch/forum/d/3-savoir-si-un-theme-est-ok-niveau-code?near=3">
Is there a reason for this to work this way that I don't get?
It's just that with all the urls being indexed, I'm wondering if it could have a negative impact on the overall SEO of my blog... And I'm wondering if I should maybe move the forum to a subdomain instead.
Thanks a lot for your feedbacks.