Skip to content
EN · ₺
Panel Login Buy Package
Technical SEO

JavaScript SEO Basics: Render, SSR and CSR Guide

6 min read

JavaScript SEO is the work of ensuring that search engines correctly crawl, execute and index sites that build their content or links with JavaScript. On a site built with frameworks such as React, Vue or Angular, everything may look flawless in your browser; but Googlebot processes the same page under different conditions and in two stages. That is why "it works on my end" is not enough. In this article we cover how Google processes JavaScript, which architecture puts what at risk, and what you should check in practice.

What is JavaScript SEO?

On a classic web page, the server sends the content directly as HTML. On JavaScript-heavy sites, however, the server mostly sends an empty skeleton and a script bundle; the actual content appears in the browser after the script runs. On the search engine side, this raises the question: can the bot run the script and see the final content, when, and how reliably?

Google can run JavaScript today; the problem is that this capability is not unconditional and instantaneous. The sections below show where the difference appears.

How does Google process JavaScript?

Google's documentation describes the process in three stages:

  1. Crawling: Googlebot requests the address, receives the HTML response, and checks the robots.txt rules.
  2. Rendering: The page is executed with a current Chromium version and the final content produced by JavaScript is seen. This stage is queued, so it may not happen immediately.
  3. Indexing: The text and links on the rendered page are added to the index; new links are added to the crawl queue.

In practice: everything found in the initial HTML is seen earliest and most reliably. Content added only with JavaScript sits in the rendering queue and carries extra risk; if the script throws an error, times out or is blocked, the content may never be seen.

Important: Search engines other than Google, and some AI bots, may not execute JavaScript as well as Google does. Serving your site's critical content in the initial HTML is the safest path for these bots as well.

CSR, SSR and static generation

MethodHow it worksFrom an SEO perspective
CSR (client-side rendering)The browser receives an empty skeleton and the script generates the contentThe riskiest option; content depends on the rendering stage
SSR (server-side rendering)The server produces complete HTML on every request, and then the script takes over in the browserContent arrives in the first response; a strong choice for most content sites
SSG (static generation)Pages are produced as HTML before publicationFast and reliable; ideal for content that does not change often
HybridA mix of SSR, SSG or CSR depending on the pageA common approach in modern frameworks; critical pages should be SSR/SSG

Google no longer recommends the "dynamic rendering" method previously suggested (serving separate HTML to bots) as a lasting solution; it describes it as a workaround. If you are starting a new project, choosing SSR or SSG also reduces maintenance load. Check your framework's own documentation (for example Next.js, Nuxt or Astro) to see how it offers these options.

