Topic structured data: all posts declared as "mainEntityOfPage"

In the structured data model there should be only one object declared as mainEntity / mainEntityOfPage.
See “mainEntity” - Background information - Data Model - schema.org

Right now every single post is declared to be the mainEntityOfPage.

Google sees every page (= url) as its own context. Thereby it is possible to declare one post for each url as mainEntity – e.g.

  • https://DOMAIN/t/SLUG/43: main entity is #post_1
  • https://DOMAIN/t/SLUG/43?page=2: main entity is one of #post_10 to #post_19
  • https://DOMAIN/t/SLUG/43?page=3: main entity is one of #post_20 to #post_29
  • […]

See also Discussion for schema.org on “pagination of ItemLists” and Google: pagination for ItemList · Issue #1714 · schemaorg/schemaorg · GitHub

  • pagination for ItemList · Issue #1714 · schemaorg/schemaorg · GitHub
  • pagination for ItemList · Issue #1714 · schemaorg/schemaorg · GitHub

The above excerpt from Google’s developer documentation might be outdated as it is missing right now: General Structured Data Guidelines | Google Search Central  |  Google Developers

Does this not relate to the use of: DiscussionForumPosting - Schema.org Type

We use this for every single post, it looks like we should only use it for the first post and then use Comment - Schema.org Type for the rest.

That way we get rid of all the repeat titles pagination stuff and and the rest of things that are not a good fit.

1 Like

Google may not really care about sub-types like DiscussionForumPosting and map these to the ancestor type Article instead.
By doing this Discourse might look more like a blog with Articles plus Comments from Googles perspective.

Maybe another way is to make the relations between DiscussionForumPostings more clear:
e.g. by using about - Schema.org Property to declare the parent post inside each answer.

post_1 (mainEntityOfPage)
|
+-- post_2 (about post_1)
|
+-- post_3 (about post_1)
|   |
|   + post_4 (about post_3)
|   + post_6 (about post_3)
|
+ post_5 (about post_1)

There is a discussion on how to use DiscussionForumPosting:

One opinion - see: We have DiscussionForumPosting but no DiscussionForum... · Issue #125 · schemaorg/suggestions-questions-brainstorming · GitHub

The description of DisccussionForumPosting is “A posting to a discussion forum.”.

A typical forum is made up of categories. Categories contain forums, and a forum contains topics. A topic contains 1 or more forum posts.

The description seems to indicate that this schema is for an individual forum post but the example seems to show it is for a topic which can have multiple forum posts from multiple authors.

1 Like

I stumbled upon a working structured data model (= Google makes rich snippets) for forum posts in the wild: XenForo

Google SERP mobile view

Google SERP desktop view

Technical details

e.g. https://www.audiosciencereview.com/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/

Heavily reduced HTML code:

