Guide

Next.js and AI crawlers: is your content in the HTML?

Updated

Usually, yes. Next.js renders pages on the server by default, and its documentation says Client Components are prerendered too, so most of a Next.js page is in the HTML that AI crawlers read. Text goes missing in three common cases: data fetched in the browser after the page loads, components loaded with ssr: false, and content that only exists after a click.

Written by Mattéo Springmann, who makes Lumi GEO, the Chrome extension mentioned at the end. Everything below works without it. Facts checked on November 12, 2026 in the Next.js 16 documentation and in Google's and Vercel's publications (sources at the bottom).

Why it matters: most AI crawlers do not run JavaScript

Vercel and MERJ measured AI crawlers in December 2024: none of the major ones rendered JavaScript, and OpenAI's crawlers downloaded JavaScript files without executing them. Google is different: Googlebot queues pages for rendering in a headless Chromium. Google itself still writes that server-side rendering or pre-rendering "is still a great idea because it makes your website faster for users and crawlers, and not all bots can run JavaScript".

So the question for a Next.js site is not "does Next.js render on the server?" but "is this particular text in the server's HTML?".

What Next.js puts in the HTML, and what it does not

On the pageIn the HTML sent by the server?
A Server Component (the default in the App Router)Yes
A Client Component ('use client')Yes: the Next.js docs say Client Components are prerendered
Data a Server Component fetched before renderingYes
Data a Client Component fetches in the browser (useEffect, SWR, TanStack Query)No, unless a Server Component provides it as initial data
A component loaded with dynamic(..., { ssr: false })No: this option disables prerendering for it
A component that renders null or a loading state until it is mountedOnly the loading state
Tab or accordion content rendered only when openedNo

'use client' alone does not hide text. That is a common belief, and the Next.js documentation contradicts it: "Client components are prerendered during next build."

The test, in under a minute

  1. Open the page in Chrome and press Ctrl+U (Cmd+Option+U on a Mac). This shows the HTML the server sent, before any script runs. Do not use "Inspect": it shows the page after scripts have run.
  2. Press Ctrl+F (Cmd+F) and search for a sentence from the middle of the page, not the title.
  3. Found: crawlers that do not run JavaScript can read it. Not found: the text only exists after JavaScript runs.

Run it on one page of each template (home, product, article), and in production rather than with next dev. On a site with many pages, also look at the text of buttons and links: navigation built only on click is invisible too.

The fixes, ranked by effort

  1. Minutes: render hidden content anyway. For tabs, accordions and "read more" blocks, render every panel and hide the closed ones with CSS or the hidden attribute, instead of creating them on click. A <details> element does it natively.
  2. Minutes: remove ssr: false where it is not needed. The Next.js docs present it for components that rely on browser APIs like window or document. If only one part needs the browser, keep that part client-only and let the text around it prerender.
  3. An hour or so: fetch the data on the server. Make the page or a parent an async Server Component that fetches the data and renders it. If a Client Component must keep managing the data (polling, mutations), the Next.js client-side data fetching guide describes providing initial data from a Server Component: the first render then contains the text.
  4. Bigger: check the static export. With output: 'export', pages are prerendered at build time, but anything fetched in the browser still comes later. Data that changes often may need a server.

How to check that the fix worked

Repeat the view-source test on the deployed site. For Google specifically, Search Console's URL Inspection shows the HTML Google rendered; for AI crawlers, the raw HTML is what counts. The guide to checking if ChatGPT can see your website adds the robots.txt and CDN checks.

Checking it in one click (the tool I make)

Lumi GEO, the free Chrome extension I make, compares the HTML a page sends with what your browser shows, and greys out on the page every block that only exists after JavaScript, so you see which component to fix. Get it on the Chrome Web Store.

Frequently asked questions

Does 'use client' hurt SEO in Next.js?

Not by itself. The Next.js documentation says Client Components are prerendered during the build, so their initial output is in the HTML. What hurts is data they fetch only in the browser, or ssr: false.

Can AI crawlers read a Next.js site?

Mostly, because Next.js renders on the server. Vercel's December 2024 measurements found that the major AI crawlers did not run JavaScript, so anything added in the browser after loading is missing for them.

How do I know which part of my Next.js page is missing?

Open the page source with Ctrl+U and search for sentences from each block. The blocks you cannot find are rendered in the browser.

Sources (checked on November 12, 2026)