# JavaScript and SEO: can Google and ChatGPT read your website?

> Many modern sites only add their text with JavaScript. See how Google reads that, why AI robots often can't and how to test what a robot sees in five minutes.

A site can look perfect to you and empty to a robot. That happens when the text only lands in the page after the browser has run JavaScript. Google can usually cope with that, after a delay. Many AI robots can't. I'll explain how Google reads a page like that, what AI robots do, what my own log shows and how to test in five minutes what a robot sees of your page.

> Short answer: Google can run JavaScript, but it does so later and only sees what's in the page after that. Many AI robots don't run JavaScript: in my log, ChatGPT-User fetched something from my site 196 times in 30 days, and not a single script. So put your important text, prices and links in the HTML the server sends, using server-side rendering or pages built in advance. You can test it with View page source.

## How does Google read a page with JavaScript?

Google describes three phases: crawling, rendering and indexing. First, Googlebot fetches the HTML. Then the page joins a queue to have its JavaScript run. According to Google, that can take a few seconds or longer, and it happens as soon as Google has room for it. Only after that does Google index what's in the page at that point.

- Google only sees what's in the page after the JavaScript has run. If a piece of text only appears on a click, Google doesn't see it.
- Google only finds links that are an a element with an href address.
- Use ordinary addresses for your pages rather than addresses with a hash sign, such as /#/services.
- If a page is set to noindex, Google may skip running its JavaScript.

## What about AI robots?

Google itself adds that not all robots can run JavaScript. A hosting company in the United States studied AI robot traffic on its network at the end of 2024 and found that the big AI robots from OpenAI, Anthropic and Perplexity, among others, didn't run JavaScript. Some did fetch the scripts, but didn't run them. Gemini, which works through Google, and Apple's robot could. I couldn't find a newer measurement. The figures come from their own publication of December 2024, which I reread on 27 November 2026.

