Preferences

Privacy is important to us, so you have the option of disabling certain types of storage that may not be necessary for the basic functioning of the website. Blocking categories may impact your experience on the website. More information (Cookie Policy)

JavaScript SEO in 2027: Rendering, Indexing and AI Crawlers

JavaScript SEO guide: how Google crawls, renders and indexes JS pages, CSR vs SSR vs static rendering, why AI crawlers often miss JS content, and how to test and fix it.

Published on
16/10/2026
Updated on
16/10/2026
Reading time
16 min
JavaScript SEO in 2027: Rendering, Indexing and AI Crawlers

Tools

On this page

In short

JavaScript SEO makes sure that content and links generated by JavaScript can be crawled, rendered and indexed. Google can render JavaScript, but in a separate step that can be delayed and that fails when scripts are blocked or need a click. Many AI crawlers do not execute JavaScript at all. The safest setup is server-side rendering or static generation, real "a href" links, and the important content present in the initial HTML.

Want to go further? Ask

Quick quiz

Who should fix the technical side of your site?

Question 1 of 425%
What is happening today?

Modern frameworks such as React, Vue, Angular or Svelte build pages in the browser. That is great for interactivity and risky for visibility. JavaScript SEO is the set of practices that keeps a JS site readable by search engines and by the AIs. This guide explains how Google processes JavaScript, the rendering options, the common mistakes and how to test your pages.

How does Google process JavaScript pages?

In three phases: crawling, rendering, indexing. Google Search Central describes the pipeline this way:

  1. Crawling: Googlebot fetches the URL and reads the raw HTML. Links found here are queued immediately.
  2. Rendering: the page waits in a render queue, then a headless Chromium runs the JavaScript and builds the final page.
  3. Indexing: Google analyzes the rendered content, then decides whether and how to index it.

The consequence: anything missing from the raw HTML depends on the rendering step succeeding. If a script fails, times out or is blocked by robots.txt, Google indexes what it saw before, which may be an empty shell.

What is the difference between CSR, SSR and static rendering?

The difference is where the HTML is built: in the browser, on the server for each request, or once at build time.

Rendering modeHow it worksSEO impact
Client-side rendering (CSR)Server sends minimal HTML; JavaScript builds the page in the browserHighest risk: content depends on rendering, often invisible to AI crawlers
Server-side rendering (SSR)Server builds full HTML for each request, then JavaScript hydrates itSafe: content and links in the first HTML
Static generation (SSG)HTML generated at build time and served as filesSafest and fastest for content pages
Hybrid (SSR or SSG plus islands)Static or server HTML, JavaScript only for interactive partsGood balance for most sites
Dynamic renderingBots receive a pre-rendered version, users the JS appWorkaround that Google no longer recommends

Frameworks such as Next.js, Nuxt, SvelteKit or Astro make SSR and static generation the default for content pages. For a blog, documentation or product pages, there is rarely a reason to render content only in the browser.

SSR vs SSG vs ISR: Which Rendering Mode Should You Choose?

Static site generation (SSG) builds the HTML once, at deploy time. Server-side rendering (SSR) builds it again for every request. Incremental static regeneration (ISR) serves static pages, then rebuilds each one in the background after a set interval. All three put your content in the first HTML response, so none of them hides text from crawlers by default. They differ in how fresh that HTML is and what it costs to serve.

Pick SSG for content that changes rarely. Pick SSR when each request needs current data. Pick ISR when you have thousands of pages that change now and then and a full rebuild takes too long.

How each mode behaves

  • SSG: the server returns a prebuilt file. It is the fastest option and the cheapest to host on a CDN, but a change only appears after the next build.
  • SSR: the server runs your code for every request. The content is always current, but each uncached request costs server time, and a slow database slows the response Googlebot receives.
  • ISR: a page is built once and then cached. After the interval passes, the next visitor still gets the cached page, while a new version is generated in the background. The request after that gets the update.

What ISR means for search engines and AI crawlers

With ISR, Google and AI crawlers can read a version of the page up to one interval old. Next.js advises a long interval, such as one hour, and on-demand revalidation for changes that must show at once. On-demand revalidation clears the cache when your data changes, and the next request regenerates the page.

import { revalidatePath } from 'next/cache'

