JAVASCRIPT SEOWhat Google rendersA React or Vue single-page app can look finished in the browser and still give Google very little to work with. Google does run JavaScript, but rendering is a separate, queued step, and the renderer doesn't click, scroll or keep state between page loads. Here is what that means, and how to check what Google really sees.
How does Google process a JavaScript page?
In three phases: crawling, rendering and indexing. Googlebot first fetches the URL, if robots.txt allows it, and reads the links in the HTML response. Every page that returns a 200 status code then goes into a render queue, unless a robots meta tag or header tells Google not to index it.
Google says a page may stay in that queue for a few seconds, but it can take longer. When resources allow, a headless, evergreen version of Chromium runs the JavaScript. Google then reads the rendered HTML for more links and uses it to index the page. If your initial HTML is an empty app shell, everything depends on that second step.
What can Google miss on a client-rendered page?
Anything that isn't in the rendered HTML once the page has loaded on its own. Google states that it can only index content visible in the rendered HTML, and that Google Search does not interact with your page. The usual gaps:
- Content fetched only after a click, a tab change or a scroll, such as reviews that load when a button is pressed.
- Links built from buttons or
onclickhandlers instead of a link element with a realhref. - Content that depends on an earlier visit. Google's renderer clears local storage, session storage and cookies across page loads.
- Features behind a permission prompt, such as location or the camera. Googlebot declines these requests, so offer the content without them.
- Data sent over WebSockets or WebRTC. Googlebot retrieves content with HTTP requests and doesn't support those connections, so provide an HTTP fallback.
How should links and URLs work in a single-page app?
Every page needs its own real URL, reached through a link element with an href. Google says it can generally only crawl links of that kind, and links injected with JavaScript are fine if they use the same markup. For client-side routing, Google recommends the History API and advises against using fragments to load different content, because the old AJAX crawling scheme has been deprecated since 2015.
<!-- Google can't reliably use these -->
<a href="#/pricing">Pricing</a>
<a onclick="goTo('/pricing')">Pricing</a>
<!-- Crawlable: a real URL in the href -->
<a href="/pricing">Pricing</a>The router can still intercept the click and swap the view without a full reload, with history.pushState() updating the address bar. Google's own example does exactly that. Each URL should also load the right content when opened directly, because Googlebot requests every URL on its own.
Should key pages be rendered on the server?
Yes, for any page you want found in search. Google still calls server-side rendering or pre-rendering a great idea, because it makes a site faster for users and crawlers, and not all bots can run JavaScript. Google also notes that other search engines may ignore JavaScript and miss the content it generates.
Serving a pre-rendered copy only to bots, known as dynamic rendering, is not the answer. Google describes it as a workaround and not a recommended solution, because it adds complexity and resource requirements, and recommends server-side rendering, static rendering or hydration instead. In practice we server-render or statically generate marketing pages, pricing, docs and articles, and leave signed-in app screens rendered in the browser.
How do you stop error pages becoming soft 404s?
Give Google a real error signal, because a client-side "not found" view often returns a 200 status code. Google warns that this can lead to error pages being indexed and possibly shown in search results. It suggests one or both of these fixes:
- Redirect with JavaScript to a URL where the server responds with a 404 status, such as
/not-found. - Add a robots
noindexmeta tag to the error view with JavaScript.
What the error page says to visitors matters as well; see what your 404 page should do.
How do you check what Google actually renders?
Use the URL Inspection tool in Search Console or the Rich Results Test, and read the rendered HTML. With either tool you can see loaded resources, JavaScript console output and exceptions, and the rendered DOM. In URL Inspection, Test live URL fetches the page in real time, and a screenshot of the rendered page is only available in a live test.
- Pick one URL per template, plus a URL that should return a 404.
- Run a live test and open View tested page.
- Search the rendered HTML for a sentence of main content and for links to your key pages.
- Look through the page resources and the JavaScript console output for errors.
- Confirm the broken URL returns a 404 status or carries
noindex.
Repeat the check after big front-end releases: a new component or router change can move content out of the rendered HTML without anyone noticing.
Where to start
Run a live test on your five most important URLs and compare the rendered HTML with what visitors see. If key content or links are missing, move those templates to server or static rendering first. On a Next.js build, SEO in the App Router covers the metadata and sitemap side. If you would like us to audit and fix rendering across the site, our SEO and AI search service covers it.
FAQ
Frequently asked questions
Does Google index websites built with React or Vue?
Yes, if the content ends up in the rendered HTML. Google Search runs JavaScript with an evergreen version of Chromium, so framework-built pages can be indexed. Rendering is a separate, queued step, though, and not all bots run JavaScript, so server or static rendering is still the safer choice for pages you need found.
How long does Google take to render a JavaScript page?
Google gives no fixed time. Its documentation says a page may stay in the render queue for a few seconds, but it can take longer, and rendering happens once Google's resources allow. Links in the initial HTML response are read at crawl time, while links that JavaScript adds are only found after rendering.
Can we set the title, canonical and noindex with JavaScript?
Titles and meta descriptions, yes. For the canonical, Google says HTML is the best way; if JavaScript sets it, use the same URL as the original HTML. Never ship noindex in the original HTML and remove it with JavaScript later: Google may skip rendering when it sees noindex, so the removal may never be seen.
Can we block our JavaScript files in robots.txt?
Not the ones your public pages need. Google won't render JavaScript from blocked files or on blocked pages, so if a blocked script or API response builds the content, Google sees the page without it. A URL Inspection live test lists the page resources loaded, which helps you spot what is missing.
Why might Google render our site with old JavaScript?
Googlebot caches aggressively and its rendering service may ignore caching headers, so it can use outdated JavaScript or CSS files. Google recommends content fingerprinting: put a hash of the file's content in its name, such as main.2bb85551.js, so every update produces a new filename.
Is dynamic rendering treated as cloaking?
Generally not, as long as crawlers and users get similar content. Serving completely different content to each can be considered cloaking. Even so, Google now calls dynamic rendering a workaround and not a recommended solution, and recommends server-side rendering, static rendering or hydration instead.

