Menu
Menu Logo

LSEO

JavaScript SEO & GEO: Rendering, Hydration and AI Discovery

JavaScript is not bad for SEO. React is not bad for SEO. Neither are Next.js, Vue, Nuxt, Angular, Astro, Remix, or a headless CMS.

Problems begin when the way a site renders its content creates a gap between what the business believes it published and what search engines, crawlers, browsers, users, or other systems can actually access.

A product page might look complete in Chrome while its pricing depends on a failed API request. A service page may contain important internal links that only appear after a client-side component mounts. A documentation page can return a successful HTTP response even though the requested document no longer exists. A hydration error can replace server-rendered content with an empty component. Personalization can produce one version of a page for the server and another after JavaScript runs.

Those are rendering problems. They deserve attention in SEO and GEO because the web increasingly has more than one consumer of your content.

The useful rule is not “avoid JavaScript.” It is this: important public content should be delivered reliably, and you should verify what the systems you care about can actually access rather than assuming every crawler behaves like your browser.

Google Can Render JavaScript

Any modern discussion of JavaScript SEO should start here because a surprising amount of advice still assumes Googlebot only reads the original HTML response.

Google documents a crawling, rendering, and indexing process for JavaScript pages. Googlebot initially fetches a URL and processes the response, then eligible pages can enter a rendering queue. Google's Web Rendering Service uses an evergreen version of Chromium to execute JavaScript, and Google uses the resulting rendered HTML when processing content and links.

In March 2026, Google updated its JavaScript SEO documentation and removed older accessibility language specifically because it no longer wanted to imply that loading content with JavaScript inherently makes that content harder for Google Search.

That changes the way technical SEO teams should talk about client-side rendering. Finding important text missing from View Source is not, by itself, proof that Google cannot index the text.

The better question is whether the content appears correctly in the version Google renders.

Google's JavaScript SEO documentation recommends checking rendered output when troubleshooting JavaScript sites. Search Console's URL Inspection tools and Google's testing tools can help you see what Google is able to process.

So Why Does Rendering Strategy Still Matter?

Because Google isn't the only system that may need your content, and successful JavaScript execution depends on more than the choice of framework.

Google itself says server-side rendering or pre-rendering can still be a good idea because it can improve the experience for users and crawlers, and not all bots can run JavaScript. Google's current generative-search guidance makes a similar point from another direction: Google can process JavaScript content when it isn't blocked, but websites built with JavaScript frameworks generally introduce more SEO complexity.

Outside Google, capabilities vary. A crawler might execute JavaScript, consume rendered HTML produced elsewhere, work primarily from an HTML response, use a browser, retrieve information through another index, or change its approach over time. Unless a platform documents its rendering behavior, we should not claim to know exactly how it processes every page.

That is particularly important in GEO. It would be easy to replace the old myth that “Google can't read JavaScript” with a new myth that “LLMs can't read JavaScript.” Neither is a useful technical standard.

Build resilient public pages, follow documented requirements for the platforms that matter to the business, and test actual outcomes.

CSR, SSR, Static Rendering and Hydration Are Different Parts of the Problem

Rendering terminology can become unnecessarily complicated, especially when marketers and developers use the same words differently. For SEO purposes, the important distinction is how much useful content exists at different stages of the page experience.

Common web rendering approaches
Approach What Happens SEO Consideration
Client-side rendering The browser receives limited HTML and JavaScript creates much of the page after execution. Verify that important content, links, metadata, routing, and status handling work correctly after rendering.
Server-side rendering The server generates HTML for the requested page before sending the response. Useful content is available in the response, although client-side code can still introduce problems afterward.
Static generation HTML is generated ahead of requests and served as a prebuilt document. Works well for content that does not need to be generated uniquely on every request, provided updates and invalidation are handled correctly.
Hydration JavaScript adds application behavior to HTML that has already been rendered. Healthy hydration preserves the intended content. Errors or mismatches can alter, duplicate, or remove what the server delivered.

Modern websites often combine these approaches. A Next.js site might statically generate an article, server-render a pricing page, and client-render an account dashboard. An ecommerce site might deliver product information from the server while using JavaScript for filters, image galleries, recommendations, and cart interactions.

That is normal. There is no reason every URL on a website has to use the same rendering strategy.

Hydration Is a Problem When It Changes the Page You Thought You Published

Hydration itself is not an SEO problem. In a healthy implementation, the server sends useful HTML and JavaScript attaches the interactivity required for the application.

The trouble begins when the server and client disagree.

Imagine a SaaS pricing page where the server outputs three plans and their prices. After hydration, a browser-side request attempts to retrieve location-specific pricing. That request fails, and the component replaces the original pricing table with an empty loading state. The source HTML contained the information, but the final rendered experience did not.

The opposite can happen too. The initial response may contain little more than a shell, while an API request eventually adds all of the product specifications, reviews, availability, and descriptive copy.

Neither architecture should be judged from theory alone. Inspect the response and the final rendered result.

Hydration errors are also worth monitoring in production rather than only during development. Framework upgrades, third-party scripts, personalization, consent management, A/B testing, API failures, and stale cached data can create rendering differences that weren't present when the template originally passed QA.

Don't Use “Turn Off JavaScript” as a Pass-or-Fail SEO Test

Disabling JavaScript can be a useful diagnostic technique. It shows you what the server returns without browser-side execution and can reveal how dependent the page is on client-side code.

It does not tell you whether Google can index the page.

That distinction matters. An article disappearing when JavaScript is disabled may tell you that the site uses client-side rendering. It does not prove the article is invisible to Google, because Google can execute JavaScript.

Use the no-JavaScript view as one part of a comparison. Look at the raw HTTP response, the browser's rendered DOM, Google's rendered version, and the actual experience a user receives. If the page depends on API requests or user interaction, examine those states too.

This gives you a much better technical picture than declaring every difference between View Source and the browser a problem.

The Rendered HTML Is Where Many Real Problems Become Visible

For Google Search, the final rendered output matters. Google's documentation on web components is unusually direct: if content is not visible in the rendered HTML, Google cannot index it.

That makes rendered-HTML inspection one of the most useful parts of a JavaScript SEO audit.

Check whether the main copy is present and complete. Make sure headings have not disappeared or been duplicated. Confirm that internal links resolve to real crawlable URLs. Inspect titles, canonicals, robots directives, structured data, product information, pagination, and other elements that may be created or modified by JavaScript.

Also compare different states of the page. A rendered product page before an API request completes may not be the same page a visitor sees two seconds later. A logged-in experience may differ from the public one. Consent choices can change which scripts run. Geographic personalization can alter content. An experiment may send different visitors to different component versions.

The objective is not to produce identical source and rendered HTML. The objective is to understand whether the page remains technically coherent as it moves through those states.

JavaScript Routing Can Create SEO Problems That Have Nothing to Do With Content Rendering

Single-page applications can change views without traditional full-page navigation, which makes URL architecture particularly important.

Google recommends using real crawlable links with <a> elements and href attributes. For client-side routing, Google recommends the History API rather than using URL fragments to represent independently discoverable content.

Each indexable page should also have a stable URL that can be requested directly. A user, crawler, or browser should not have to visit the homepage first and reproduce a sequence of application state changes to reach a public product or service page.

Status codes matter here as well. A JavaScript application can visually display “Product Not Found” while the server continues returning 200 OK for every nonexistent URL. That can create soft 404 problems. Redirects, removed resources, private pages, and server errors should return responses that accurately describe what happened whenever the architecture allows it.

These issues are ordinary technical SEO. They do not become different rules simply because the same site also wants visibility in AI search.

Internal Links Should Behave Like Links

A visually clickable element is not necessarily a crawlable link.

Google specifically looks for anchor elements with href attributes when discovering links. JavaScript can add those links to the DOM, but the resulting markup still needs to follow normal crawlable-link practices.

This becomes relevant when design systems use cards, buttons, custom components, or onclick handlers as substitutes for ordinary navigation. A user may be able to click the component while a crawler does not receive the same clear URL relationship.

Use JavaScript to enhance navigation where appropriate, but don't reinvent a hyperlink when a hyperlink already solves the problem.

For SEO and GEO, internal links remain useful because they help connect related resources and establish sensible pathways through the site. The value comes from the architecture and the relationship between pages—not from adding some special AI-specific link format.

Client-Side API Calls Deserve Special Attention

Many JavaScript rendering issues are really data-delivery issues.

A headless CMS, product information system, inventory service, pricing engine, review platform, personalization service, or other API may provide information after the main document begins loading. That can be completely appropriate, especially when the information changes frequently.

The question is what happens when that dependency is slow or unavailable.

If an API failure removes a recommendation carousel, the page may still accomplish its primary purpose. If the same failure removes the product name, price, description, specifications, and availability, the page has a much larger resilience problem.

Think about content dependencies according to business importance. The information that defines the page—what the product is, what a service does, where a business operates, what an article says, what something costs when price is central to the transaction—deserves a particularly reliable delivery path.

That doesn't always mean putting every value into static HTML. It means designing failure states intentionally instead of assuming every client-side request will succeed.

Tabs and Accordions Are Not Automatically SEO Problems

Another outdated rule says all content must be visibly expanded when a page loads. That leads to bad UX on pages where tabs and accordions genuinely help people navigate complicated information.

The technical question is whether the content is actually available in the rendered page and whether the interaction has been implemented correctly.

An accordion whose answer text already exists in the DOM and is simply shown or hidden through an accessible interaction is very different from a component that does not request the answer from an API until someone clicks it.

The second implementation creates a stronger dependency on user interaction. That may be perfectly appropriate for information that only makes sense after an action, but it deserves scrutiny when the content is supposed to be independently discoverable.

Use tabs and accordions because they improve the experience, not because someone claims AI systems prefer or dislike them. For the accessibility side of these interfaces, see ARIA & Web Accessibility for SEO and AI Agents.

A Clean DOM Is Useful, but Don't Invent a DOM Ranking Factor

The Document Object Model, or DOM, is the browser's structured representation of a document. JavaScript can inspect it, modify it, remove elements, add content, update attributes, and attach interactions to it.

It is sensible to care about the quality of that structure. Excessively complicated templates can become difficult to maintain. Duplicate components can create accessibility problems. Huge DOMs can contribute to performance issues. Incorrect nesting and broken component logic can produce unpredictable results. Search-critical information can also disappear if rendering code fails.

What we should not do is turn “DOM optimization” into a new GEO ranking theory.

Google's current generative-search guidance explicitly says publishers do not need perfectly semantic HTML for Google Search. Semantic HTML is still a good practice where appropriate, especially for accessibility and maintainability, but there is no documented rule saying fewer <div> elements, shallower DOM depth, or placing text physically higher in the DOM makes an AI system more likely to cite the page.

Likewise, there is no general requirement to have exactly one H1 because an LLM supposedly becomes confused by two. A clear heading structure is good editorial and accessibility practice, but we should not manufacture a citation mechanism around it.

Clean up code when it improves performance, accessibility, maintainability, rendering reliability, or the user experience. Those are strong reasons already.

Structured Data Cannot Rescue Missing Content

JavaScript can generate structured data, including JSON-LD. Google documents and supports that approach when the resulting implementation is valid and appropriate for the page.

But structured data should describe the content and entities that actually exist. It should not become a parallel version of the website where important facts appear only in schema because the visible experience failed to render them.

If a product page visibly shows one price while client-generated structured data reports another, the problem isn't solved by deciding which version search engines should trust. The implementation needs to be corrected so the website communicates a coherent state.

The same principle applies to availability, ratings, authorship, dates, FAQs, events, and other information represented in structured data.

Schema is useful vocabulary. It is not a substitute for reliable content delivery, and there is no special JavaScript or GEO schema that eliminates rendering problems.

Dynamic Rendering Should Not Be the Default Fix

Dynamic rendering became popular as a workaround for JavaScript sites: ordinary visitors received the client-rendered application while selected crawlers received a pre-rendered HTML version.

Google no longer recommends treating that architecture as a long-term solution. Its current documentation calls dynamic rendering a workaround and recommends server-side rendering, static rendering, or hydration-based approaches instead when a site is being redesigned or the underlying rendering problem can be fixed.

There are situations where a temporary rendering layer can help a legacy application work with crawlers that cannot process its JavaScript. But maintaining separate crawler and user representations adds infrastructure and creates another place for versions to drift apart.

If you inherit a dynamic-rendering system, don't rip it out blindly. Determine why it was introduced, which crawlers depend on it, and whether the modern application can now deliver an appropriate experience without it.

How Does JavaScript Rendering Affect GEO?

The answer is less dramatic than many GEO articles make it sound.

For Google's generative search experiences, Google says the normal technical requirements and SEO fundamentals continue to apply. Its current guidance specifically tells JavaScript sites to follow ordinary JavaScript SEO best practices. Google does not prescribe a separate rendering architecture for AI Overviews or AI Mode.

Other AI discovery systems may reach web content differently, and their documentation does not always tell publishers whether or how JavaScript is executed. That uncertainty is a reason to build resilient public pages, not a license to invent universal rules about how “LLMs read websites.”

There is also a distinction between crawling and retrieval. An AI answer might rely on a search index, a dedicated crawler, a browser-like system, another source database, or a combination of mechanisms. The architecture can differ by platform and feature.

