#Next.js 14 SEO

7 messages ยท Page 1 of 1 (latest)

pale elbowBOT
#

๐Ÿ”Ž This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

๐Ÿ•ต๏ธ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

โœ… You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

sly stag
#

<Head> doesn't work in the app router, it continues to work in the pages router

solution:

  • use the metadata API, or
  • just remove <Head> and use meta tags directly in the page
alpine dagger
# sly stag <Head> doesn't work in the app router, it continues to work in the pages router ...

OK thanks, Will removing <Head> impact on performance?
And how can I use metadata API? can You can please give me an example like how can I moved below tags to metadata API.

        prefix="og: https://ogp.me/ns#"
        property="og:description"
        content={seo?.description || ''}
      />
      <meta
        prefix="og: https://ogp.me/ns#"
        property="og:image"
        content={seo?.image || ''}
      />
      <meta name="msvalidate.01" content="" />
      <meta name="twitter:card" content="summary" />```
sly stag
alpine dagger
#

Hello @sly stag , As you can see in above attached file I'm getting seo data as a props and metadata API applied outside the component so how can I get that seo props inside metadata constant.

sly stag
alpine dagger