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.
Routing, links and HTTP status codes
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
| Symptom | Check | Action |
|---|---|---|
| Empty DOM | JavaScript and API errors | Fix public content rendering |
| Content disappears after hydration | Server and client data | Align data and handle errors |
| Soft 404 | Status and page message | Return a meaningful status |
| Not indexed despite correct DOM | Indexing report and canonical | Review 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.
Related resources
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.
