Skip to content

JavaScript SEO

Entry #225 / 700 · Chapter 5 · 5.1 Crawl control, indexing and status codes
In one sentence

Making sure content a browser assembles with JavaScript is also available to a crawler.

Analogy Mental model

Describing a painting to someone who cannot see it. Saying there is a painting tells them nothing; the description has to carry what is on the canvas.

In practice What you actually do

Render the page the way the crawler does and inspect what comes back. Server-side rendering, static generation or prerendering all solve it, and hydration can add interactivity on top. The rule is simple: if it must be indexed, it must be in the HTML.

Where people get burned Pitfalls

Client-only rendering is a queue rather than a failure, and the queue is long. Content that exists only after two API calls can wait weeks, and by then the launch it supported is over.

This entry was written in English from the Chinese original, not machine-translated. Read the Chinese version →