AI websites

Step-by-step tutorial

Why Google and AI Search See a Blank Page on Your AI Website

Visitors see your AI website fine, but Google and AI search see an empty page? Check what the first HTML contains, what robots.txt blocks, and what Googlebot actually renders.

Product links on this page are ordinary official links. No affiliate commission is currently attached. Read our disclosure.

Quick answer

Your visitors see the page because their browser runs your JavaScript. A search crawler may only see the first HTML response — and if your main text is not in it, the crawler sees an empty shell.

Googlebot does run JavaScript, but rendering happens in a queue after crawling, and it can be delayed. Other search and AI crawlers may not run JavaScript at all. The fix is to make your main text, links and title part of the first HTML the server sends, and to make sure no robots.txt rule blocks the files the page needs.

This guide is for a page that looks fine to visitors but shows up empty — or not at all — in search results. If visitors themselves see a blank page, use the blank page guide instead: that is a different failure with different causes.

Before you start

You need the exact page URL, a desktop browser, and access to Google Search Console for the site. If you do not have Search Console set up, you can still do steps 1 and 2; step 3 needs it.

Keep a saved copy of the site before changing anything, and change one thing at a time so you can tell which change helped.

Your route: See what a crawler sees → Check what robots.txt blocks → See what Googlebot rendered → Fix the page so its text is in the first HTML → Re-test.

1. See what a crawler sees: read the page source

A visitor’s browser builds the visible page by running JavaScript. A simple crawler reads the HTML the server sends first, before any JavaScript runs. Comparing the two tells you whether your content depends on JavaScript to exist at all.

Open the page in your browser and view its source — in most browsers, right-click the page and choose “View page source”, or type view-source: before the URL in the address bar. Then search the source (Ctrl+F or Cmd+F) for a distinctive sentence from the page: your main heading, or a phrase from the first paragraph.

  • The text is in the source. Your content reaches crawlers in the first response. The blank-page problem is more likely a blocked file or a rendering delay — continue to step 2.
  • The text is not in the source. The page body is built by JavaScript after loading. What you see in the source is probably a mostly empty container, such as <div id="root"></div>, plus script tags. This is the most common cause of the problem in this guide, and the fix is in step 4.

Also check the title in the source. If the <title> is a generic placeholder such as “React App” or “Vite App”, search engines may show that placeholder instead of your real title, even when the visible page has the right one. Note it down: it is part of the same repair.

Do not be reassured by a fast page. A page can load instantly for a visitor and still send almost no content in its first HTML response.

2. Check what robots.txt blocks

Google documents that Googlebot reads your robots.txt file before fetching a page, and that it will not render JavaScript from blocked files or on blocked pages. A single over-broad rule can therefore hide a page that is otherwise fine.

Open https://your-domain.com/robots.txt in your browser (replace the domain with yours) and read it. Look for lines that disallow the folders holding your scripts and styles — commonly /assets/, /static/, or a JavaScript folder. A rule such as Disallow: /assets/ blocks the very files the page needs to render.

Also check whether the page URL itself is disallowed. If it is, Google will not fetch the page at all, and no rendering fix will help until that rule changes.

If you find a blocking rule, do not edit robots.txt yet. Note the exact line, and ask your AI coding assistant to explain why it is there. One caution about what robots.txt is not: it is not access protection. It only tells compliant crawlers where not to go — anyone can ignore it, so a file that must stay private needs real access control, such as a login, not a Disallow line. Unblocking the page’s public files therefore does not expose anything that is properly protected. The repair in step 4 includes asking the assistant to unblock only the files the public page needs.

If your site has no robots.txt file, that is fine: an absent file means nothing is blocked by it, and you can move on.

3. See what Googlebot actually rendered

Guessing from the source is not enough. Google Search Console’s URL Inspection tool shows you what Googlebot fetched and rendered for a specific URL, including a screenshot of the rendered page and the HTML it saw.

In Search Console, open URL Inspection, enter the page URL, and choose “Test live URL”. Know what that test is: it fetches your page fresh, at the moment you run it, and renders that copy — it shows whether Google can render the page as it exists now. It is not the copy Google has stored from its last regular crawl; for that, read the inspection result without running a live test. A page can pass the live test today and still appear in search as the old, empty stored version until the normal crawl and render queues reach it again.

When the test finishes, open “View tested page” and look at two things:

  • Screenshot. Does it show your heading and main text, or an empty shell? An empty screenshot confirms the crawler sees a blank page even though visitors do not.
  • HTML. Search the tested HTML for your main heading. If it is missing there too, the content never reached the rendered page.

