1. Server renders components to HTML
- Where
- Server
- State of the page
- Complete content, no behavior
Hydration attaches JavaScript to server-rendered HTML so the page becomes interactive. What can go wrong, how mismatches happen, and how to check server HTML.
Hydration is the step where a JavaScript framework attaches to HTML that was already rendered on the server, then takes over managing that DOM so the page responds to clicks. In React, hydrateRoot does this. For SEO, the point is that the server HTML should already contain your content, and the hydrated page should match it.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
hydrateRoot runsReact's reference says hydrateRoot attaches to the HTML inside the DOM node you give it and takes over managing the DOM there. If there is no pre-rendered HTML, it says to use createRoot() instead, which renders from scratch in the browser. That second path is client-side rendering.
typeof window !== 'undefined' checks in renderingwindow.matchMedia during render// Mismatch: server renders one value, browser another
function Greeting() {
const w = typeof window !== 'undefined' ? window.innerWidth : 0;
return <p>{w > 600 ? 'Wide' : 'Narrow'}</p>;
}
// Safer: render the same thing first, then update after hydration
function Greeting() {
const [wide, setWide] = useState(false);
useEffect(() => setWide(window.innerWidth > 600), []);
return <p>{wide ? 'Wide' : 'Narrow'}</p>;
}React says hydrateRoot expects content identical to the server render and tells you to treat mismatches as bugs. It can recover from some errors, but the worst case is event handlers attached to the wrong elements, and it gives no guarantee that attribute differences are patched. For an unavoidable difference such as a timestamp, suppressHydrationWarning works one level deep and is an escape hatch. React does not repair mismatched text content.
curl -s https://example.com/page | grep -c '<h1'
curl -s https://example.com/page | grep -o '<title>[^<]*</title>'document.querySelector('h1')?.textContent
document.titleRun the curl lines. Your headline, main copy, links and title should appear in this output.
Open DevTools, then compare the console output with what curl printed. They should agree.
In development, React warns about mismatches during hydration. Fix every warning.
Run the URL Inspection tool and open the rendered HTML. Google says content missing there cannot be indexed.
2 questions people ask next, answered from the sources on this page.
No. Server-side rendering produces the HTML on the server. Hydration is the later browser step that attaches JavaScript to that HTML. A server-rendered React page typically uses both.
Not by itself. The risk is a mismatch between server and client output, or content that only exists after hydration. Verify with the raw HTML and the rendered HTML in Google's tools.
The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.