// In the page file: regenerate at most once an hour
export const revalidate = 3600

// In a Server Action, after a post is saved
revalidatePath('/blog')

Mistakes to avoid

  • SSR for pages that never change. You pay for server work on every visit with no gain in freshness.
  • A very short ISR interval. Each regeneration uses compute, and on platforms that bill per request, the background work counts as extra cost.
  • Several servers with a local cache. The default cache lives on each instance, so on-demand revalidation only clears the instance that received the call. Use a shared cache handler.
  • Testing ISR in development. Run next build and next start instead, then check the x-nextjs-cache header, which shows HIT, STALE, MISS or REVALIDATED.

Which mode fits which page

PageModeWhy
Blog post, docs page, landing pageSSGChanges rarely, and prebuilt files are the fastest to serve
Product page with a changing price or stock countISR with on-demand revalidationCached for speed, refreshed when the data changes
Catalogue with thousands of pagesISRBuild the popular pages, generate the rest on the first request
Page that depends on the visitor or the requestSSREach response can differ, so caching it for everyone is wrong

Whatever you pick, check the raw HTML of each page template. Google's JavaScript SEO basics guide says server-side or pre-rendering is still a great idea, because not all bots can run JavaScript. For framework-specific setup, read our guides to Next.js SEO and Astro SEO. The ISR behavior described above comes from the Next.js documentation on incremental static regeneration.

Is dynamic rendering still a good option for JavaScript SEO?

No, not as a long-term plan. Google calls dynamic rendering a workaround, not a recommended solution, because it adds complexity and resource needs. It can work for a while, as long as bots and users get similar content. Plan to move to server-side or static rendering.

Here is how it works. Your server checks the user agent of each request. Bots that cannot run JavaScript are sent to a rendering service, which returns a static HTML version of the page. Human visitors get the normal JavaScript app. You now run two render paths, and they can drift apart over time.

The main caveat is cloaking. Google does not treat dynamic rendering as cloaking as long as the content is similar. Serving completely different content to users and crawlers can be treated as cloaking (Google Search Central, dynamic rendering documentation).

How to move off dynamic rendering

  1. List the templates that depend on JavaScript for their main text, links and metadata.
  2. Pick SSR or static generation for each template. Content pages usually fit static generation.
  3. Save the raw HTML of a few URLs before the change, then compare it with the new output.
  4. Remove the user agent check and the rendering service once the raw HTML matches what users see.
OptionWhat Google getsMaintenance
Client-side rendering onlyAn empty shell in the first response, rendered later by GoogleLow to build, hard to debug for SEO
Dynamic renderingPre-rendered HTML for botsHigh, two render paths to keep in sync
SSR or static generationFull HTML for every crawlerModerate, one render path

For framework details, read our guides to single-page application SEO and React SEO.

What are the most common JavaScript SEO mistakes?

Most issues come from content or links that only exist after an interaction.

  • Links without href: navigation built with click handlers on "div" or "span" elements is not followed. Use real "a href" links.
  • Content behind interactions: text loaded only after a click, a tab change or infinite scroll may never be rendered by Googlebot.
  • Blocked resources: JavaScript or API files disallowed in robots.txt prevent rendering.
  • Metadata set late: titles, canonicals or noindex tags changed by JavaScript can conflict with the raw HTML.
  • Hash URLs: fragments such as "/#/product" are not treated as separate pages; use the History API and clean paths.
  • Soft 404s: a single-page app that shows "not found" with a 200 status code confuses indexing.
  • Heavy bundles: large scripts slow rendering, hurt Core Web Vitals and increase the risk of timeouts.

Why does JavaScript matter for AI visibility?

Because most AI crawlers read the raw HTML only. Crawler log analyses, such as Vercel's 2024 study of AI crawler traffic, found that the bots of OpenAI and Anthropic fetch JavaScript files but do not execute them. A page whose text appears only after JavaScript runs may look empty to the systems that feed ChatGPT, Claude or Perplexity, even if Google indexes it correctly.

If being cited by the AIs matters to you, put the main answer, headings, tables and links in the server HTML, and check that your robots.txt lets the AI crawlers you want in. Our guide on robots.txt for AI crawlers lists the main bots, and the AI crawlability audit shows what they can read on your pages.

