Skip to content

Search

Articles, tools, solutions and knowledge base guides

Start typing to search across articles, tools and apps.

JavaScript SEO: how Google renders and indexes applications

Google can execute JavaScript, but a working application in a user's browser does not prove that search engines receive its complete content. First identify whether the problem concerns discovery, fetching, rendering, indexing or search visibility. This guide shows how to distinguish these stages and fix the root cause rather than replace the framework blindly.

Published Written by Reading time 8 min read
On this page Contents: quick navigation between sections

How does Google process JavaScript applications?

Google discovers URLs through links, sitemaps and other signals. After fetching a document it parses the HTML. Google describes queuing HTTP 200 pages for the Web Rendering Service (WRS), unless robots directives prohibit indexing. Rendering may be skipped for other responses, such as 404. WRS uses an updated Chromium engine; rendered output supplies further content and links for processing. Google does not guarantee a queue duration. [1][2]

Indexing is a separate decision: Google evaluates content, accessibility and canonical signals. Even a complete page returning 200 may not be selected for indexing. Do not diagnose the issue solely with a site: query or search rankings. [5][6]

Original HTML, DOM and hydration

Inspect the GET response, HTML before script execution and DOM after execution separately. A CSR document may initially contain only a container; SSR already provides content in the response. Hydration connects interactions to generated markup, but inconsistent client and server data may replace or remove content.

For example, a product is present in the original HTML but disappears after hydration because the client sends a request without a language identifier. Fix the data contract and retain valid server content during temporary API failures. Avoid hiding the entire document behind a loading indicator. Test without a session, by direct navigation and on mobile. [2][7]

In browser developer tools, open Network, preserve the log and reload the target URL directly. Compare the Document response with the Elements tree. In a clean mobile context, check the H1, actual description, links and metadata. Text present only in JSON data or an empty container is not evidence of successfully rendered content. Record the precise API response and console error associated with content loss.

Every public page should have its own URL that works on a direct request. A router may intercept navigation, but use anchor elements with href and real destinations; a click handler on a button is not a substitute. The History API supports path changes without a full reload. A fragment such as #/product is not a reliable basis for separate indexable documents. [1][3]

Return 200 for existing content, 404 or 410 for removed content, 301/308 for permanent moves and 503 for temporary unavailability. An SPA that returns 200 with a missing-product message can cause soft 404s. If server status cannot be set, Google describes redirecting to a real 404 or adding noindex for a confirmed missing resource. Do not do this for temporary API failures. [1][8]

Metadata, robots.txt and structured data

Prefer delivering titles, descriptions, canonical and hreflang in HTML. Google can read JavaScript-generated metadata, but do not replace a correct canonical with a conflicting URL during hydration. An initial noindex may prevent rendering, making its subsequent removal unreliable. Check the HTTP X-Robots-Tag as well. [1][9][10] [14]

Do not block CSS, JavaScript or public endpoints needed for WRS to obtain content. Do not expose private information to improve indexing. Dynamically generated JSON-LD must match visible content; validate it after rendering. Include preferred canonical URLs in sitemaps rather than interface states. [1][2][6] [13]

If a canonical cannot be included in the initial HTML, Google supports generating it with JavaScript. Do not declare a competing URL in the source. Also check that robots.txt does not prevent Google from reading noindex: blocking crawling is not the same as excluding a URL from the index. [1][9][10]

Lazy loading, pagination and public APIs

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Tools directory</title>
    <link rel="canonical" href="https://example.com/en/tools" />
  </head>
  <body>
    <main>
      <h1>Developer tools</h1>
      <p>Practical tools for everyday work with code and data.</p>
      <ul>
        <li>JSON</li>
        <li>CSV</li>
      </ul>
      <p><a href="/en/tools?page=2">Next directory page</a></p>
    </main>
  </body>
</html>

The second catalog page has distinct content, its own canonical URL and a return link.

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Tools directory - page 2</title>
    <link rel="canonical" href="https://example.com/en/tools?page=2" />
  </head>
  <body>
    <main>
      <h1>Developer tools - page 2</h1>
      <p>Practical tools for everyday work with code and data.</p>
      <ul>
        <li>XML</li>
        <li>SVG</li>
      </ul>
      <p><a href="/en/tools">Previous catalog page</a></p>
    </main>
  </body>
</html>

Do not assume Google clicks, scrolls or accepts consent prompts like a person. Viewport-based loading is suitable for some resources, but make essential text and links available without interaction. Infinite scrolling also needs distinct paginated URLs accessible through ordinary links. Each URL must work independently of the previous view. [4][7]

WRS does not rely on state retained between visits. Public APIs must support anonymous requests, and content must not require geolocation or localStorage values. Check CORS, 401/403/429 responses, CDN errors and compatibility between HTML and JavaScript versions. Content-hashed asset filenames reduce the risk of outdated resources after deployment. [2]

WRS may cache resources independently of the expected cache headers. Deploy content-fingerprinted assets and keep previous versions long enough for older documents to load their dependencies. Do not make essential descriptions depend on scrolling, and avoid unnecessarily lazy-loading images that are visible immediately. [2][4]

Below is the first page of a fictional directory: its next-page link works without JavaScript. The next page must return its own content and its own canonical rather than point to page one. [15]

Choosing a rendering strategy

CSR (Client-Side Rendering) creates content in the browser, SSR (Server-Side Rendering) generates HTML on the server for a request, and SSG (Static Site Generation) usually does so at build time. ISR (Incremental Static Regeneration) refreshes generated HTML according to framework-specific rules. Different pages can use different strategies.

For an article or service page, choose generated HTML such as SSG or ISR when the freshness requirements allow. SSR is useful when public data must be current at request time. CSR can be appropriate for authenticated dashboards. No rendering mode guarantees indexing or good Core Web Vitals on its own.