My own log fits that picture. In the 30 days up to 27 November 2026, ChatGPT-User, the robot that opens a page when someone asks ChatGPT something, fetched something from meneermarketing.nl 196 times, 131 of them the homepage. Apart from robots.txt three times and one separate file, they were all pages. It didn't fetch a single script, stylesheet or image. GPTBot and ClaudeBot did fetch scripts, but you can't see in a log whether a robot also runs them. So what ChatGPT reads live from your site is the HTML as your server sends it. Which robot is which is in [which AI robots read my site](https://meneermarketing.nl/en/knowledge-base/which-ai-robots-read-a-website-my-own-log).

## Three ways to build a page

| Approach | What happens | What a robot without JavaScript sees |
| --- | --- | --- |
| Building in the browser | The server sends an almost empty page, and JavaScript fills in the text | An empty page, or just the menu |
| Building on the server | On every visit, the server puts the text in the HTML | The full text |
| Building in advance | The pages are prepared when the site is built | The full text, and the page loads fastest |

Google still calls rendering on the server or in advance a good idea, because it makes your site faster and not every robot runs JavaScript. My own site is built in Next.js and prepares most pages in advance, with the text already in them. JavaScript then only handles what moves and what you can click. There's more on Next.js in [what is a Next.js website](https://meneermarketing.nl/en/questions/website/what-is-a-nextjs-website-and-why-do-businesses-choose-it).

## How to test what a robot sees

| Test | How | What you learn |
| --- | --- | --- |
| Page source | Open your page, press Ctrl+U and search for a sentence from your text with Ctrl+F | Whether the text is in the HTML from the server, the way an AI robot gets it |
| Without JavaScript | Turn off JavaScript in your browser settings and reload the page | What the page looks like to a robot that doesn't run scripts |
| URL Inspection | In Search Console, enter the address, run the live test and open View tested page | What Google sees in the page after running the JavaScript |
| Rich Results Test | Enter your address in Google's test and look at the HTML | The same, without needing access to Search Console |

Run the test on your homepage, a service or product page and your prices page. If the sentence is in Google's tested page but not in the page source, Google reads your text with a delay and an AI robot probably doesn't read it at all.

## What often goes wrong

- **Prices that load with a script.** The price is in an image, or comes from a separate system that only loads in the browser.
- **Text behind a tab or button.** The text is only fetched when someone clicks.
- **Buttons as links.** A button jumps to another page with a script, without an href address.
- **A menu that only appears after loading.** Robots then can't find your other pages through the menu.
- **A cookie notice that replaces the page.** The robot only gets to see the notice.
- **A built-in booking or ordering module.** The services and prices sit in a window from another system, outside your own page.

### Readability meter

Open your homepage and your most important page with Ctrl+U and go through these eight points. Tick anything that isn't right yet, or that you don't know.

## What JavaScript SEO isn't about

JavaScript isn't bad for SEO. My own site runs on JavaScript, and the text is still there for every robot. What matters is where the text comes from: the server, or only the browser. So if you're having a site built, ask for pages with the text already in the HTML. How much JavaScript the site uses on top of that hardly matters then. Which questions to ask a builder is in [questions to ask a web builder](https://meneermarketing.nl/en/questions/website/how-to-choose-a-web-developer-or-designer). Every kind of visibility side by side is in [all the forms at a glance](https://meneermarketing.nl/en/knowledge-base/seo-geo-aeo-aio-and-llmo-every-kind-of-visibility-side-by-side).

## Sources

I read these pages myself on 27 November 2026.

| Source | What it says |
| --- | --- |
| [Google Search Central: Understand JavaScript SEO basics](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics) | The three phases, the queue for rendering, links with href and the advice to render on the server or in advance. |
| [OpenAI: overview of its robots](https://developers.openai.com/api/docs/bots) | That ChatGPT-User opens a page when a user asks something. |
| My own log | Requests per robot and per address on meneermarketing.nl, 30 days up to 27 November 2026. |

Wondering whether robots can read your site? Send me a message with your site's address. I usually reply within 2 hours, seven days a week.

## Frequently asked questions

### Can Google read a website with JavaScript?

Yes, but in three steps: Google fetches the page, runs the JavaScript later and then indexes whatever is in the page at that point. According to Google, running it can take a few seconds, or longer. Google only sees what's in the page once the JavaScript has run.

### Can ChatGPT and other AI robots read JavaScript?

Don't count on it. Google itself writes that not all robots can run JavaScript. In my own log, ChatGPT-User, the robot that opens a page when someone asks ChatGPT something, fetched something 196 times in 30 days, and not a single script. So put the text that matters in the HTML itself.

### What is server-side rendering?

With server-side rendering, the server prepares the page with all the text in it before sending it to the visitor or robot. The browser then doesn't have to build the text itself with JavaScript. Google calls rendering on the server or in advance a good idea, because it makes your site faster and not all robots run JavaScript.

### How do I test what a robot sees of my page?

Open your page, press Ctrl+U or choose View page source, and search for a sentence from your text. If it's there, a robot without JavaScript sees it too. In Search Console, URL Inspection with a live test shows you the page as Google sees it after running the JavaScript.

### Is a Next.js website good for SEO?

Yes, if it's built so the server puts the text in place. Next.js can do that out of the box, and that's how I build my own site and my clients' sites. A Next.js site that only loads everything in the browser has the same drawbacks as any other site that works that way.

### Can links be made with JavaScript?

Yes, as long as they're real links: an a element with an href address. According to Google, it only finds links built that way. Google doesn't treat a button that jumps to another page with a script as a link.

### What happens to text behind a click, such as in a tab?

Google only sees what's in the page after the JavaScript has run, without anyone clicking. If a tab only loads its text when clicked, Google doesn't see that text. If the text is in the page and just hidden until you click, Google can read it.

### Do I need to have my site rebuilt?

Only if the important text isn't in the source when you run the test. Often it's enough to have your builder render the most important pages on the server. I'll check it for you and tell you honestly whether a rebuild is needed.

Source: https://meneermarketing.nl/en/knowledge-base/javascript-seo-can-google-and-chatgpt-read-your-site
Author: Meneer Marketing
Published: 2026-11-27
Updated: 2026-11-27
Language: English