Does an H1 that only appears after rendering count?

For Google, yes: it indexes the rendered page. For a crawler that reads only the server response, an H1 that is empty at first gives no topic line at all. Put the H1 in the server HTML, with the words that describe the page.

The usual cause is a heading filled from an API call after the page loads. The h1 element exists, but it stays empty until the data arrives.

// Empty in the raw HTML: the text arrives after fetch finishes
function Title() {
  const [title, setTitle] = useState('')
  useEffect(() => {
    fetch('/api/title').then(r => r.json()).then(d => setTitle(d.title))
  }, [])
  return <h1>{title}</h1>
}

The fix is to load the data on the server, so the heading arrives with the first response. In frameworks such as Next.js, fetch the data in the server-rendered page component, not in an effect that runs in the browser.

  • Use one H1 per page, and make it the main topic of that page.
  • Check each template with curl, and confirm the H1 text appears in the output.
  • Check the heading outline with the heading analyzer after each release.

Headings also matter when no script runs. Screen readers, text-only browsers and some AI crawlers all start from the server HTML. If the H1 is blank there, the page has no visible topic until the script finishes, and a failed script leaves it blank.

Another common problem is an H1 that repeats the site name, a logo or a generic label such as Home. The heading should name the page topic, such as the product, article or category. Keep it close to the title tag, but not identical, so the two signals add information.

Also test a direct load of each URL, not only navigation from the home page. In single-page apps, a route change can update the title without updating the H1 in the first response. A direct load is what a crawler does, so it shows the real result.

Our H1 tag guide covers what Google says about headings, and the heading analyzer shows the H1 to H6 structure of any page.

Is a canonical tag added by JavaScript enough?

Google does read it. Google's documentation says it picks up an injected canonical URL when it renders the page. But a canonical that exists only after rendering depends on a step that some crawlers skip, and a canonical that disagrees with the raw HTML gives Google two signals to reconcile.

A canonical is a hint, not a command. Google chooses the canonical from several signals, including redirects, the canonical tag, internal links and sitemaps. Keep them consistent so the choice does not depend on rendering.

What a correct canonical looks like

<link rel="canonical" href="[absolute URL of this page]">
  • One canonical per URL, in the server HTML.
  • An absolute URL, with the protocol and host you want indexed.
  • A self-referencing canonical on any page that should be indexed on its own.
  • No canonical that points to a page that redirects or returns a 404.

Tip

Compare the canonical in the raw response with the one in the rendered page. If they differ, fix the server first.

Canonical mistakes are common after a migration. A template may keep the old domain, an http address or a trailing slash that the site no longer uses. Each variant gives Google another URL to choose from, and the wrong one may rank. Compare the canonical on each new page with the URLs in your sitemap, since both should list the same address.

Filtered lists need a decision. A page such as /shoes?color=red with no unique content should point its canonical to the main category. A page with unique content worth indexing can point to itself. A single canonical set on the server keeps that decision in one place, where both search engines and AI crawlers read it in the first response.

Search Console shows the canonical Google selected for a URL in URL Inspection. If it differs from the one you declared, check redirects and internal links first, since they often explain the difference.

To check a page quickly, use the canonical checker, and read the canonical tag guide for the full rules.

What happens when the title and meta description only appear after JavaScript runs?

Google can use them. Google's documentation says you can set the title and the meta description with JavaScript, and that Google uses the rendered HTML to index the page. The risk is the other crawlers, the ones that read only the server response. Many AI crawlers do not render, so they see whatever the first response contains.

A common failure is a shared shell. A single-page app often ships the same title and description in the raw HTML for every route. Google may correct them after rendering, but a crawler that stops at the first response sees one title for the whole site.

How to set them correctly

  • Write the title and meta description on the server, for each route, in the first response.
  • Give each URL one title and one meta description. Do not inject a second value later.
  • Check the raw HTML with curl, and check the rendered page in URL Inspection.

Robots directives need the same care. Google's documentation says that when it finds a noindex tag, it may skip rendering and JavaScript execution, so a noindex added by JavaScript may not work as expected. Put robots tags in the server response.

Check what your server sends before you trust any tool. Run curl on a few URLs from each template and read the title line. If every URL returns the same title, the shell problem is present even if the rendered page looks correct. Tools that show the rendered DOM hide this, so the raw response is the test that matters.

