https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls

As per the first image, every sub-page (in our case 10th post or 11th post in the discussion) should have the main page URL as the canonical URL.

But in flarum discussion posts pages why do we are mentioning ?page=17 ? we are supposed to give the link of the first post right? we should not have ?page=17

  • clarkwinkelmann replied to this.
    • Best Answerset by Hari

    Hari this question was answered by @ askvortsov at discord and @ Clark via discuss

    You should be able to override that. Possibly via content method on the Frontend extender, maybe via middleware.

    Keep in mind that if you set canonical URL of subposts to the first post, search engines might not scan those posts in discussions

    Hari ?page= is necessary for search engines to browse down a discussion. If we set every page with canonical URL to the first post, the search engines will ignore the next page links as duplicates.

    If you open a discussion on the first post and check the source, you'll see the canonical meta is the link to the first post.

    With ?page=, every group of 20 posts has its own canonical URL and can be indexed separately by search engines.

    Ideally we should use the same /<post number> syntax that we use for javascript users, but it's a bit complicated to implement for search engines without ending up with as many pages indexed as there are posts. (because anytime a post is deleted, the number for the start of each page would shift, which would cause completely new URLs for each subsequent page if we only allow search engines to index numbers that start a batch of 20 posts)

      clarkwinkelmann ?page= is necessary for search engines to browse down a discussion. If we set every page with canonical URL to the first post, the search engines will ignore the next page links as duplicates.

      Got it

      Hari the subpages should also have link rel="prev" & 'next' for every subpage.

      This is missing, could you consider adding this? (creating issue at core) it should have relation to previous and next posts

      10 days later

      ?page= is necessary for search engines to browse down a discussion. If we set every page with canonical URL to the first post, the search engines will ignore the next page links as duplicates.

      my problem is: this behaviour displays 20-30 pages in google with the same page title (i don't want to have many pages indexed with duplicate titles)

      I want all posts to display the first post as canonical URL without the ?page=

      Can we change this behaviour with an extension or do we need to make changes at the core level?

      if it is easy to edit please tell me where to and what to edit 🙂

      (considering Quora & StackOverflow i have come to this conclusion)

      • Hari replied to this.

        Hari this question was answered by @ askvortsov at discord and @ Clark via discuss

        You should be able to override that. Possibly via content method on the Frontend extender, maybe via middleware.

        Keep in mind that if you set canonical URL of subposts to the first post, search engines might not scan those posts in discussions