For that reason, the technical GEO objective should be modest and defensible: make public information reliably accessible through normal web architecture, allow the crawlers you intentionally want to access it, maintain coherent URLs and metadata, and monitor whether the brand and its pages actually appear in relevant AI experiences.

For crawler governance specifically, see our guide to OAI-SearchBot, GPTBot, and AI crawlers.

Browser Agents Add Another Reason to Build Robust Interfaces

AI discovery is beginning to extend beyond retrieving information into performing tasks. A browser agent might compare products, inspect availability, complete a form, or navigate through a booking experience.

Google's current generative-search guidance notes that browser agents may inspect a page's visual rendering, DOM structure, and accessibility tree while gathering information or completing tasks.

That makes rendering quality relevant in a slightly different way. A page can be perfectly indexable as a document and still have a confusing interactive interface. A custom selector may have unclear states. A modal can trap focus. A booking widget can depend on an interaction that isn't represented clearly in the DOM. A button may only work through a mouse-specific event.

Those aren't conventional indexing problems. They are interface problems.

As agentic experiences develop, businesses with transactional websites should test whether their important customer journeys are robust and understandable rather than assuming good Google rankings mean an automated browser can successfully use the interface.

How to Audit a JavaScript Website for SEO and GEO

A useful JavaScript audit compares states instead of looking for one magic version of the page.

Start with a representative set of URLs rather than crawling thousands of pages immediately. Include the homepage, service or category pages, articles, product pages, location pages, documentation, interactive tools, and any other templates that matter commercially.

For each template, compare the HTTP response with the fully rendered experience. Then inspect Google's rendered output through Search Console where appropriate. Pay particular attention to information that changes between those states.

Check the things that can materially change discoverability: titles, canonicals, robots directives, headings, primary copy, internal links, pagination, product information, structured data, HTTP status handling, and URLs generated by client-side routing. Review the browser console and network activity for errors that could prevent important components from completing.

Then test the experience under imperfect conditions. Slow the network. Block a nonessential API. Review what happens before hydration completes. Test important interactions with the keyboard. Look at mobile rendering. If a third-party script fails, determine whether the page still communicates its primary purpose.

Turning JavaScript off can be part of this audit, but use it diagnostically. The goal isn't to force every modern website to function like a 1998 HTML document. The goal is to understand which parts of the experience depend on execution and whether those dependencies are appropriate.

Prioritize Rendering Problems by Business Impact

Not every JavaScript difference deserves an engineering sprint.

If an animated testimonial slider fails to load but the service page remains complete and usable, that problem may be relatively minor. If a rendering failure removes the product description, price, availability, primary navigation, or lead form, the business impact is much greater.

The same principle applies to search. A cosmetic DOM difference is less important than an indexable product page returning the wrong canonical or a client-side router creating thousands of crawlable states. A late-loading decorative image is less concerning than internal links that do not exist as crawlable links.

Prioritization should consider organic visibility, user impact, conversion importance, frequency of failure, scale across templates, and the cost of remediation.

That keeps JavaScript SEO focused on actual technical risk rather than turning every line of front-end code into an optimization project.

Measure What Changes After the Fix

A rendering fix should produce an observable technical result before anyone claims an SEO or GEO win.

If you changed a template because Google was not seeing important product content, first verify that the content now appears in Google's rendered HTML. If you repaired internal links, confirm that they are present as crawlable links and that the destination URLs are being discovered. If you corrected status handling, make sure removed pages now return the intended response.

Then monitor search performance. Search Console can show changes in indexing, impressions, clicks, and query visibility. Analytics can help determine whether the new experience changed engagement or conversions.

AI visibility can be measured separately. Track a stable set of commercially relevant prompts and observe brand mentions, citations, source URLs, representation, referral traffic, and downstream business activity. LSEO AI can support that measurement.

Be careful with causality. If ChatGPT begins citing a page two weeks after a rendering fix, that does not prove the rendering change caused the citation. Rankings, links, content changes, crawler behavior, platform updates, and other factors may have changed during the same period.

The strongest evidence comes from combining technical verification with search data, AI visibility observations, and controlled testing where possible.

The Bottom Line: Render Reliably, Then Enhance

Modern websites do not need to choose between JavaScript and search visibility.

Google can render JavaScript, and client-side frameworks can support excellent organic performance. Server rendering, static generation, and hybrid approaches can also make content delivery more resilient and reduce dependence on browser execution. The right architecture depends on what the page does, how frequently its information changes, and which systems need to access it.

