You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's a div with a span child, with 0 children elements, but 5 nodes as children. There's a subtle difference between elements and nodes. Here's a handy video.
The 5 nodes are, text, comment, text, comment, text. The same is happening to your title element.
Well... in either case the bot/crawler, or whatever SEO entity, has to be arrive with the query in the URL already. Since you are using GSSP, in both cases (right?), for any first request the entire HTML string will be generated server side, so the bot/crawler should parse a correct title.
If you visit the site, with query in the URL, and then right click to "View Page Source", do you see the correct title there? If so, then you are good.
The warning is because when you do:
React renders:
That's a
div
with aspan
child, with 0 children elements, but 5 nodes as children. There's a subtle difference between elements and nodes. Here's a handy video.The 5 nodes are,
text
,comment
,text
,comment
,text
. The same is happening to yourtitle
element.Do this instead:
Which outputs:
Now the
span
has only one,text
, child node.SEO Merits
Well... in either case the bot/crawler, or whatever SEO entity, has to be arrive with the query in the URL already. Since you are using
GSSP
, in both cases (right?), for any first request the entire HTML string will be generated server side, so the bot/crawler should parse a correct title.If you visit the site, with query in the URL, and then right click to "View Page Source", do you see the correct title there? If so, then you are good.
Originally posted by @icyJoseph in vercel/next.js#38256 (comment)
The text was updated successfully, but these errors were encountered: