Does JavaScript Hurt SEO and AEO?
Updated 7 September 2026
Jump to section
JavaScript does not hurt SEO on its own, but relying on it to display your content can. Google can render JavaScript, though it does so in a slower second pass, after it has already read your raw HTML. Most AI crawlers go further and do not run JavaScript at all. So content that appears only after a script runs risks being missed by AI answer engines, and the safe fix is server-side rendering.
This is a rendering problem, not a reason to fear JavaScript. Used well, it makes sites interactive; used to build the whole page in the browser, it hides content from the machines you want to reach.
How does Google handle JavaScript?
Google processes a JavaScript page in three stages: crawling, rendering, and indexing. It reads the HTML first, queues the page for rendering, then indexes what the rendered page shows.
Rendering runs in a headless Chromium browser, but only once Google's resources allow. A page can sit in that render queue for seconds, and sometimes much longer.
So Google usually does see JavaScript content in the end. The catch is that it happens later and is never guaranteed, which is a weaker position than plain HTML that Google can index on the first pass.
Where does JavaScript actually cause SEO problems?
The problem is client-side rendering, where the server sends a near-empty page and JavaScript builds the content in the browser. Until the script runs, there is almost nothing on the page for a crawler to read.
If the script is slow, fails, or depends on data that loads late, the content may never appear reliably. That same pattern also drags down load speed and Core Web Vitals, since the browser has more work to do before anything shows.
Server-rendered HTML avoids the gamble entirely. The content is in the response the moment it arrives, with no second pass to wait on.
Why JavaScript is a bigger risk for AEO
Answer engines are stricter than Google, because independent measurement shows the major AI crawlers do not run JavaScript at all. A server-log study by Vercel and MERJ (December 2024) found that "none of the major AI crawlers currently render JavaScript," naming OpenAI's GPTBot and OAI-SearchBot, Anthropic's ClaudeBot, and PerplexityBot.
These bots do fetch script files, but they do not execute them, so client-side content stays invisible to them. Worth being precise: this behavior is established by measurement, not stated in the AI vendors' own documentation, which does not mention rendering.
| Reader | Runs JavaScript? | What it means for you |
|---|---|---|
| Googlebot | Yes, in a later pass | Seen, but with delay |
| GPTBot, ClaudeBot, PerplexityBot | No | Client-side content is missed |
| Google's Gemini | Yes, via Googlebot | The AI exception |
There is one exception worth knowing: Google's Gemini rides on Googlebot's infrastructure, so it can render JavaScript. The honest caveat is that anything in your initial HTML response, even from a React app, stays readable, so server-rendered content is safe for all of them. This is why an AI-ready site leans on HTML, not scripts, for its answers, and it is central to answer engine optimization.
How we build for this
We server-render the content that has to be found, as a rule, not an option. Definitional text, pricing, and answers ship as HTML in the first response, never assembled in the browser.
This whole Hub works that way: a crawler reads the answer immediately, with no script to run. When a site wants to be quoted by AI engines, one of the first things we check is whether crawlers like GPTBot can even reach the page. That means its robots.txt, and whether the content is there before any code runs.
The interactive parts of a site can and should use JavaScript. The words that must rank and be cited should not depend on it.
How to tell if your content is client-side rendered
You can check in under a minute, with no tools. Right-click the page and choose View Page Source, or turn off JavaScript in your browser settings, then search for your main headline or a key sentence.
If the text is there in the raw source, a crawler will find it. If it is missing until scripts run, any reader that does not execute JavaScript, which is most AI crawlers, will not see it.
Frequently asked questions
Is JavaScript bad for SEO?
No, not inherently. JavaScript is normal on modern websites and Google renders it. The risk is client-side rendering, where the important content exists only after scripts run. Interactive features are fine; the content that must rank should be in the HTML, not built in the browser.
Does Google index JavaScript content?
Yes, but in a deferred second pass. Google crawls the HTML first, then renders the JavaScript later, once its resources allow, and indexes what it sees. The delay and the extra step make it less reliable than server-rendered HTML, especially for large or fast-changing sites.
Can ChatGPT and Perplexity read a JavaScript website?
Only the parts delivered as plain HTML. Independent testing found the major AI crawlers, including OpenAI's and Perplexity's, do not run JavaScript, so client-side content is invisible to them. If you want to be quoted in AI answers, server-render the content that matters.
What is server-side rendering in plain terms?
Server-side rendering means the server builds the full HTML page and sends it ready to read, instead of sending a blank shell for the browser to fill in. The content is present the instant the page arrives, for both people and crawlers. Static and pre-rendered pages achieve the same result.
Should I avoid JavaScript on my website?
No. Use JavaScript for interactivity, forms, and anything that genuinely needs it. The rule is simply to render your core content, the text you want ranked and cited, on the server, so it does not depend on a script running. Your tech stack decides how easily you can do that.
Building sites AI can read
Storming Solutions builds websites and runs SEO, AEO, and GEO for Malaysian businesses from Kuala Lumpur. We treat "can a crawler read this without running scripts" as a build requirement, because a page an AI engine cannot read is a page it cannot cite.
Not sure whether your content reaches the crawlers you want? Message us on WhatsApp, or see how content actually ranks, then bring us the site through our web development and SEO, AEO and GEO work. We build the answers into the HTML.