What is

JavaScript SEO?

How to make sure search engines and AI crawlers see the content on websites built with JavaScript.

What is JavaScript SEO?

JavaScript SEO is the part of technical SEO that deals with websites where content, links or metadata are created or loaded with JavaScript. The goal is for search engines and AI crawlers to be able to crawl, render and index the content as well as if it were ready in the HTML from the server.

Modern websites are often built with frameworks such as React, Vue, Next.js and Nuxt. They deliver great user experiences, but can cause problems for search engines if set up incorrectly. Typically the page looks perfect in the browser, while the source code the bot receives is almost empty.

The problem is often discovered late, usually only when traffic drops after a new website has been launched. That is why SEO should be involved when developers choose the architecture, not just in the final testing.

How Google handles JavaScript

Google crawls the HTML first and then queues the page for rendering, where an up-to-date version of Chromium runs the JavaScript and sees the finished page. Only then does content that only exists after rendering become available for indexing. Rendering requires resources, and it can take time before everything is in place.

Many other bots are simpler. Several AI crawlers and some search engines run little or no JavaScript, and therefore only see what is in the original HTML. Content that only exists after rendering therefore risks being invisible in AI search.

Rendering methods

  • Client-side rendering (CSR): the browser builds the page with JavaScript. The most demanding for search engines.

  • Server-side rendering (SSR): the server sends finished HTML, and JavaScript takes over in the browser afterwards.

  • Static site generation (SSG): pages are built in advance and delivered as finished files. Fast and robust.

  • Hybrid: a mix, where each page type gets the method that suits it best.

For pages that need to rank, SSR or SSG is usually the safest choice. That is also why a headless CMS should be combined with a frontend that renders on the server.

Common mistakes

  • Links that only work with click events, without real <a href> elements.

  • Content that only loads when the user scrolls or clicks.

  • Title, meta description and canonical set with JavaScript and missing from the HTML.

  • JavaScript and CSS files blocked in robots.txt.

  • Error pages that respond with status code 200 instead of 404.

Test with URL Inspection in Google Search Console and compare the source code with the rendered page. Read more about how we work with technical SEO.

Related terms

  • Crawling: the crawling that JavaScript can make slower or incomplete.

  • Indexing: content that isn't rendered doesn't get indexed.

  • Headless CMS: an architecture where JavaScript SEO is particularly important.

  • Technical SEO: the discipline JavaScript SEO is part of.

  • See all the terms in the glossary.

Is your website built with JavaScript?

We check what search engines and AI crawlers actually see, and help developers with the right rendering.