next.js
7f57d4b1 - send initialCanonicalUrl in array format to fix crawler issues (#69370)

Commit
1 year ago
send initialCanonicalUrl in array format to fix crawler issues (#69370) The initial RSC payload currently provides the `initialCanonicalUrl` value to initialize the router state during the SSR render. However as noted in #53274, it seems crawlers like Googlebot will crawl anything URL-like that it finds in the document, regardless of whether or not it's actually rendered as a link somewhere (which this isn't). This splits the `initialCanonicalUrl` value into parts and then joins it when it's ready to be consumed. That way when it's embedded in the document, it's not in a path-like format. Fixes #53274 Closes NDX-243
Author
Parents
Loading