BF50 Black Friday · 50% off all plans
from $5/mo · Auto-applied ---:--:-- Claim 50% off →
Skip to content

Search Seonio

Type a keyword, domain, or paste a URL

Start free with $1 to see full results. Powered by Seonio
Web Development

JavaScript: What it is and how it affects SEO

JavaScript is the language that makes web pages interactive. Search engines can run it, but content that needs it can be indexed late or missed.

Monthly searches · javascript
1.5m
Keyword research data
javascript
JavaScript: What it is and how it affects SEO
Click the image to view it full size

JavaScript (JS) is a programming language that runs inside the web browser and changes a page after it arrives: it opens menus, checks forms, loads new results without a reload and sends analytics events. Together with HTML for structure and CSS for styling, it's one of the three building blocks of the web. W3Techs counts it on 98.9% of websites, as of October 2026.

It isn't related to Java, despite the name. The official standard is called ECMAScript (ECMA-262), and Ecma International publishes a new edition each year; the 2026 edition is the 17th. Developers also run JavaScript on servers, most often with Node.js.

What JavaScript does on a page

The browser first reads the HTML and builds the page's structure, the Document Object Model. JavaScript can then read and change that structure. A script might:

  • Fetch product data and write it into the page.
  • Show or hide content when someone clicks a tab.
  • Add links, titles or structured data that weren't in the original HTML.
  • Send an event to your analytics tool when someone submits a form.

The first two are why sites feel like apps. The third is where SEO questions start: if content only exists after a script runs, a search engine has to run that script too.

How Google handles JavaScript pages

Google processes JavaScript pages in three phases: crawling, rendering and indexing. Google Search Central

  1. Crawling. Googlebot fetches the URL, checks robots.txt, and collects links from the HTML it received.
  2. Rendering. Pages that return a 200 status go into a queue. When resources allow, an up-to-date Chromium browser running without a screen executes the JavaScript. That can take seconds or longer.
  3. Indexing. Google reads the rendered HTML, indexes it, and queues any new links it found there.

A few details from that process matter in practice. Pages with other status codes, such as a 404, may never be rendered. A page that starts with noindex may not be rendered either, so a script that later removes the noindex may never get the chance. And Google can only see content that ends up in the rendered HTML.

Other search engines and bots

Google says server-side rendering is still a good idea partly because not all bots can run JavaScript, and that other search engines may ignore it. Bing's guidelines ask sites not to hide critical content behind client-side rendering and warn that content it can't reliably render may not be indexed. Bing Webmaster Guidelines

The safe rule: put the content and links you want found in the HTML the server sends, and use JavaScript to improve the page from there.

Choosing how pages are rendered

Where the HTML gets built is a decision your developers make, and it shapes your SEO risk. See web rendering for the full picture.

Approach Where the HTML is built SEO risk
Server-side rendering On the server, for each request Low: content is in the first response
Static rendering Ahead of time, at build Low
Hydration On the server, then JavaScript takes over in the browser Low, if the server HTML is complete
Client-side rendering In the browser, by JavaScript Higher: depends on rendering

Dynamic rendering, which serves bots a pre-rendered page and people the JavaScript version, was a workaround. Google no longer recommends it and points to server-side rendering, static rendering or hydration instead.

A JavaScript SEO checklist

These come from Google's JavaScript SEO guidance:

  • Use real links. Google discovers links in <a> elements with an href. Click handlers on a <span> aren't links.
  • Use normal URLs, not fragments. In single-page apps, route with the History API (/products), not #/products.
  • Keep the canonical consistent. JavaScript may set a canonical tag, but it shouldn't change one already in the HTML to something else.
  • Send honest status codes. If a single-page app can't return a 404, redirect to a URL that does, or add a noindex robots tag to the error view.
  • Put noindex in the HTML only when you mean it. Don't rely on a script to remove it later.
  • Version your files. Google caches aggressively, so names like main.2bb85551.js keep it from rendering with stale code.
  • Lazy-load the right way. Load content when it enters the viewport, not after a scroll or click: Google doesn't interact with the page. See lazy loading.

Speed and responsiveness

JavaScript also costs time. While the browser loads, parses and runs scripts on its main thread, clicks and taps wait, and that delay shows up in Interaction to Next Paint, one of the Core Web Vitals. Removing unused scripts and third-party tags you no longer need is a good first step.

Check what Google actually sees

Open URL Inspection in Search Console and look at the rendered HTML and the page resources. If your main text, links or structured data are missing there, Google can't use them. The Rich Results Test shows the rendered HTML too, without needing Search Console access.

Seonio

Put it to work on your own site

Keyword research, traffic, backlinks and clustering in one place. Start with a free $1 to test, no card required.