Skip to content

Glossary JavaScript SEO

What Is JavaScript SEO?

Definition

JavaScript SEO is about making a site built in JavaScript crawlable, renderable and indexable. Google executes the code, but in a later phase and with a queue in between.

A folded tent lying in the grass with its poles laid out beside it — beside the title JavaScript SEO
Everything is delivered; pitched, not yet
On this page 5
  1. What JavaScript SEO Is
  2. The Three Phases
  3. What Usually Goes Wrong
  4. How to Check It
  5. Common Mistakes
In brief

What Google's documentation says about the three phases and the render queue, why an element responding to clicks is not a link, and why a canonical inserted by code arrives too late.

A folded tent lying in the grass with its poles laid out beside it — beside the title JavaScript SEO
Everything is delivered; pitched, not yet

What JavaScript SEO Is

JavaScript SEO is the part of technical SEO concerned with making a site built in JavaScript able to pass through crawling, rendering and indexing. It is not a separate discipline: they are the same questions as always, asked about pages whose content is not in the HTML the server returns.

The practical difference is one of timing. On a classic page the arriving HTML already carries the text, the links and the tags. On one built in the browser that HTML can be nearly empty, and everything that matters appears afterwards, once the code runs.

This deserves saying without alarm: Google executes JavaScript, and does it well. The problem is not that it cannot, but that it happens at another moment and under its own conditions — and those conditions are what you need to know.

It is worth clearing up at the outset what it is not. Not a question of framework: the same framework can produce a perfectly crawlable site or an impossible one, depending on how delivery was built. Blaming the tool saves you from the important question, which is what arrives in the server's first response.

Nor is it a new problem. What has changed is the proportion: today almost every site runs some code in the browser, and the difference between a healthy one and one with problems is whether that code adds things or carries everything that matters.

The Three Phases

Google describes the process in three phases: crawling, rendering, indexing. Between the first and the second sits a queue, and that queue is the detail that changes everything else.

Its documentation is explicit on two points. First: every page answering with a 200 code and carrying no instruction against indexing enters the render queue. Second: it may stay there for a few seconds, but it can take longer. There is no fixed figure, which is why it is unwise to plan as though there were.

And there is a way back that hardly anyone draws: the links appearing during rendering are read again and enter the crawl queue and consume crawl budget. A link that exists only after the code runs is not invisible — it is simply discovered one phase later than one written in the HTML.

One condition in that description gets skimmed over and decides whole cases: the pages entering the queue are those answering with a 200 code. One returning an error, or a soft 404 disguised as a 200 with an empty template, gets different treatment before its code ever runs.

And a consequence that orders the rest of the entry: everything deciding whether a URL may move to the next phase is read BEFORE rendering. That is why the X-Robots-Tag, travelling in the response header, always arrives in time — and an instruction inserted by code may not.

What the code generates arrives one phase later than what is written in the HTML

What Usually Goes Wrong

The first fault, and the most expensive, is links that are not links. An element responding to a click through code works for the visitor and is a route for nobody else; Google wants a link with its address inside. That is exactly how a whole section ends up an orphan page.

The second is blocked resources. If robots.txt prevents the JavaScript files from loading, rendering happens anyway but without them, and the result is a thin content page in the index. A case that is quick to spot and gets overlooked for months.

And the third is tags that arrive late. A canonical or noindex inserted by code may not have the expected effect, because the decision to queue for rendering is taken earlier, from whatever was in the initial HTML. What matters belongs in the HTML the server delivers.

A fourth fault shows up in listings: pagination built only in code. If the next page button has no address of its own behind it, pagination does not exist for the crawler — and with it half the catalog disappears, however immaculate each product page may be.

And a fifth, harder to spot: content loaded on scroll or when a tab is opened. The same family as badly built lazy loading; if something appears only on interaction, it is not on the page Google renders, because nobody scrolls or clicks during that process.

How to Check It

The basic check compares two versions of the same page: the HTML the server delivers and the HTML after the code has run. If the first is nearly empty, you already know everything hangs on the second phase.

URL inspection in Search Console shows exactly what Google rendered, including the resources it could not load and the console errors. It is the only source speaking for Google rather than for a simulation; it belongs ahead of any third-party tool.

And one check hardly anyone runs: look in the initial HTML for the main links of the internal linking. If they are not there, discovery of the whole site depends on the render queue — and that shows first in new sections, which take longer to appear in the index.

A cheap method for the daily review: request the page the way a client without a browser would, and look in that response for the headline, a paragraph of body text and three navigation links. If you find them, that page does not depend on the second phase. A one-minute check that clears half of all suspicions.

For whatever fails that test, log file analysis adds the missing part: it shows whether the crawler requested the JavaScript files at all and how often it comes back. A telling pattern is URLs appearing as crawled while the resources they need for rendering almost never do.

Common Mistakes

The first is concluding that Google does not execute JavaScript. It does, and claiming otherwise leads to expensive decisions — such as rebuilding an entire site when fixing the links would have been enough.

The second is the opposite: assuming that because it runs, there is nothing to watch. The queue exists, resources block themselves over time, and tags inserted by code still arrive late.

And the third is looking only at the homepage. It is usually the best-tended page on the site, the one with the least click depth, and does not stand for the rest; rendering problems gather on the serially generated detail pages — especially in e-commerce, where those are the ones bringing the traffic.

A fourth mistake is measuring with the wrong tool and believing it. Any service rendering with a different browser, a different network and different timeouts can produce a different result from Google's; it serves for orientation, not for conclusions. URL inspection is what speaks for Google.

And the last, the most expensive over time: solving it once and never looking again. One release that changes how links are generated is enough for a whole section to stop being discovered — and nothing raises an alarm. The site keeps working perfectly for anyone visiting with a browser, which is precisely why nobody notices.

Manuel Riveiro Rodriguez CEO & Digital Strategist

A technical audit covers this and everything else in one pass.

Request an audit

Frequently asked

Does Google index content generated with JavaScript?

Yes. Its documentation describes three phases — crawling, rendering, indexing — and uses the rendered HTML for indexing. The difference is not whether it can, but when: between crawling and rendering sits a queue that may last seconds or considerably longer.

How long does rendering take?

There is no published figure. Google says a page may stay in the queue for a few seconds, but it can take longer. Treat it as a variable delay and do not plan launches assuming the content will be visible the same day.

Should I switch to server-side rendering?

Only if the check justifies it. If the initial HTML already carries the main content and the links, there is nothing to fix. If it is empty and new sections take a long time to appear, then it pays off — and there are intermediate steps cheaper than rewriting everything.

Why does my canonical set by JavaScript not work?

Because it arrives too late for the decision that matters. Google makes its first decisions from the HTML the server returns and renders only afterwards. Instructions about whether a URL is indexed, or where it points, belong in that first response.

How do I see what Google rendered?

With URL inspection in Search Console: it shows the rendered HTML, a screenshot and the list of resources it could not load. It is the only tool that speaks for Google; the others simulate the process with a different browser and different conditions.

Sources

  1. Google Search Central, JavaScript SEO basics: describes the three phases, states that every page with a 200 code and no instruction against indexing enters the render queue, and that it may stay there seconds or longer.
  2. Google Search Central, making links crawlable: defines what counts as a followable link, the exact point where navigations built in JavaScript fail.
  3. web.dev on rendering on the web: compares server-side, client-side and the intermediate options with their respective costs.