Your site relies on JavaScript to render content. Users see it in the browser, but Google does not index it. Or some pages are indexed, others are not. JavaScript rendering is one of the most common SEO problems for modern sites. This guide explains why JavaScript rendering breaks SEO and how to fix it.
How Google handles JavaScript
Google can render JavaScript, but not always reliably. The process works in two waves:
— first wave: Googlebot crawls the HTML;
— second wave: Google renders JavaScript and indexes the result.
The second wave can be delayed by days or weeks. Some content may never be rendered if Google decides it is not worth the resources. This means that JavaScript-rendered content is often indexed later or not at all.
Reason 1: content is not in the initial HTML
The most common issue: content is generated by JavaScript and is not present in the initial HTML. Googlebot may not see it during the first wave.
What to check:
— is the content in the page source;
— is it added by JavaScript;
— is it visible in the rendered HTML in Search Console;
— is it visible to users.
The fix: use server-side rendering (SSR) or static generation for important content. Make sure key text, links and metadata are in the initial HTML.
Reason 2: links are generated by JavaScript
If internal links are generated by JavaScript, Googlebot may not follow them during the first wave. This affects crawling and discovery.
What to check:
— are links in the page source;
— are they standard anchor tags with href;
— are they added by JavaScript;
— are they visible in the rendered HTML.
The fix: ensure important internal links are standard anchor tags in the initial HTML.
Reason 3: JavaScript is blocked by robots.txt
If robots.txt blocks JavaScript or CSS files, Googlebot may not be able to render the page properly.
What to check:
— is JavaScript blocked by robots.txt;
— is CSS blocked by robots.txt;
— are the blocked files needed for rendering;
— does the rendered HTML show the content.
The fix: allow Googlebot to access JavaScript and CSS files.
Reason 4: JavaScript errors prevent rendering
If JavaScript throws errors, the page may not render correctly. Googlebot may see a partial page or no content at all.
What to check:
— are there JavaScript errors in the console;
— do errors prevent rendering;
— are errors visible in the rendered HTML;
— do errors appear only for Googlebot.
The fix: fix JavaScript errors and test rendering with Search Console URL Inspection.
Reason 5: rendering budget and crawl budget
Google has limited resources for rendering. If the site has many JavaScript-heavy pages, rendering may be delayed or skipped for some pages.
What to check:
— how many pages rely on JavaScript;
— how often they are rendered;
— whether important pages are rendered;
— whether low-value pages consume rendering budget.
The fix: reduce JavaScript, use SSR for important pages, and remove low-value JavaScript-heavy pages.
For a check of requests and resources, HTTP requests checker can help identify heavy JavaScript that affects rendering.
How to diagnose JavaScript rendering issues
A practical sequence:
— check the page source for content and links;
— check the rendered HTML in Search Console;
— check for JavaScript errors;
— check robots.txt for blocked resources;
— test with the URL Inspection tool;
— test on a real device.
If the content is visible in the rendered HTML but not in the page source, the issue is JavaScript rendering. If it is not visible in either, the issue may be in errors or blocked resources.
For a broader audit, SEO audit can help verify indexing, canonical, sitemap and other factors in one place.
How to fix JavaScript rendering
Fix steps:
— use server-side rendering for important content;
— ensure links are standard anchor tags in the initial HTML;
— allow Googlebot to access JavaScript and CSS;
— fix JavaScript errors;
— reduce JavaScript-heavy pages;
— test with Search Console after fixes;
— request re-crawl.
FAQ
Why is JavaScript-rendered content not indexed?
Google may not render JavaScript reliably, especially during the first wave. Content may be indexed later or not at all.
Can Google render JavaScript?
Yes, but not always reliably. Rendering can be delayed, and some content may never be rendered.
What is server-side rendering?
It is a technique where HTML is generated on the server, so content is present in the initial HTML. This improves crawlability and indexing.
Should I block JavaScript in robots.txt?
No. Blocking JavaScript can prevent Googlebot from rendering the page. Allow access to JavaScript and CSS.
How do I check if Google sees my content?
Use Search Console URL Inspection to see the rendered HTML. If content is missing, Google may not see it.
What is dynamic rendering?
It is a workaround where the server serves static HTML to bots and JavaScript-rendered content to users. It is not a long-term solution.
Does JavaScript rendering affect SEO?
Yes. If content is not rendered, it may not be indexed, which affects rankings and traffic.
How long does it take for Google to render JavaScript?
It can take days or weeks. Rendering is delayed compared to crawling.
Can JavaScript errors prevent indexing?
Yes. If JavaScript errors prevent rendering, Google may see a partial page or no content.
What is the best approach for JavaScript-heavy sites?
Use server-side rendering or static generation for important content. Ensure links and metadata are in the initial HTML.