If your single-page application (SPA) looks perfect in a browser but shows up blank in Google Search or AI-driven results, you are likely serving an empty HTML shell. The core issue is simple: human visitors run JavaScript to build the page, but many crawlers read the initial server response before any scripts execute. If your main content isn't in that first HTML payload, the crawler sees nothing. This isn't just a Google problem; many AI search crawlers skip JavaScript execution entirely, making server-side content critical for visibility.

Diagnose Before You Deploy

Stop guessing and start inspecting. Open your page source (view-source:) and search for your main heading. If it's missing, you have a rendering dependency. Next, check your robots.txt file. A common mistake is blocking /assets/ or /static/ folders, which often contain the JavaScript needed to render the page. Googlebot respects these rules and won't render blocked files. Use Google Search Console's URL Inspection tool to see exactly what Googlebot fetched. If the screenshot is blank, your content never made it to the rendered DOM.

The Practical Fix: Server-Side Rendering

The durable solution recommended by Google is server-side rendering (SSR) or pre-rendering. Instead of sending an empty

and waiting for client-side JS to populate it, the server sends HTML that already contains the main text, links, and title. Dynamic rendering, which serves a pre-rendered copy to bots and the JS version to users, is considered a workaround, not a long-term fix. For builders, this means configuring your framework (Next.js, Remix, Astro, etc.) to output fully hydrated HTML on the server. This also improves performance for real users, killing two birds with one stone.

AI Search and the Bot Landscape

With the rise of AI search engines, relying on JavaScript execution for content visibility is a gamble. Not every bot renders JS the way Googlebot does. Some AI crawlers are lightweight and strictly parse the initial HTML response. If your content is hidden behind a JS bundle, you are invisible to these emerging search surfaces. Ensure your meta tags, titles, and primary content are present in the first byte of the response. This makes your site resilient across the fragmented landscape of modern crawlers.

Key Takeaways

  • View page source first: If your headline isn't there, bots can't see it.
  • Audit robots.txt: Ensure you aren't accidentally blocking your own JS bundles.
  • Use URL Inspection: Verify what Googlebot actually renders, not just what it fetches.
  • Implement SSR or Pre-rendering: This is the only reliable way to guarantee content visibility for all crawlers.
  • Don't rely on Dynamic Rendering: It's a temporary patch, not a sustainable architecture.

The Bottom Line

Shipping an empty HTML shell is a legacy mistake that hurts both SEO and performance. Stop treating crawlers like second-class citizens; give them the same content you give users, and do it in the first response.