What is the correct way to generate SEO metadata in t3 app
I have been using <Head> tag in index.tsx file to add all my page meta tags, but it turns out it cannot show this metadata in search engines.
So what is the correct way to add the meta tags in t3 app.
9 Replies
you can add it in _app.js
if you want to be it in all your routes.
I only have one index route in my app. Do I still need it in _app.js?
The data in my index.tsx seems to be applied or rendered only when opened the site on browser. search engines, crawlers are not able to read my metadata.
No, if you have only index route you dont have to use _app.js.
I have been using <Head> tag in index.tsx file to add all my page meta tags, but it turnsi misread that part Head component is supposed to add metatags tho could you please download one of the chrome extensions that check seo of your site "META SEO inspector" as an example
Thanks for the extension but I think this extension is only reading the site after it is rendered.
As per the extension I have all the tags but if I post the link in any app like discord or slack they dont recognise the app metadata.
Here is my app URL
https://nimbleuikit-website.vercel.app/
Here is my Head tag code. I am frankly tired of this SEO part🥹
https://github.com/JohnVersus/nimbleuikit/blob/350ef6182686d5ff880aa3c9cdb311223ae5cefb/apps/website/src/pages/index.tsx#L57C2-L129C14
@johnversusthe only reasone that i see as junior developer and not very good programmer is that your site has not robot.txt and site map
this is my site and it doesnt have open graph meta tags
https://checkapi.app
Check API | Request Tool | Analyze Server Response Data
Check API - Website to check the data from the API response. The site will help control and test your back-end
but it has robot.txt and sitemap. Also i have added my site in google console
but honesly it may not be an issue
it is not supposed to be an issue
Thanks for the suggestion. I tried adding robots and sitemap now. it is still dead, no change.
https://nimbleuikit-website.vercel.app/
Do you know if it is possible to use Metadata export feature from next 14 app folder in t3 app?
I tried using export metadata in a different project. that works like magic.