Site: https://graceful-pasca-92362a.netlify.app/
=> Domain: https://www.gideonking.com/
I have just deployed a Vue 3 app which has dynamic routes, so I am using useHead to supply meta tags appropriate to each page. I understand that the crawlers from the likes of facebook and linkedin do not trigger javascript to load, so I enabled pre-rendering on netlify.
When I try to share a site link on LinkedIn, it does not generate a preview, and when I use their post inspector tool it says it can’t load the URL.
My test URL is https://www.gideonking.com/gallery/10cf851e-db78-45ff-a953-0ac91930fb1b
and you can see the results of trying to debug the issue on their tool at https://www.linkedin.com/post-inspector/inspect/https:%2F%2Fwww.gideonking.com%2Fgallery%2F10cf851e-db78-45ff-a953-0ac91930fb1b
Similarly, it fails on facebook’s tool https://developers.facebook.com/tools/debug/?q=https%3A%2F%2Fwww.gideonking.com%2Fgallery%2F10cf851e-db78-45ff-a953-0ac91930fb1b
However, if I use curl to fetch the URL with the user agent specified like this:
curl -A LinkedInBot https://www.gideonking.com/gallery/10cf851e-db78-45ff-a953-0ac91930fb1b
It returns the correct information, including the dynamically updated headers.
Similarly, if I use Facebook’s recommended command to fetch it, it again returns the correct results:
curl -v --compressed -H "Range: bytes=0-524288" -H "Connection: close" -A "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)" "https://www.gideonking.com/gallery/10cf851e-db78-45ff-a953-0ac91930fb1b"
In this particular case, the correct og:title is Stampede. If I fetch without specifying a user agent, it just gives me the contents of my index.html, without loading any Javascript, which is expected.
At one stage, Facebook was showing a 502 error when it was trying to scrape the page, but now it’s just hanging when trying to access it.
I have tried installing the netlify fork of the prerender code locally and running my app through that and it worked fine in that scenario too. I have set up a robots.txt to make sure that everything is allowed.
Is there something else I need to do to get this up and running?