Search engines see the same page as visitors

The site is an Angular application, but crawlers get a server-rendered page with the same title, description, text and structured data, and pages that are switched off answer 404.

The problem

A single-page application sends an almost empty HTML page and fills it with JavaScript. Some crawlers and most link previews (LinkedIn, Slack, messengers) never run that JavaScript, so they see no title, no text and no image.

How dok.sh solves it

The use cases page as a visitor sees it

The result

A link shared on LinkedIn shows the right title and picture, and search engines index the same text people read.

Technologies

SEO, nginx, Spring Boot, JSON-LD