<!DOCTYPE html>
<html>
    <head>
        <title>Headphones and the Harman target curve | Audio Science Review (ASR) Forum</title>
        […]
    </head>
    <body>
        <script type="application/ld+json">
            {
                "@context": "https://schema.org",
                "@type": "DiscussionForumPosting",
                "@id": "https://audiosciencereview.com/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/",
                "headline": "Headphones and the Harman target curve",
                "articleBody": "I recently started dabbling with EQ'ing my headphones (APO+Peace). I've been going back and fort with this with two of my headphones, the Hifiman Ananda and the Denon AH-D7200. With both of them, I think the Harman target profile sounds like...",
                "articleSection": "Headphones and Headphone Amplifier Reviews",
                "author": {
                    "@type": "Person",
                    "name": "spittiz"
                },
                "datePublished": "2020-11-27T20:59:17+00:00",
                "dateModified": "2022-11-14T12:49:45+00:00",
                "image": "https://audiosciencereview.com/forum/data/avatars/h/6/6175.jpg?1606506178",
                "interactionStatistic": {
                    "@type": "InteractionCounter",
                    "interactionType": "https://schema.org/ReplyAction",
                    "userInteractionCount": 353
                },
                "publisher": {
                    "@type": "Organization",
                    "name": "Audio Science Review (ASR) Forum",
                    "logo": {
                        "@type": "ImageObject",
                        "url": "https://www.audiosciencereview.com/forum%20resources/Two-line%20ASR%20Logo-new.png"
                    }
                },
                "mainEntityOfPage": {
                    "@type": "WebPage",
                    "@id": "https://audiosciencereview.com/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/"
                }
            }
        </script>

        <h1>Headphones and the Harman target curve</h1>

        <ul>
            <li>
                <a href="/forum/index.php?members/spittiz.6175/" itemprop="name">spittiz</a>
            </li>
            <li>
                <a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/">
                    <time datetime="2020-11-27T20:59:17+0000" title="Nov 27, 2020 at 8:59 PM">Nov 27, 2020</time>
                </a>
            </li>
        </ul>

        <nav>
            <ul>
                <li><a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/">1</a></li>
                […]
                <li><a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/page-18">18</a></li>
            </ul>
        </nav>

        <!-- Topic opening post -->
        <article id="js-post-582475">
            <section itemscope itemtype="https://schema.org/Person"></section>
            <header>
                <time datetime="2020-11-27T20:59:17+0000" title="Nov 27, 2020 at 8:59 PM" itemprop="datePublished">Nov 27, 2020</time>
            </header>
            <article>
                [post text]
            </article>
        </article>

        <!-- First answer -->
        <article id="js-post-582631">
            <section itemscope itemtype="https://schema.org/Person">[…]</section>
            <header>
                <time datetime="2020-11-28T01:50:59+0000" title="Nov 28, 2020 at 1:50 AM" itemprop="datePublished">Nov 28, 2020</time>
            </header>
            <article>
                <blockquote>
                    [quote text]
                </blockquote>
                [post text]
            </article>
            <time datetime="2020-11-28T02:03:35+0000" title="Nov 28, 2020 at 2:03 AM" itemprop="dateModified">Nov 28, 2020</time>
        </article>

        <article id="js-post-582634">[…]</article>

        […]

        <article id="js-post-584460">[…]</article>

        <article id="js-post-584505">[…]</article>
    </body>
