Closed HarishReddyCH closed 9 months ago
the same issue
home they fix this problem soon
Any update on this?
the same issue
I believe the problem is related to the use of render mode "SPA". Google bot, Social media preview and others are loading firstly bare bone "index.html" file which does not statically contains all your dynamical changes on client side.
The approach that you are looking for is eighter "SSR" (Server Side Rendering) or "SSG" (Static-Site Generator).
Great explanation of these modes you can find here and I believe the vite-plugin-ssr will suit your project.
To conclude, in the documentation it mentioned that you have to use server-side rendering in order to have appropriate work of the application, because the tags must be already in the index.html file before a client will receive all necessary files (index.html, main.bundle.xxx.js, image.png, and etc).
(Please note that this is explanation for those who have not been using other render methods before)
The same issue
I know the problem of crawlers not executing JS.
I looked into multiple solution like combining react-snap and react-helmet but that only works at build time.
Migrating to SSR like NextJS is not an option for me.
Any suggestions, other approaches are appreciated.
Thanks
the HTML source of the page needs to contain the tags
URL Preview is not working when adding meta tags using Helmet
Please check this to know about URL/Link Preview
CODE: `
Expected output: Meta tags data which I given in Helmet should be shown in link preview.