I am using PhantomJS along with the Angular-seo package.
I managed to configure it to work with Facebook open-graph, but it seems that LinkedIn doesn't support the _escaped_fragment_
format, and just ignores the route after the hasbang requesting the index.html
page of the application instead of myapp.com/?_escaped_fragment_=client_side_path
.
What can I do in order to resolve it?.
Unfortunately the only way to resolve this is to check the user agent of the bot and send them the static version. According to this, the user agent of the LinkedIn bot is this:
LinkedInBot/1.0 (compatible; Mozilla/5.0; Jakarta Commons-HttpClient/3.1 +http://www.linkedin.com)
LinkedIn is not rendering JS and will only process the html static content of your SPA as of today.
As your application is highly dynamic, you could redirect LinkedIn crawler requests to an endpoint that will dynamically generate the required HTML for the LinkedIn crawler (e.g quick win: by using a CDN with a rules engine and serverless functions)
If you don’t need to feed the crawler with real-time information, you may consider using:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With