<title>Rendering Checks for JavaScript Sites</title>
<meta name="description" content="How to check titles and meta descriptions in the server HTML before Google renders the page.">

Length matters too. Google often rewrites titles that are long, vague or repeated, so write a title that names the page topic once. Keep the meta description a clear summary, written for the reader who sees it in the results. Google may pick a different snippet, but a clear description still gives it the best text to choose from.

For the basics, see our guide to the title tag and our React SEO guide.

Injected links are fine when they are real anchor elements. Google says it can only discover links that are a elements with an href attribute, and it allows JavaScript to inject them into the page. Links built from click handlers, or links that exist only inside the app's router, may never be followed.

<!-- Not discovered: no href, the router does the work -->
<span class="card" onclick="goTo('/pricing')">Pricing</span>

<!-- Discovered: a real link with a crawlable URL -->
<a href="/pricing">Pricing</a>
Link patternFound by GoogleFix
a href in the server HTMLYesNone
a href added by JavaScript after loadYes, after renderingPut key links in the server HTML
span or div with onclickNoUse a real a href
Hash routes such as /#/pricingNo separate pageUse the History API and clean paths

Links added after rendering arrive later. Googlebot queues the page for rendering, and Google's documentation says the page can wait in that queue for a few seconds or longer. Key navigation should exist in the first response, so it is found on the first crawl.

Tip

List the links in the raw HTML, then compare the list with the links in the Elements panel. Any path that appears only in the rendered list depends on JavaScript.

curl -s https://www.example.com/ | grep -o "href=\"[^\"]*\"" | sort -u

To review internal linking across the site, see our guide to internal linking strategy and the internal link analyzer.

How do you test JavaScript SEO?

Compare the raw HTML with what Google renders.

  1. View the page source (not the inspector): if your main content is missing, it depends on JavaScript.
  2. Use the URL Inspection tool in Google Search Console and look at the rendered HTML and the screenshot.
  3. Run the Rich Results Test, which also shows rendered HTML for any public URL.
  4. Disable JavaScript in your browser to see roughly what non-rendering crawlers get.
  5. Crawl the site with a crawler in JavaScript mode and without it, then compare the links and words found.
  6. Check indexing status of key URLs with an indexability checker.

How do you check whether a page's text comes from JavaScript?

Search the raw HTML for a sentence from your main text. If the sentence is missing from the server response but visible in the browser, JavaScript adds it. Google can index it after rendering, but AI crawlers that skip rendering will not see it.

curl -s https://www.example.com/blog/your-post | grep -c "a unique sentence from your article"

A result of 0 means the sentence is not in the server HTML. A result of 1 or more means it is. Then open the page in a browser, press Ctrl+F in the Elements panel, and search for the same sentence. If it appears only there, the text is rendered on the client.

Where the sentence appearsWhat it meansAction
In the curl outputServer HTML, read by every crawlerNothing to fix
Only in the Elements panelAdded by JavaScriptMove it to server rendering if it matters
In neitherNot on this URL, or shown only after a clickCheck the route, the cache and the interaction

Pick a sentence that appears only once on the page. A page title or a menu label appears in many places and proves little. Also remember that text inside a JSON block in a script tag can match your grep without being visible on the page. Check the visible copy before you trust a match.

Tip

Test a template, not one URL. A single post can pass while every other post in the same template is empty.

For a wider crawl check, read our guide to crawlability.

What is a JavaScript SEO checklist?

Six rules cover most cases:

  • Main content, title, meta description and canonical present in the initial HTML.
  • Internal links as "a href" elements with crawlable URLs.
  • No JavaScript, CSS or API files blocked in robots.txt.
  • Correct HTTP status codes for missing pages and redirects.
  • Lazy loading only for below-the-fold media, never for main text.
  • Rendering tested in Search Console after each major front-end release.

Conclusion

JavaScript and SEO work together when the content does not depend on JavaScript to exist. Render content pages on the server or at build time, keep links real and test what Google and the AIs actually see. Sorank publishes its articles as clean HTML directly in your CMS, with internal links and structured data, on autopilot: see the plans and the 3-day free trial.