Google processes JavaScript pages in three phases — crawling, rendering, then indexing — and a page can wait in the rendering queue for seconds or longer before a headless browser runs its scripts. So a page that is new, or was only recently changed, may simply not have been rendered yet in the copy Google has stored. That is different from a page that can never be rendered: check the stored inspection result again after a day or two before concluding the page is broken.

Record what the test showed, with the date. You will compare it with the re-test in step 5.

4. Worked example: a bakery page that only exists after JavaScript

Prepared example, not a recorded site test. A fictional bakery site has a homepage that visitors see perfectly: a heading, opening hours and a menu. Search results show nothing but the domain name.

These are the supplied observations:

  • The page returns 200 and looks complete in a browser.
  • Viewing the page source shows an empty <div id="root"></div> and script tags. The heading “Fresh sourdough, baked every morning” appears nowhere in the source.
  • The site’s robots.txt contains Disallow: /assets/, which blocks the folder holding the site’s JavaScript files.
  • The URL Inspection test shows a blank screenshot and no heading in the tested HTML.

The supported conclusion is narrow: crawlers receive almost no content in the first HTML, and the JavaScript files that would build the page are blocked from Googlebot. Either problem alone could hide the page; this site has both.

A useful repair brief for the site’s AI coding assistant would be:

Fix this page so search engines can read it, without changing how it looks to visitors.
Page: [exact URL]
Observations: the main heading and text are missing from the page source; robots.txt blocks /assets/; the Search Console URL Inspection test shows a blank screenshot.
Do not edit or publish yet. Report:
- how to put the main text, links and title into the first HTML the server sends;
- which robots.txt lines block public page files, and the smallest change that unblocks them;
- what will change in the build, and how to undo it.
Do not change the design, the wording or any other page.

The durable fix Google recommends is server-side rendering or pre-rendering: the server sends HTML that already contains the main content, instead of an empty shell that JavaScript fills in afterwards. Google notes this also makes the site faster for users and crawlers, and that not all bots can run JavaScript. Dynamic rendering — sending crawlers a pre-rendered copy while visitors get the JavaScript version — is a workaround Google describes as not a long-term solution, so prefer the server-side or pre-rendered route when your builder offers it.

After the repair, the expected checks are: the heading appears in the page source, robots.txt no longer blocks the page’s public files, and the URL Inspection test shows the heading in the screenshot and the tested HTML. These are expected outcomes to verify, not a claimed successful fix.

5. Re-test, then wait before judging

After the repair is published, repeat step 3 on the same URL: run “Test live URL” again and compare the new screenshot and HTML with the ones you recorded. If the heading now appears, Google can render the repaired page on a fresh fetch. The version search shows updates only after the normal crawl, render and indexing queues reach the page again.

Then, in URL Inspection, choose “Request indexing” for the page. This asks Google to crawl it again; it does not guarantee a ranking or immediate appearance in results.

Allow time. Rendering is queued, and indexing follows rendering, so a page that is fixed today may still take days to show up properly in search results. If a re-test after several days still shows a blank screenshot, go back to steps 1 and 2: something is still blocked, or the content is still only built by JavaScript.

If the page appears in Google but not in an AI search answer, remember the FAQ above: not every crawler renders JavaScript the way Googlebot does. A page whose text is in the first HTML is readable by the widest range of crawlers; a page that depends on JavaScript is a gamble with each new one.

Sources and limits

Official sources checked November 19, 2026: Google Search Central’s Understand JavaScript SEO Basics (crawl, render and index phases; robots.txt blocking; server-side or pre-rendering recommendation), Dynamic rendering as a workaround (dynamic rendering described as a workaround, not a long-term solution), and Introduction to robots.txt (robots.txt manages crawler traffic; it is not a mechanism for keeping a page private or out of search).

The bakery example, observations and repair brief were prepared for this tutorial. No live site, customer incident or successful repair is claimed. This article helps you find out what a crawler sees and what to ask your builder to change; it does not guarantee a ranking or a date by which a page will appear in search results.

Questions & answers

Does Googlebot run JavaScript?

Yes, Googlebot can run JavaScript, but rendering is a separate queued step after crawling, and it can be delayed. Content that only appears after JavaScript runs may therefore be indexed later than content already in the first HTML response — and only if the page and its scripts are not blocked.

If I fix robots.txt, will Google see my page straight away?

Not immediately. Unblocking the files lets Google fetch and render them, but the stored copy still has to pass through the crawl and render queues. A live URL test in Search Console can confirm the page renders now; allow time before judging what search actually shows.

Do AI search engines see JavaScript pages the same way Google does?

Not necessarily. Google documents a JavaScript rendering step; other crawlers are not documented to run JavaScript the same way. A page whose main text is already in the first HTML response is the safest for every crawler, which is why the durable fix is the same for all of them.