Google structured data for forums and profile pages

1. itemprop="text"

Just always add itemprop="text" here, as articleBody is not specified (anymore?) for DiscussionForumPosting.

2. mainEntityOfPage

mainEntityOfPage must only be set once for DiscussionForumPosting and never for the multiple Comment:
e.g. check for post.is_first_post

3. itemprop="url"

Add itemprop="url" to the itemscope of DiscussionForumPosting.
This ensures that comments on subpages (…?page=2) are bound to the main topic page.

<link itemprop="url" href="???">

post.topic.url is not set here. Is there something like @topic_view.url?

Important: the itemprop url must point to the first page of the topic in crawler view:

  • e.g. https://example.org/t/topic-title/1234
  • not https://example.org/t/topic-title/1234?page=2

See DiscussionForumPosting → Recommended properties → url

url: The canonical URL of the discussion. In multi-page threads, set this property to th first page URL. For a single discussion, this is usually the current URL.

1 Like