</html>
Reduced HTML source (click here to open)
<!DOCTYPE html>
<html>
    <head>
        <title>Headphones and the Harman target curve | Audio Science Review (ASR) Forum</title>

        <meta name="description" content="I recently started dabbling with EQ&#039;ing my headphones (APO+Peace). I&#039;ve been going back and fort with this with two of my headphones, the Hifiman Ananda and..." />
        <meta property="og:description" content="I recently started dabbling with EQ&#039;ing my headphones (APO+Peace). I&#039;ve been going back and fort with this with two of my headphones, the Hifiman Ananda and the Denon AH-D7200. With both of them, I think the Harman target profile sounds like shit. Especially with the Ananda it&#039;s like throwing a..." />
        <meta property="twitter:description" content="I recently started dabbling with EQ&#039;ing my headphones (APO+Peace). I&#039;ve been going back and fort with this with two of my headphones, the Hifiman Ananda and the Denon AH-D7200. With both of them..." />

        <meta property="og:url" content="https://audiosciencereview.com/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/" />
        <link rel="canonical" href="https://audiosciencereview.com/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/" />

        <link rel="next" href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/page-2" />

        <meta property="og:site_name" content="Audio Science Review (ASR) Forum" />
        <meta property="og:type" content="website" />
        <meta property="twitter:card" content="summary" />

        <meta property="og:title" content="Headphones and the Harman target curve" />
        <meta property="twitter:title" content="Headphones and the Harman target curve" />

        <meta property="og:image" content="https://www.audiosciencereview.com/forum%20resources/Two-line%20ASR%20Logo-new.png" />
        <meta property="twitter:image" content="https://www.audiosciencereview.com/forum%20resources/Two-line%20ASR%20Logo-new.png" />

    </head>
    <body>
        <script type="application/ld+json">
            {
                "@context": "https://schema.org",
                "@type": "DiscussionForumPosting",
                "@id": "https://audiosciencereview.com/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/",
                "headline": "Headphones and the Harman target curve",
                "articleBody": "I recently started dabbling with EQ'ing my headphones (APO+Peace). I've been going back and fort with this with two of my headphones, the Hifiman Ananda and the Denon AH-D7200. With both of them, I think the Harman target profile sounds like...",
                "articleSection": "Headphones and Headphone Amplifier Reviews",
                "author": {
                    "@type": "Person",
                    "name": "spittiz"
                },
                "datePublished": "2020-11-27T20:59:17+00:00",
                "dateModified": "2022-11-14T12:49:45+00:00",
                "image": "https://audiosciencereview.com/forum/data/avatars/h/6/6175.jpg?1606506178",
                "interactionStatistic": {
                    "@type": "InteractionCounter",
                    "interactionType": "https://schema.org/ReplyAction",
                    "userInteractionCount": 353
                },
                "publisher": {
                    "@type": "Organization",
                    "name": "Audio Science Review (ASR) Forum",
                    "logo": {
                        "@type": "ImageObject",
                        "url": "https://www.audiosciencereview.com/forum%20resources/Two-line%20ASR%20Logo-new.png"
                    }
                },
                "mainEntityOfPage": {
                    "@type": "WebPage",
                    "@id": "https://audiosciencereview.com/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/"
                }
            }
        </script>

        <header>
            […]
        </header>

        <nav>
            <ul itemscope itemtype="https://schema.org/BreadcrumbList">
                <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
                    <a href="/forum/index.php" itemprop="item">
                    <span itemprop="name">Forums</span>
                    </a>
                    <meta itemprop="position" content="1" />
                </li>
                <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
                    <a href="/forum/index.php#audio-audio-audio.40" itemprop="item">
                    <span itemprop="name">Audio, Audio, Audio!</span>
                    </a>
                    <meta itemprop="position" content="2" />
                </li>
                <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
                    <a href="/forum/index.php?forums/headphones-and-headphone-amplifier-reviews.57/" itemprop="item">
                    <span itemprop="name">Headphones and Headphone Amplifier Reviews</span>
                    </a>
                    <meta itemprop="position" content="3" />
                </li>
            </ul>
        </nav>

        <h1>Headphones and the Harman target curve</h1>

        <ul>
            <li>
                <a href="/forum/index.php?members/spittiz.6175/" itemprop="name">spittiz</a>
            </li>
            <li>
                <a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/"><time datetime="2020-11-27T20:59:17+0000" title="Nov 27, 2020 at 8:59 PM">Nov 27, 2020</time></a>
            </li>
        </ul>

        <nav>
            <ul>
                <li><a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/">1</a></li>
                <li><a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/page-2">2</a></li>
                <li><a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/page-3">3</a></li>
                <li><a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/page-18">18</a></li>
            </ul>
        </nav>

        <article id="js-post-582475">
            <section itemscope itemtype="https://schema.org/Person">
                <a href="/forum/index.php?members/spittiz.6175/">
                <img src="/forum/data/avatars/m/6/6175.jpg?1606506178" alt="spittiz" width="96" height="96" itemprop="image" /> 
                </a>
                <h4><a href="/forum/index.php?members/spittiz.6175/" itemprop="name">spittiz</a></h4>
                <h5 itemprop="jobTitle">Member</h5>
                <dl>
                    <dt>Joined</dt>
                    <dd>Feb 7, 2019</dd>
                </dl>
                <dl>
                    <dt>Messages</dt>
                    <dd>14</dd>
                </dl>
                <dl>
                    <dt>Likes</dt>
                    <dd>12</dd>
                </dl>
            </section>
            <header>
                <ul>
                    <li>
                        <a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/post-582475" rel="nofollow">
                        <time datetime="2020-11-27T20:59:17+0000" title="Nov 27, 2020 at 8:59 PM" itemprop="datePublished">Nov 27, 2020</time>
                        </a>
                    </li>
                </ul>
                <ul>
                    <li>
                        <a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/post-582475"
                            rel="nofollow">
                        </a>
                    </li>
                    <li>
                        <a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/post-582475" rel="nofollow">
                        #1
                        </a>
                    </li>
                </ul>
            </header>
            <article>
                [post text]
            </article>
            <footer>
                <span>Reactions:</span>
                <a href="/forum/index.php?posts/582475/reactions" rel="nofollow"><bdi>tmtomh</bdi>, <bdi>yigitboy</bdi>, <bdi>Frank Dernie</bdi> and 2 others</a>
            </footer>
        </article>

        <article id="js-post-582631">
            <section itemscope itemtype="https://schema.org/Person">
                <a href="/forum/index.php?members/dreyfus.6150/">
                <img src="/forum/data/avatars/m/6/6150.jpg?1601328956" alt="Dreyfus" width="96" height="96" itemprop="image" /> 
                </a>
                <h4><a href="/forum/index.php?members/dreyfus.6150/" itemprop="name">Dreyfus</a></h4>
                <h5 itemprop="jobTitle">Active Member</h5>
                <dl>
                    <dt>Joined</dt>
                    <dd>Feb 7, 2019</dd>
                </dl>
                <dl>
                    <dt>Messages</dt>
                    <dd>234</dd>
                </dl>
                <dl>
                    <dt>Likes</dt>
                    <dd>287</dd>
                </dl>
                <dl>
                    <dt>Location</dt>
                    <dd>
                        <a href="/forum/index.php?misc/location-info&amp;location=Germany" rel="nofollow noreferrer" target="_blank">Germany</a>
                    </dd>
                </dl>
            </section>
            <header>
                <ul>
                    <li>
                        <a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/post-582631" rel="nofollow">
                        <time datetime="2020-11-28T01:50:59+0000" title="Nov 28, 2020 at 1:50 AM" itemprop="datePublished">Nov 28, 2020</time>
                        </a>
                    </li>
                </ul>
                <ul>
                    <li>
                        <a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/post-582631"
                            rel="nofollow">
                        </a>
                    </li>
                    <li>
                        <a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/post-582631" rel="nofollow">
                        #2
                        </a>
                    </li>
                </ul>
            </header>
            <article>
                <blockquote>
                    <a href="/forum/index.php?goto/post&amp;id=582475"
                        rel="nofollow">spittiz said:</a>
                    [quote text]
                </blockquote>
                [post text]
                <blockquote>
                    <a href="/forum/index.php?goto/post&amp;id=582475"
                        rel="nofollow">spittiz said:</a>
                    [quote text]
                </blockquote>
                [post text]
            </article>
            <time datetime="2020-11-28T02:03:35+0000" title="Nov 28, 2020 at 2:03 AM" itemprop="dateModified">Nov 28, 2020</time>
            <footer>
                <span>Reactions:</span>
                <a href="/forum/index.php?posts/582631/reactions" rel="nofollow"><bdi>Presently42</bdi>, <bdi>Ilkless</bdi>, <bdi>oivavoi</bdi> and 3 others</a>
            </footer>
        </article>

        <article id="js-post-582634">[…]</article>
        […]
        <article id="js-post-584460">[…]</article>

        <article id="js-post-584505">
            <section itemscope itemtype="https://schema.org/Person">
                <a href="/forum/index.php?members/feelas.22359/">
                <img src="/forum/data/avatars/m/22/22359.jpg?1612728223" alt="Feelas" width="96" height="96" itemprop="image" /> 
                </a>
                <h4><a href="/forum/index.php?members/feelas.22359/" itemprop="name">Feelas</a></h4>
                <h5 itemprop="jobTitle">Senior Member</h5>
                <dl>
                    <dt>Joined</dt>
                    <dd>Nov 20, 2020</dd>
                </dl>
                <dl>
                    <dt>Messages</dt>
                    <dd>376</dd>
                </dl>
                <dl>
                    <dt>Likes</dt>
                    <dd>307</dd>
                </dl>
            </section>
            <header>
                <ul>
                    <li>
                        <a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/post-584505" rel="nofollow">
                        <time datetime="2020-11-30T08:37:59+0000" title="Nov 30, 2020 at 8:37 AM" itemprop="datePublished">Nov 30, 2020</time>
                        </a>
                    </li>
                </ul>
                <ul>
                    <li>
                        <a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/post-584505"
                            rel="nofollow">
                        </a>
                    </li>
                    <li>
                        <a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/post-584505" rel="nofollow">
                        #20
                        </a>
                    </li>
                </ul>
            </header>
            <article>
                <blockquote>
                    <a href="/forum/index.php?goto/post&amp;id=584460"
                        rel="nofollow">Senior NEET Engineer said:</a>
                    [quoted text]
                </blockquote>
                [post text]
            </article>
            <footer></footer>
        </article>

        <nav>
            <ul>
                <li><a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/">1</a></li>
                <li><a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/page-2">2</a></li>
                <li><a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/page-3">3</a></li>
                <li><a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/page-18">18</a></li>
            </ul>
            <a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/page-2">Next</a>
            <a href="/forum/index.php?threads/headphones-and-the-harman-target-curve.17914/page-18" title="Last"><span>Last</span></a>
        </nav>

        <div>
            <h3>Similar threads</h3>
            <div>
                <div>
                    […]
                    <div>
                        <a href="/forum/index.php?threads/usound-target-curve-for-iems.35086/">USound target curve for IEMs</a>
                        <ul>[…]</ul>
                    </div>
                    […]
                </div>
                <div>
                    […]
                    <div>
                        <a href="/forum/index.php?threads/my-hrtf-target-vs-harman-target.36255/">My HRTF Target vs Harman Target</a>
                        <ul>[…]</ul>
                    </div>
                    […]
                </div>
                <div>
                    <a href="/forum/index.php?members/dazerdoreal.52898/">
                    <span role="img">D</span> 
                    </a>
                    <div>
                        <a href="/forum/index.php?threads/the-iem-harman-target-2019-sounds-off-to-me-is-it-just-me.38113/">The IEM Harman Target 2019 sounds &quot;off&quot; to me. Is it just me?</a>
                        <ul>
                            <li><a href="/forum/index.php?members/dazerdoreal.52898/" itemprop="name">Dazerdoreal</a></li>
                            <li><a href="/forum/index.php?threads/the-iem-harman-target-2019-sounds-off-to-me-is-it-just-me.38113/" rel="nofollow"><time datetime="2022-10-08T17:06:16+0100" title="Oct 8, 2022 at 5:06 PM">Oct 8, 2022</time></a></li>
                            <li><a href="/forum/index.php?forums/headphone-iem-reviews-discussions.58/">Headphone &amp; IEM Reviews &amp; Discussions</a></li>
                        </ul>
                        <span>
                        <a href="/forum/index.php?threads/the-iem-harman-target-2019-sounds-off-to-me-is-it-just-me.38113/page-2">2</a>
                        <a href="/forum/index.php?threads/the-iem-harman-target-2019-sounds-off-to-me-is-it-just-me.38113/page-3">3</a>
                        </span>
                    </div>
                    <div title="First message reaction score: 1">
                        <dl>
                            <dt>Replies</dt>
                            <dd>52</dd>
                        </dl>
                        <dl>
                            <dt>Views</dt>
                            <dd>4K</dd>
                        </dl>
                    </div>
                    <div>
                        <a href="/forum/index.php?threads/the-iem-harman-target-2019-sounds-off-to-me-is-it-just-me.38113/latest" rel="nofollow"><time datetime="2022-11-16T05:05:28+0000" title="Nov 16, 2022 at 5:05 AM">Today at 5:05 AM</time></a>
                        <a href="/forum/index.php?members/aperiodic.7528/" itemprop="name">Aperiodic</a>
                    </div>
                    <a href="/forum/index.php?members/aperiodic.7528/">
                    <span role="img">A</span> 
                    </a>
                </div>
                <div>
                    […]
                    <div>
                        <a href="/forum/index.php?threads/sloped-neutral-target-curves-for-headphones-and-iems.36532/">&quot;Sloped neutral&quot; target curves for headphones and IEMs?</a>
                        <ul>[…]</ul>
                    </div>
                    […]
                </div>
                <div>
                    […]
                    <div>
                        <a href="/forum/index.php?threads/looking-for-bt-anc-over-ear-with-hardware-eq.36328/">Looking for BT/ANC over ear with &#039;hardware EQ&#039;</a>
                        <ul>[…]</ul>
                    </div>
                    […]
                </div>
            </div>
        </div>

        <ul itemscope itemtype="https://schema.org/BreadcrumbList">
            <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
                <a href="/forum/index.php" itemprop="item">
                <span itemprop="name">Forums</span>
                </a>
                <meta itemprop="position" content="1" />
            </li>
            <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
                <a href="/forum/index.php#audio-audio-audio.40" itemprop="item">
                <span itemprop="name">Audio, Audio, Audio!</span>
                </a>
                <meta itemprop="position" content="2" />
            </li>
            <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
                <a href="/forum/index.php?forums/headphones-and-headphone-amplifier-reviews.57/" itemprop="item">
                <span itemprop="name">Headphones and Headphone Amplifier Reviews</span>
                </a>
                <meta itemprop="position" content="3" />
            </li>
        </ul>

        <footer>
            […]
        </footer>
    </body>
</html>
1 Like