On this page
What this issue is
Many modern sites (React, Next.js, Nuxt, Vue, Svelte and similar) send HTML from the server first. Then JavaScript runs in the browser and attaches behaviour to that HTML. This step is called hydration.
A hydration mismatch means the browser builds something different from the server HTML. Typical causes are dates, random IDs, window or localStorage checks, and content that depends on the visitor's device or cookies. The framework may throw a console error, discard the server HTML, or leave buttons that do not respond.
Why it costs you leads or sales
Visitors do not wait. If your form, price or buy button is missing for several seconds, many will leave. If hydration fails, the button may be visible but dead, so a click does nothing. Search crawlers and AI tools may also see thin or empty content, which hurts visibility.
- Ad or search clickVisitor lands on the page
- HTML arrivesServer sends markup or an empty shell
- HydrationMismatch or slow script leaves a blank or dead page
- Form or buy buttonMissing or not clickable
- Lead or saleNever happens
The page loads, but scripts fail or take too long, so everything after is lost.
The script stalls, so the visitor sees an empty or broken page.
Example: illustrative numbers showing how a heavy script bundle can lose more visitors as the connection slows. Not real data.
How to check if your site has it
Open the console
In Chrome, open DevTools (F12) and the Console tab, then reload. Look for messages such as 'Hydration failed', 'Text content does not match server-rendered HTML' or 'Minified React error #418, #423 or #425'.
Throttle the network and CPU
In DevTools, open Network and choose 'Slow 4G' or 'Slow 3G'. In Performance, set CPU to 4x or 6x slowdown. Reload and watch what the page shows.
Disable JavaScript
Open the Command Menu (Ctrl or Cmd + Shift + P), type 'Disable JavaScript' and reload. Check whether your headline, text and main call to action still appear.
View the raw HTML
Use View Source (not Inspect). If the body holds only an empty div such as <div id="root"></div>, the content depends fully on scripts.
Try real devices
Open the page on an older phone over mobile data and click the main button. Check it responds.
How to fix it
The fix has two parts: make server and browser output identical, and make sure key content does not depend on slow scripts.
Find the differing element
Use the dev-build error. It usually names the text or attribute that differs. Look for dates, times, random numbers, locale formatting and user-specific values.
Move browser-only logic out of the first render
Do not read
window,document,localStorageor cookies while rendering. Read them after mount, inside an effect, so the first render matches the server.Fix unstable values
Generate IDs with the framework's stable ID tool (for example React
useId) instead ofMath.random(). Format dates with a fixed locale and time zone.Check your HTML is valid
Invalid nesting, such as a div inside a p, makes the browser rewrite the DOM and causes a mismatch. Fix it in the component.
Server-render the key content
Make sure the headline, copy, price and main call to action are in the server HTML, using server-side rendering or static generation rather than client-only rendering.
Cut script weight
Split bundles, lazy-load below-the-fold code, remove unused libraries and defer non-essential third-party tags so hydration finishes sooner.
import { useEffect, useState } from 'react';
export default function Greeting() {
const [name, setName] = useState('');
useEffect(() => {
// Runs only in the browser, after hydration
setName(localStorage.getItem('name') || '');
}, []);
return <p>{name ? `Welcome back, ${name}` : 'Welcome'}</p>;
}Use a dev build to find the mismatch
Run the dev server, open the console and fix each hydration warning at its source.
Render key content on the server
In Next.js or Nuxt, use server rendering or static generation for landing pages instead of client-only components.
Add a fallback
Put essential text and a plain HTML form or link in the server markup so the page is usable if scripts fail.
Check for headless or JS builders
Standard themes rarely have hydration issues. If you use a headless setup or a heavy JS page builder, apply the custom code steps.
Disable plugins one by one
A plugin that rewrites the page with JavaScript, or a caching or minify plugin that breaks scripts, can cause blank sections. Turn off JS combine and delay options to test.
Review theme apps
In Online Store, Themes, Customize, open App embeds and turn off apps that inject content with JavaScript to see if the page recovers.
Hydrogen stores
If you use Hydrogen (React), follow the custom code steps for mismatches.
Check custom code and embeds
Webflow sends full HTML, so blank pages usually come from custom scripts in Site settings, Custom code, or from embeds that build content in the browser. Remove or defer them to test.
Reduce heavy apps and animations
Remove unused apps and large animations from key pages, and test with throttling. Wix controls its own rendering, so your options are mostly page weight and custom code.
Before
- Source shows an empty root div
- Console shows hydration errors
- Button dead on slow connections
- Crawlers see little content
After
- Headline, copy and button in the server HTML
- No hydration warnings
- Button works once scripts load
- Crawlers and AI tools can read the content
How to confirm it's fixed
- The console shows no hydration warnings after a hard reload
- With JavaScript disabled, the headline and main text still appear
- On Slow 4G with 4x CPU slowdown, content shows quickly and the button works
- View Source contains your key copy and call to action
- Submitting the form or starting checkout works from a phone
- Search Console URL Inspection, View tested page, shows the content in the rendered HTML
How to prevent it happening again
- Treat hydration warnings in development as bugs to fix before release
- Keep browser-only code inside effects that run after mount
- Set a script size budget and review it when you add libraries
- Test key pages with throttling before each release
- Add new third-party tags through a tag manager and check their effect on load
- Monitor your main journeys so a broken release is caught fast
How FunnelGuard handles this
FunnelGuard detects this only partly. A robot visitor runs your real journeys on a schedule, such as a lead form or checkout. If the page is blank or the form, button or field never appears because scripts failed, the step reports an element-not-found error. You get one alert, after a second-region re-check, with a screenshot of what the robot saw and a likely cause.
Questions people ask
What is a hydration mismatch?
A hydration mismatch happens when the HTML a server sends differs from what the browser's JavaScript builds on first render. The framework warns in the console and may discard the server HTML or leave parts of the page unresponsive. Common causes are dates, random IDs and browser-only values.
Why is my page blank until JavaScript loads?
The server probably sends an empty shell, such as a single root div, and the content is built entirely by scripts. On slow connections or devices, visitors see white space until the bundle downloads and runs. Server-side rendering or static generation puts the content in the first HTML.
How do I fix 'Text content does not match server-rendered HTML'?
Find the text that differs, usually a date, time, random value or something read from the browser. Make the first render identical on server and browser, and move browser-only values into an effect that runs after mount. Fix date formats by using a fixed locale and time zone.
How do I test my site on slow JavaScript?
In Chrome DevTools, set Network to Slow 4G and CPU to 4x or 6x slowdown in the Performance panel, then reload. You can also disable JavaScript from the Command Menu to see what the raw HTML contains. Check that your headline and main button appear and work.
Does a hydration error hurt SEO?
It can. If key content only appears after scripts run, or hydration fails and the content disappears, crawlers and AI tools may see thin pages. Keeping important text in the server HTML reduces that risk.
Can FunnelGuard detect hydration mismatches?
Only in part. It runs your real journeys and reports an element-not-found error with a screenshot when a form or button does not appear. It does not read console warnings or compare server and browser HTML, so you should still test by hand.
Why does my button not work after the page loads?
Hydration may have failed, so the button is visible server HTML with no click handler attached. Check the console for hydration errors and for script errors, and test with throttling. Fixing the mismatch usually restores the button.
Related issues
- SEO-136Main content only rendered client-side, empty raw HTMLFix guide
- SEO-139JS errors stop the page rendering for crawlersFix guide
- SEO-142Lazy-loaded content requiring scroll never renderedFix guide
- SEO-145Dynamic rendering serves outdated or different content to botsFix guide
- SEO-146Pre-rendering service expired or brokenFix guide
- SEO-137Rendering depends on blocked resourcesFix guide