The most common JavaScript SEO problems

  • Critical content arriving only through JS: If the title, product description, price and main text are not in the initial HTML, they are at risk.
  • JS/CSS files blocked by robots.txt: The bot cannot run the page correctly. Do not block important scripts; to learn these rules, take a look at our robots.txt guide.
  • Navigation that is not real links: Elements that work only through a click event are not crawlable links.
  • Content loaded on scroll or click: Googlebot does not scroll or click on the page; content behind a "show more" button may remain invisible.
  • Addresses working with hash (#): Fragment identifiers (#/products) are not counted as separate pages.
  • Late or faulty content loading: Very slow API responses, timeouts or script errors can leave content empty during rendering.
  • Improper management of meta tags: Title, description and canonical not being generated correctly for each page.

Links and URL structure

For link discovery, Google looks at the href attribute of the <a> element. The two examples below do the same thing visually, but only the first is crawlable:

<!-- Crawlable -->
<a href="https://hitbot.org/urunler/ayakkabi">Shoes</a>

<!-- Not crawlable: no href, only an event listener -->
<span onclick="git('/urunler/ayakkabi')">Shoes</span>

In single-page applications (SPA), when moving between pages, use the browser's History API to create a real and unique address for each view. Each address should also deliver the same content when opened directly (on refresh or via a shared link). For the general logic of internal links, you can take a look at our internal linking strategy article.

Status codes, noindex and canonical

This is the topic most often overlooked in JavaScript applications:

  • Error pages: In a SPA, a non-existent address can show a "Page not found" message and still return HTTP 200. This is a soft 404. Make sure the server returns a real 404, or add noindex to the error view. For details, see our 404 errors and SEO article.
  • Noindex and JavaScript: If the original HTML contains noindex, Google may skip rendering the page; in that case, trying to remove noindex with JavaScript does not work. Do not place noindex in the initial HTML of pages you want indexed.
  • Canonical: If possible, write it in the initial HTML. It can be added with JavaScript, but two conflicting canonicals (one in the HTML, another via script) confuse Google. For canonical logic, see our canonical guide.
  • Redirects: Prefer server-side HTTP redirects over JavaScript redirects; we explained the differences in our 301 and 302 article.

Testing what Google sees

  1. Compare the source: Compare "View page source" (raw HTML) in the browser with the Elements view (rendered DOM) in developer tools. If the main text appears only in the second, the content depends on JS.
  2. URL Inspection: In Search Console, inspect the address, click "Test live URL", and review the HTML Google rendered and the screenshot via "View tested page".
  3. Test without JavaScript: Turn off JavaScript in the browser and open the page. If nothing appears, the bot also sees an empty page in the first stage.
  4. Resources that cannot load: In URL Inspection, check for any script or API call that was blocked or failed to load.
  5. Index check: Search for a sentence from the page in quotes with site:yourdomain.com to see whether the content has entered the index.

If pages are not entering the index, you can narrow down the cause by matching the Search Console statuses with our indexing issues guide.

Checklist before publishing

If you work with a development team, have each of the following items marked "yes / no" before every major release:

  • Are the page's title, main text and main image present in the initial HTML response?
  • Does every page have a unique title, description and a canonical tag pointing to its own address?
  • Are menu and pagination links real <a href> elements?
  • Do non-existent addresses return a real 404?
  • Are important JS and CSS files not blocked by robots.txt?
  • Does the page show at least its main content with JavaScript turned off?
  • When there is a script error or slow API, does the page stay empty, or does it show reasonable fallback content?
  • When a new view (route) is added, does it get into the sitemap?

This list is useful both for a new site and during a design or infrastructure refresh of an existing site. If the person responsible for SEO shares the list at the start of development, the cost of fixes drops considerably; because changing the rendering method after the architecture decision is the most expensive work of all.

Performance and JavaScript

Heavy JavaScript bundles are a burden not only for bots but also for users. Large scripts can worsen interaction delay (INP) and loading time (LCP). Code splitting, removing unused code, limiting third-party scripts and deferring non-critical scripts are the basic steps. For metrics, see our Core Web Vitals guide; for general speed work, you can take a look at our page speed improvement methods article. For Google's official explanation, see its JavaScript SEO basics documentation.

Frequently asked questions

Does Google fully understand JavaScript?

It executes it to a large extent, but rendering means an additional queue and delay. Serving critical content in the initial HTML is the safest path.

Are React or Vue bad for SEO?

No. The problem is not the framework but how the content is delivered. Healthy SEO can be achieved with these frameworks too, through SSR or static generation.

Should I use dynamic rendering?

Google does not recommend it as a long-term solution. For new projects, SSR or SSG is the more appropriate choice.

Does lazy loading harm SEO?

Not if it is done correctly. Use the browser's native loading, and do not require user interaction to trigger content; Googlebot does not click or scroll.

Conclusion

The essence of JavaScript SEO is this: everything you want Google to see should be accessible at the moment the bot requests the page. Deliver content in the initial HTML, use real links and real addresses, return the correct status codes, do not block important scripts, and regularly verify the rendered page with URL Inspection. If you add these habits to your technical SEO checklist, most problems will be caught before they go live.

Is your keyword missing clicks?

HitBot generates real sessions that search for your target keyword, find your site and click it. The results accumulate in Search Console as impressions and clicks.

Other posts