You need not rewrite the entire product. Move public product details, categories and articles to generated HTML first and keep interactions client-side. Google treats dynamic rendering, a separate rendering path for crawlers, as a workaround rather than a long-term solution; user and crawler content should be equivalent. [11]

A step-by-step Search Console audit

1. Select URLs from each template: a working page, an unindexed page, a removed page and a localized page. 2. Fetch the GET response without a session; check status, redirects, headers and original HTML. 3. In a clean mobile browser context, compare rendered text, links, canonical and structured data. Record console and network errors.

4. In Search Console, inspect the indexed version and run a live URL test. Compare available HTML, screenshot and resources. The live test does not confirm Google's canonical selection or indexing; historical reports may represent an older version. 5. Fix the cause, retest and monitor Page indexing and Crawl stats. [2][5]

Beware of redirects: the live test may inspect a destination without displaying its final URL. A Polish URL redirected to an English version could therefore receive a positive result. Verify the complete redirect chain separately and inspect the destination URL itself. On multilingual sites, the language explicitly encoded in the URL should take precedence over automatic language detection. [5][14]

For “Discovered - currently not indexed”, start with server availability, links and sitemaps. For “Crawled - currently not indexed”, examine rendered content, duplication and canonical signals, but do not assume JavaScript is the cause. If Google selected another canonical, compare the declared and selected URLs. None of these statuses alone proves a particular defect. [18]

Diagnostic example and regression checks

SymptomCheckAction
Empty DOMJavaScript and API errorsFix public content rendering
Content disappears after hydrationServer and client dataAlign data and handle errors
Soft 404Status and page messageReturn a meaningful status
Not indexed despite correct DOMIndexing report and canonicalReview signals and content quality

Suppose a store publishes 500 product pages. Among 60 sampled pages, the response contains only a shell, and 12 receive a 403 from the anonymous API. These are hypothetical numbers, not measurements. Correct access policies for public data only, generate the core description in HTML and retest the sample. Do not grant exceptions based only on the Googlebot User-Agent string.

In CI/CD, verify HTTP status, main content, canonical consistency before and after rendering, direct navigation, absence of noindex on pages intended for indexing and critical hydration errors for each template. Simulate API unavailability too. After release, monitor the proportion of indexed URLs in a defined set and separate technical changes from seasonality. Google's AI features follow underlying search eligibility; neither a special JavaScript SEO tag nor guaranteed citations exist. [12]

Define acceptance criteria per template: an existing product returns 200 with its own description, a removed one returns 404 or 410, and a temporary service failure returns 503 when the server cannot provide valid content. Also test client routing, direct reload, anonymous access, locale selection and failed API requests. Specify expected text or selectors rather than merely checking for console errors. Wait for the expected content instead of a fixed delay. Browser regression tests do not emulate the entire Google indexing process.

POLPROG: robots.txt & sitemap.xml [16]

POLPROG: SSR vs CSR vs SSG vs ISR [17]

A sitemap helps URL discovery but cannot repair missing rendered content. Read POLPROG's guide to robots.txt and sitemap.xml to configure crawler access correctly.

Start with accessible public content, stable URLs and meaningful HTTP responses. Then verify metadata and rendered DOM consistency, including network failures. Assess outcomes in Search Console after Google processes the URLs again. Successful rendering is not a guarantee of indexing.

Tools for this topic

JavaScript SEO Googlebot Web Rendering Service Technical SEO CSR SSR Hydration Google Search Console Soft 404 Lazy Loading Indexing

Frequently asked questions

Does Google index React, Angular and Vue?

Yes, if Google can fetch and process the content. The framework itself does not determine indexing.

Is SSR mandatory?

No, but it makes public content less dependent on client-side script execution.

Is testing without JavaScript sufficient?

No. It shows what a browser displays without executing scripts, but does not replace checking the raw HTTP response, the rendered page or URL Inspection in Search Console.

Does Google click Load more?

Do not assume that. Provide accessible links to subsequent list pages.

How long does rendering take?

Google does not guarantee a fixed duration. Monitor URL status rather than assume a schedule.

Does a successful live test mean indexing?

No. It confirms some technical requirements; indexing and canonical selection remain separate decisions.

Sources and references

  1. Google Search Central, Understand JavaScript SEO basics↩1↩2↩3↩4↩5↩6
  2. Google Search Central, Fix search-related JavaScript problems↩1↩2↩3↩4↩5↩6
  3. Google Search Central, SEO link best practices↩
  4. Google Search Central, Fix lazy-loaded website content↩1↩2
  5. Google Search Console, URL Inspection tool↩1↩2↩3
  6. Google Search Central, How Google Search works↩1↩2
  7. Google Search Central, Mobile-first indexing best practices↩1↩2
  8. Google Search Central, How HTTP status codes affect Google crawlers↩
  9. Google Search Central, Canonical URL methods↩1↩2
  10. Google Search Central, Robots meta tag specifications↩1↩2
  11. Google Search Central, Dynamic rendering as a workaround↩
  12. Google Search Central, AI features and your website↩
  13. Google Search Central, Generate structured data with JavaScript↩
  14. Google Search Central, Localized versions of your pages↩1↩2
  15. Google Search Central, Pagination and incremental page loading↩
  16. POLPROG, Sitemaps and robots.txt↩
  17. POLPROG, SSR vs CSR vs SSG vs ISR↩
  18. Google Search Console, Page indexing report↩

Was this helpful?

Get new articles by email

One short email per new Learning article. No spam, unsubscribe in one click.

We only use your email to send new articles. No third-party sharing.

Back to Learning