react-helmet icon indicating copy to clipboard operation
react-helmet copied to clipboard

React Helmet works fine on google but fails to load meta tags dynamically on Duck Duck Go Search Engine & Yahoo Search Engine

Open vaibhav-systango opened this issue 3 years ago • 5 comments

Do you want to request a feature or report a bug? This is a bug, is anyone having any solution or workarounds for same ?

What is the current behavior? All the meta tags load properly on Google Search, but fails on Duck Duck Go & Yahoo Search. I tried fixing this by adding the tags statically to index.html file that fixed the issue on duck duck go but then had an issue on google search so reverted the change. Any work around to fix this will be appreciated.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React and react-helmet. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:

What is the expected behavior? The meta tags should load fine for all search engines

Which versions of React and react-helmet, and which browser / OS are affected by this issue? Did this work in previous versions of React and/or react-helmet?

vaibhav-systango avatar Mar 15 '21 07:03 vaibhav-systango

That codesandbox is empty. You need to save it.

j-lee8 avatar Mar 17 '21 11:03 j-lee8

but it's just a regular react helmet usage that I've done it works fine on google search but doesn't shows proper meta on other search engines, it's probably because React Helmet with React JS is just doing meta on client side by running JS and not a SSR that's why ?

vaibhav-systango avatar Mar 18 '21 07:03 vaibhav-systango

@JavaJamie

vaibhav-systango avatar Mar 18 '21 07:03 vaibhav-systango

@vaibhav-systango That's correct. Google will sometimes run javascript while indexing pages, thus picking up your meta tags. Most other webcrawlers like Yahoo, Duck Duck Go, Facebook Share and Twitter Share don't run javascript though so you need to either server-side render your page or serve a prerendered page to them in order for them to read the correct meta.

jadengis avatar May 09 '21 18:05 jadengis

It is all about page indexing

sam1code avatar Sep 20 '21 06:09 sam1code