nextjs - 💡(How to fix) Fix App Router — JSON-LD duplicated in RSC payload (__next_f), Google Rich Results reports multiple AggregateRating

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  1. Open Google Rich Results Test — shows "multiple aggregate ratings" error

Fix Action

Fix / Workaround

Code Example

Operating System:
  Platform: linux
  Arch: x64

Relevant Packages:
  next: 16.1.6
  react: 19.2.4
  react-dom: 19.2.4

Hosting: Vercel (production)
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://www.flowerstheory.com/hy/blog/what-do-different-flowers-mean

To Reproduce

  1. Create app/layout.tsx as a Server Component with a native <script type="application/ld+json"> containing aggregateRating in <head>
  2. Deploy to Vercel (or run next build && next start)
  3. Run: curl -sL "https://your-site.com" | grep -o 'aggregateRating' | wc -l
  4. Result is 2 — one in <script type="application/ld+json">, one escaped inside __next_f RSC payload
  5. Open Google Rich Results Test — shows "multiple aggregate ratings" error

Current vs. Expected behavior

Expected: native <script type="application/ld+json"> in layout.tsx appears once in HTML response.

Actual: aggregateRating appears twice — once in the proper <script> tag, and a second time embedded as escaped JSON inside self.__next_f.push(...) RSC payload. Google parses both and reports "Review has multiple aggregate ratings".

curl proof: grep -o '"aggregateRating"' page.html | wc -l → 1 (unescaped, in <script>) grep -o 'aggregateRating' page.html | wc -l → 2 (includes __next_f copy)

Provide environment information

Operating System:
  Platform: linux
  Arch: x64

Relevant Packages:
  next: 16.1.6
  react: 19.2.4
  react-dom: 19.2.4

Hosting: Vercel (production)

Which area(s) are affected? (Select all that apply)

Metadata

Which stage(s) are affected? (Select all that apply)

Vercel (Deployed)

Additional context

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING