# Google structured data for forums and profile pages

**URL:** https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762
**Category:** Feature
**Tags:** seo
**Created:** [November 27, 2023, 7:33pm UTC](https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762 "2023-11-27T19:33:43Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![dfabulich](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dfabulich/32/108716_2.png) [@dfabulich](https://meta.discourse.org/u/dfabulich)
#### Post date: [November 27, 2023, 7:33pm UTC](https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762/1 "2023-11-27T19:33:43Z")

</div>

Google just announced a new way for forum sites to tag their content as “structured data” for SEO purposes.

[https://developers.google.com/search/blog/2023/11/discussion-and-profile-markup](https://developers.google.com/search/blog/2023/11/discussion-and-profile-markup)

> # New in structured data: discussion forum and profile page markup
> 
> Monday, November 27, 2023
> 
> Today we’re announcing support for [profile page](https://developers.google.com/search/docs/appearance/structured-data/profile-page) and [discussion forum](https://developers.google.com/search/docs/appearance/structured-data/discussion-forum) structured data for use in Google Search, including new reports in Search Console. This markup works with Google Search features that are designed to show first-person perspectives from social media platforms, forums, and other communities. Implementing this structured data will help ensure what Search shows in these features is as accurate and complete as possible.

It would be great if Discourse were to add support for these. (They support JSON-LD and microdata.)

---

<div class="post-metadata">

### Author: ![4r33](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/4r33/32/446546_2.png) [@4r33](https://meta.discourse.org/u/4r33)
#### Post date: [November 27, 2023, 7:38pm UTC](https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762/2 "2023-11-27T19:38:11Z")

</div>

That’s cool (this is more confusing than the forums)

---

<div class="post-metadata">

### Author: ![Tiago\_santos](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tiago_santos/32/249753_2.png) [@Tiago\_santos](https://meta.discourse.org/u/Tiago_santos)
#### Post date: [November 27, 2023, 8:46pm UTC](https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762/3 "2023-11-27T20:46:21Z")

</div>

@Falco Given this update where Google identifies members, wouldn’t it be ideal to have member profiles without noindex in the discourse?

---

<div class="post-metadata">

### Author: ![Soenneker](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@Soenneker](https://meta.discourse.org/u/Soenneker)
#### Post date: [November 28, 2023, 12:39am UTC](https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762/4 "2023-11-28T00:39:22Z")

</div>

Discourse definitely should support this!

---

<div class="post-metadata">

### Author: ![abrambailey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/abrambailey/32/119786_2.png) [@abrambailey](https://meta.discourse.org/u/abrambailey)
#### Post date: [November 28, 2023, 5:45pm UTC](https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762/5 "2023-11-28T17:45:06Z")

</div>

I would also love to see this one!

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [November 28, 2023, 5:53pm UTC](https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762/6 "2023-11-28T17:53:26Z")

</div>

> [@dfabulich](#):
>
> [discussion forum](https://developers.google.com/search/docs/appearance/structured-data/discussion-forum) structured data

Ain’t we[using that already for many years](https://meta.discourse.org/t/google-structured-data-invalid-article-schema/57037/11)?

> <https://github.com/discourse/discourse/blob/ee5bdb343683f0cc2cfc44528cc18d1d77a81154/app/views/topics/show.html.erb#L37>

Is the new thing here only the profile part?

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [November 28, 2023, 6:30pm UTC](https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762/7 "2023-11-28T18:30:38Z")

</div>

Kind of yes. It has tailored a bit better suitable for social medias, I reckon.

---

<div class="post-metadata">

### Author: ![dfabulich](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dfabulich/32/108716_2.png) [@dfabulich](https://meta.discourse.org/u/dfabulich)
#### Post date: [November 28, 2023, 10:07pm UTC](https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762/8 "2023-11-28T22:07:10Z")

</div>

Y’all can check your Google Search Console report, but when I go to [https://search.google.com/search-console/r/discussion-forum](https://search.google.com/search-console/r/discussion-forum) and check my forum, I see this:

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/7/0/47037d2d88f716b2c699337f775c99244ddca52f.png)

> Why items are invalid:
> 
> - Either “text”, “image”, or “video” should be specified
> - Missing field “datePublished”
> - Missing field “author”
> 
> Improve item appearance
> 
> - Missing field “url”
> - Missing field “text” (in “comment”)

So there does appear to be more work to do here.

---

<div class="post-metadata">

### Author: ![rrit](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rrit](https://meta.discourse.org/u/rrit)
#### Post date: [December 17, 2023, 4:21pm UTC](https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762/9 "2023-12-17T16:21:24Z")

</div>

#### 1. `itemprop="text"`

Just always add `itemprop="text"` here, as `articleBody` is not specified (anymore?) for [DiscussionForumPosting](https://developers.google.com/search/docs/appearance/structured-data/discussion-forum?hl=en).

> <https://github.com/discourse/discourse/blob/6f3c498b83169928aba316246ddc9b5d584c5a0d/app/views/topics/show.html.erb#L87-L89>

#### 2. `mainEntityOfPage`

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

> <https://github.com/discourse/discourse/blob/6f3c498b83169928aba316246ddc9b5d584c5a0d/app/views/topics/show.html.erb#L68-L70>

#### 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.

> <https://github.com/discourse/discourse/blob/6f3c498b83169928aba316246ddc9b5d584c5a0d/app/views/topics/show.html.erb#L37-L38>

```plaintext
<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](https://developers.google.com/search/docs/appearance/structured-data/discussion-forum?hl=en#dfp)

> **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.

---

<div class="post-metadata">

### Author: ![rrit](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rrit](https://meta.discourse.org/u/rrit)
#### Post date: [December 17, 2023, 4:45pm UTC](https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762/10 "2023-12-17T16:45:25Z")

</div>

> [@dfabulich](#):
>
> […] when I […] check my forum, I see this:
> 
> > Why items are invalid:
> > 
> > - Either “text”, “image”, or “video” should be specified
> > - Missing field “datePublished”
> > - Missing field “author”
> > 
> > Improve item appearance
> > 
> > - Missing field “url”
> > - Missing field “text” (in “comment”)

Which version of Discourse are you running?

Distinct marking of `DiscussionForumPosting` and `Comment` was implemented with Discourse v3.1.0 released August ’ 23.

[https://github.com/discourse/discourse/commit/8405ec2831322314b8145e7908f025ba6dee4881?diff=split&w=1](https://github.com/discourse/discourse/commit/8405ec2831322314b8145e7908f025ba6dee4881?diff=split&w=1)

---

<div class="post-metadata">

### Author: ![dfabulich](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dfabulich/32/108716_2.png) [@dfabulich](https://meta.discourse.org/u/dfabulich)
#### Post date: [December 17, 2023, 7:21pm UTC](https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762/11 "2023-12-17T19:21:15Z")

</div>

I’m running the CDCK hosted version, always latest. The Discourse team can repro this by checking Google Search Console for [meta.discourse.org](http://meta.discourse.org).

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [December 17, 2023, 10:55pm UTC](https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762/12 "2023-12-17T22:55:33Z")

</div>

I think @techAPJ is looking into a related request here:

> [@Discussion Forum Schema improvements](https://meta.discourse.org/t/missing-field-url-discussion-forum-schema/287347/5):
>
> As @Arkshine explained above this is not a bug but rather a suggestion from Google to add optional field in the schema. I’ll look into it.

---

<div class="post-metadata">

### Author: ![Soenneker](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@Soenneker](https://meta.discourse.org/u/Soenneker)
#### Post date: [January 1, 2024, 4:41am UTC](https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762/13 "2024-01-01T04:41:24Z")

</div>

Thanks all. I’m hoping this gets some attention at the start of the new year here. Very interested in optimizing everything as possible for Google SEO; let me know if I can help.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [January 1, 2024, 8:27am UTC](https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762/14 "2024-01-01T08:27:08Z")

</div>

Let’s keep the discussion happening in [this topic](https://meta.discourse.org/t/missing-field-url-discussion-forum-schema/287347/19) where we’re trying to figure out a solution for all the structured data related issues.

> [@Discussion Forum Schema improvements](https://meta.discourse.org/t/missing-field-url-discussion-forum-schema/287347/19):
>
> Yes, we’re doing that now per the [recent commit](https://github.com/discourse/discourse/commit/d9ca6c3bb90c15d32b3f2ece1709522be65fb690) but even after adding that we’re missing some required fields (author, datePublished, text) for subsequent pages (?page=2). Great catch! Fixed in this PR: Oh yeah. This was also confirmed by @rrlevering here: So I guess we’ll have to improve microdata schema while making sure we do not end up duplicating content on subsequent pages.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [January 1, 2024, 8:27am UTC](https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762/15 "2024-01-01T08:27:20Z")

</div>


