Technical SEO
Can crawlers see content rendered by JavaScript?
Googlebot renders JavaScript, but many AI crawlers appear to read only the raw HTML. Learn how rendering works and how to keep key content visible to both.
Why rendering matters
Some can and some may not. Google renders JavaScript, but many other crawlers, including several used by AI products, appear to read only the HTML your server sends. If your main content, links or metadata exist only after JavaScript runs in the browser, those crawlers may see an empty or partial page.
The safe approach is to make sure everything that matters is in the initial HTML response, and to treat JavaScript as an enhancement rather than the only way content appears.
How Google handles JavaScript
Google processes JavaScript pages in three phases: crawling, rendering and indexing. After fetching the HTML, Googlebot queues the page for rendering in an up-to-date version of Chromium. Google says a page may wait in that queue for a few seconds or longer, so content that depends on rendering can be processed later than content already in the HTML.
- Googlebot does not click buttons or fill in forms, so content that only loads after a user action may not be seen.
- Scripts and stylesheets blocked in robots.txt cannot be used for rendering.
- In practice, heavy or failing scripts can leave parts of a page unrendered.
AI crawlers and raw HTML
OpenAI, Anthropic and Perplexity document their crawlers' names and how to control them with robots.txt, but they do not publicly document whether those crawlers execute JavaScript. In practice they appear to fetch the HTML without running scripts. Until that is documented otherwise, assume that content which only appears after client-side rendering may be invisible to them.
Google says pages need to be indexed in Google Search to appear as links in its AI features, such as AI Overviews, and that index is built from rendered pages. A page can therefore look complete to Google and still be thin or empty to other AI systems.
Put important content in the HTML
- Use server-side rendering, which builds the HTML for each request, or static generation, which builds it ahead of time. Both send complete HTML that scripts can then make interactive.
- Include the main text, headings, prices, product details, structured data, canonical tag and meta robots tag in the initial HTML.
- Make links real anchor elements with an href attribute that holds a URL. Google says it can only reliably follow links built this way, not click handlers on other elements.
- Give each distinct view its own URL rather than relying on the fragment after a # symbol.
- Avoid dynamic rendering, which serves crawlers a separate prerendered version. Google describes it as a workaround, not a long-term solution.
<!-- Crawlable -->
<a href="/pricing">Pricing</a>
<!-- Not reliably crawlable -->
<span onclick="goTo('/pricing')">Pricing</span>How to check what crawlers receive
- Open view-source for the page, not the Elements panel in developer tools, which shows the page after scripts have run. Search it for your main heading and a sentence of body text.
- Load the URL with JavaScript disabled, or request it with a command-line tool, and confirm the content and links are still there.
- Run the URL Inspection live test in Search Console to see the HTML Google rendered, and compare it with the raw source.
If the main content is missing from the raw HTML but present after rendering, Google can probably still index it, but crawlers that do not run JavaScript likely cannot.
Put it to work
- AI crawler access and llms.txtAI engines can only cite pages they are allowed to read. Here is what Nalza checks and fixes.
- Free auditCheck your homepage in about a minute and see a preliminary score with your top issues.
- MovesDrafted fixes with a projected score impact. You approve, the connector applies.
More in Technical SEO
- What are Core Web Vitals?Core Web Vitals measure loading, responsiveness and visual stability. Learn the LCP, INP and CLS thresholds, how they are measured and how to fix them.
- What is structured data and schema markup?Structured data describes a page's content in a format machines can read. Learn JSON-LD, the common schema types, rich results and how to test markup.
- What is a canonical tag?A canonical tag tells search engines which URL is the main version of duplicate pages. Learn how it works, how to set it and which mistakes to avoid.
- What is an XML sitemap and what goes in it?An XML sitemap lists the URLs you want search engines to find. Learn what to include, how lastmod is used, the size limits and how to submit one.
- Which redirect should you use: 301, 302, 307 or 308?Permanent and temporary redirects send different signals. Learn when to use 301, 302, 307 and 308, and how to avoid chains, loops and migration mistakes.
- How to control crawling, indexing and snippetsRobots.txt controls crawling, noindex controls indexing and canonicals consolidate duplicates. Learn what each one does and when to use which.
- How to write title tags and meta descriptionsTitles and meta descriptions shape how a page appears in search results. Learn how to write them, why Google rewrites them and how long they should be.