Which checks should run on every release?

The six rules above cover the main risks. For each release, turn them into a short set of tests against the server response, then confirm the result with a rendered check in Search Console.

CheckHow to run itPass when
Main text in the server HTMLcurl with a unique sentenceThe sentence appears in the output
Title and meta descriptioncurl, then grep the title and the meta description tagsOne value of each, specific to the page
Canonicalcurl, then grep the canonical linkOne absolute canonical that matches the URL
Status codecurl -I200 for live pages, 301 for moved pages, 404 or 410 for removed pages
Linksgrep the href valuesKey navigation appears as href values in the HTML
robots.txtOpen /robots.txtNo Disallow rule on JavaScript, CSS or API paths
Rendered resultURL Inspection in Search ConsoleRendered HTML and screenshot match the design
curl -s -o /dev/null -w "%{http_code}\n" https://www.example.com/blog/your-post
curl -s https://www.example.com/blog/your-post | grep -o "<title>[^<]*</title>"

Start with a small set of URLs. Pick one page from each template, such as the home page, a product, an article and a category, and run the checks on those. Template-level checks catch most regressions, and a full site crawl can run later on a schedule.

Store the results so you can compare releases. A simple log with the URL, the status code, the title and the length of the main text shows the change after each deploy. A sudden drop in text length often means a script stopped rendering content on the server, and a log catches that faster than a traffic report.

Do not rely on a passing check alone. A page can return 200 and show the right title while its content loads from a failed API call. Pair the curl checks with a rendered check on a few URLs each week, and watch the page indexing report in Search Console for new errors.

Run these commands in your deployment pipeline, and fail the build when a page returns the wrong status or loses its main text. Read the SEO for developers guide for status codes and tags, and the guide to blocked by robots.txt if a rule catches your bundles.

Frequently asked questions

Can Google crawl JavaScript websites?

Yes. Google renders pages with a recent version of Chromium, so it can see content added by JavaScript. Rendering happens after crawling, sometimes with a delay, and fails if scripts are blocked, too slow or depend on user actions. Content present in the initial HTML is always the safest option.

Is client-side rendering bad for SEO?

Not automatically, but it adds risk. With client-side rendering the first HTML is almost empty, so search engines must run JavaScript to see the content, and many AI crawlers do not. Server-side rendering or static generation deliver the content directly and avoid these problems.

Do AI crawlers execute JavaScript?

Most do not today. Analyses of crawler logs, such as the one published by Vercel in 2024, found that the crawlers of OpenAI and Anthropic download JavaScript files without executing them. Content that only appears after JavaScript runs is therefore often invisible to ChatGPT, Claude and similar assistants.

Get your content plan for 30 days for free

We analyse your competitors, your website and your AI visibility to create a tailored content plan for free.

Our free SEO tools

See all our free tools

Get your content plan for 30 days for free

We analyse your competitors, your website and your AI visibility to create a tailored content plan for free.

Man with dark hair and beard wearing a light brown shirt speaks in front of a microphone on a podcast or recording setup.Portrait of a man with short dark hair wearing a white shirt and dark jacket, looking directly at the camera with a neutral expression.Man with short dark hair, beard, and clear glasses wearing a black t-shirt with a white circular logo, standing in front of a stone wall.Celio fabianoSmiling young woman with long brown hair wearing a red top and necklace, outdoors in a tree-filled background.Profile photo of Xavier Breull, Sorank customer
Google
Solid yellow five-pointed star icon on transparent background.Solid yellow five-pointed star icon on transparent background.Solid yellow five-pointed star icon on transparent background.Solid yellow five-pointed star icon on transparent background.Solid yellow five-pointed star icon on transparent background.
5/5
+5,000
users

Testimonials from ambitious founders

0 to 10000 visitors in 5 months

Celio Fabianomonrobotlavevitre.frGoogleE-commerce

0 to 5000 visits in 8 months

Thibault BMsorank.comGoogleSoftware

0 to 1104 clicks in 4 months

Dominiqueflight-sensations-idf.comGoogleLeisure and aviation

0 to 163 clicks in 6 months

Coworking Pariscoworking-paris.frGoogleOffice broker

x92 clicks in 7 months

Guide Zanzibarguidezanzibar.comGoogleTravel