The mistake is turning a rendering preference into a universal SEO or GEO rule.

Don't claim that every important sentence has to exist in the original HTML for Google. Don't assume every AI crawler executes JavaScript. Don't clean up nested <div> elements because someone invented an “AI extraction score.” And don't move an entire application to server-side rendering without first identifying the problem you're trying to solve.

Instead, inspect what the server sends, what the browser renders, what Google sees, and what happens when dependencies fail. Make important public information reliable. Use real URLs and crawlable links. Return meaningful status codes. Keep metadata and visible content coherent. Test the interfaces customers actually use.

That is good JavaScript SEO. It is also a far more durable technical foundation for GEO than guessing how every AI system might parse your code.

JavaScript is a tool, not an SEO problem. The problem is publishing important information through an architecture you haven't verified.

Technical SEO + GEO + Web Development

Is Your Website Publishing the Same Content Search Engines Actually See?

LSEO combines technical SEO, web development, content strategy, and AI visibility measurement to diagnose rendering problems that can affect organic discovery, user experience, and modern search visibility.

Talk to LSEO Technical SEO Services Web Development

Frequently Asked Questions About JavaScript SEO and GEO

Can Google crawl and index JavaScript?

Yes. Google Search uses an evergreen version of Chromium to render JavaScript and can use rendered HTML when indexing pages. JavaScript therefore does not automatically prevent content from appearing in Google Search. Sites still need to follow Google's JavaScript SEO requirements and ensure important resources are not blocked.

Does important SEO content have to be in the initial HTML?

Not for Google as a universal requirement. Google can render JavaScript-generated content. Having important public content available in server-rendered or pre-rendered HTML can still improve resilience, performance, and compatibility with systems that do not execute JavaScript, but missing content from View Source alone does not prove Google cannot index it.

What is hydration?

Hydration is the process of attaching JavaScript behavior to HTML that has already been rendered. It becomes a technical problem when hydration fails, creates a mismatch between server and client output, removes useful content, duplicates elements, or otherwise changes the page in unintended ways.

Is server-side rendering better for SEO?

Server-side rendering can reduce dependence on client-side execution by returning useful HTML directly in the response. Google also notes that server-side or pre-rendering can be beneficial for users and crawlers. That does not mean every website needs SSR. Client-side rendered sites can perform well when implemented and tested correctly.

Is client-side rendering bad for SEO?

No. Client-side rendering creates additional technical considerations because meaningful content may depend on JavaScript execution, API requests, client-side routing, and application state. Google can process client-rendered content, but teams should verify the rendered output and make sure routing, links, metadata, status handling, and important content work as intended.

Should I test my website with JavaScript disabled?

Yes, as a diagnostic technique—not as a pass-or-fail SEO test. Disabling JavaScript helps identify what depends on client-side execution. You should also inspect the HTTP response, fully rendered DOM, Google-rendered output, network requests, and important application states before deciding whether there is a search problem.

Can Google index content inside tabs and accordions?

Tabs and accordions are not inherently an SEO problem. What matters is how they are implemented and whether Google can access the content in the rendered page. Content that does not exist until a user interaction triggers a separate request creates a different technical situation from content already present in the DOM and simply hidden or revealed through the interface.

Should I use dynamic rendering for JavaScript SEO?

Google describes dynamic rendering as a workaround rather than a recommended long-term solution. For new implementations or major rebuilds, Google recommends approaches such as server-side rendering, static rendering, or hydration rather than maintaining separate crawler and user versions solely to solve JavaScript rendering problems.

Does a cleaner DOM improve AI citations?

There is no documented universal rule showing that fewer DOM elements, shallower nesting, fewer wrapper divs, or a particular HTML hierarchy directly increases AI citations. Clean code can improve maintainability, accessibility, performance, and rendering reliability, but those benefits should not be turned into an unsupported GEO ranking factor.

Can AI crawlers execute JavaScript?

Capabilities vary by platform and feature, and publishers should not assume every AI crawler behaves like Googlebot or a full browser. Where a provider documents its crawler behavior, follow that documentation. Otherwise, build resilient public pages and test actual discovery rather than relying on blanket claims about what all AI systems can render.

Does Google require different JavaScript optimization for AI Overviews or AI Mode?

Google's current guidance does not prescribe a separate JavaScript architecture for its generative search experiences. It recommends following normal JavaScript SEO best practices and maintaining the same foundational technical SEO practices used for Google Search generally.