Most JavaScript SEO advice is about choosing a framework. This guide is about something narrower and more useful when a site already exists: a repeatable audit that tells you, template by template, what a crawler receives, what it has to render to see, and which of those differences can cost you rankings. If you are still deciding between client-side rendering, server rendering and static generation, start with our Next.js rendering and audit guide. If you want the full theory of the crawl, render and index pipeline, read how search engines crawl, render and index your site. Here we assume the site is live and you need to prove what is broken.
For a local service business the stakes are concrete. A plumbing company whose service-area list, review widget, pricing table or booking form is injected by a script may have a page that looks complete to every customer and reads as a near-empty shell to a crawler that does not wait for the script. The audit below finds that gap before a ranking drop does.
A rendering audit compares three snapshots of the same URL. Skipping any one of them is how teams end up arguing from screenshots.
- Raw HTML. The response body exactly as the server sends it. Get it with view-source in the browser (not the Elements panel, which shows the live DOM) or with
curl. This is what every crawler sees first, including crawlers that never run JavaScript. - Rendered DOM. The page after a headless browser has executed scripts. Google fetches the raw HTML and then renders the page in an evergreen version of Chromium, so this view approximates what Google indexes. The "View crawled page" and "Live test" panels in Search Console's URL Inspection tool show Google's own rendered HTML.
- The user view. A screenshot and the DOM after real interaction: scrolling, clicking tabs, accepting a cookie banner. Google's renderer does not click or scroll the way a visitor does and does not keep cookies or local storage between page loads, so the user view is the one most likely to differ from the other two.
Everything that appears in view two or three but not view one is a rendering dependency. The audit is a list of those dependencies, ranked by how much search value each one carries.
Not every dependency is a defect. A chat widget, an animated hero and a mortgage calculator can all live behind scripts without hurting you. The question is whether Google needs the element to understand, index or rank the page. Use this table to triage what the diff turns up.
| Element | Must be in raw HTML? | Why |
|---|---|---|
| Title tag, meta description, H1 | Yes | Cheap to server-render, and snippet and relevance decisions depend on them. |
| Canonical and robots meta | Yes | If the raw HTML says noindex, Google may skip rendering and never see a script that removes it. |
| Primary body copy (service description, location detail) | Yes, strongly preferred | Rendering can be delayed or fail, and other crawlers may not run scripts at all. |
| Internal navigation and in-content links | Yes, as real anchors | Link discovery is how the rest of the site gets crawled. |
| Structured data (JSON-LD) | Preferably | Google can read injected JSON-LD, but server output is easier to validate and monitor. |
| Review widgets, maps, booking forms | No, with caveats | Fine to be dynamic, but do not rely on third-party iframe content to carry rankings. |
| Personalization, chat, A/B variants | No | Keep the default variant complete in HTML so every visitor and bot gets the same core content. |
Pick one representative URL per template, not per page. A site with 400 city pages has one city-page template, so one good sample usually exposes the problem for all 400. For a typical local site that means the home page, a service page, a location page, a blog post and any filtered or search-driven listing.
- Save the raw HTML.
curl -s https://example.com/services/drain-cleaning/ -o raw.html. Note the response status, the title, the canonical, the robots meta tag and the visible text length. - Save the rendered DOM. Use a headless browser such as Playwright or Puppeteer, wait for the network to go idle, and write out
document.documentElement.outerHTML. A crawler like Screaming Frog can do the same in bulk if you switch its rendering mode to JavaScript and export both versions. - Compare the five things that matter. Word count of main content, the set of
hrefvalues on anchors, title and meta description, canonical and robots tags, and JSON-LD blocks. A short script that extracts those from each file and prints the differences is more reliable than eyeballing. - Confirm with Google's own view. Run the URL through URL Inspection, open the live test, and read the rendered HTML and the list of page resources Google could not load. Compare against your headless result. Where they disagree, trust Google's.
- Repeat with scripts disabled. Turn off JavaScript in the browser's developer tools and reload. Whatever remains is the floor that any non-rendering crawler receives.
Links that are not links
Google follows <a href> elements. It does not reliably follow onclick handlers, buttons that call router.push, or anchors whose href is empty or javascript:void(0). A service-area map where each city is a clickable SVG shape, or a "see all locations" control that fetches a list after a click, can leave dozens of pages with no crawlable path to them. The diff shows it immediately: the rendered DOM has fewer real href values than you expect, or the target URLs are missing entirely. Fix it by emitting a plain anchor for every destination, then enhancing it with JavaScript.
Hash and fragment routing
Content addressed as /#/services/roofing is, to Google, the home page. Fragments are not treated as separate URLs. Use the History API so each view has a real path, and make sure the server returns the right content for that path on a fresh load.
Signals the script rewrites
Single-page apps often update the title and canonical after the route changes. Two risks follow. If the raw HTML carries a generic title or a canonical pointing at the home page, and the script corrects it later, Google may index the first version it sees. And if the raw HTML carries noindex (a common leftover from a staging template) while a script removes it, Google may never run the script. Treat any disagreement between the raw and rendered values of a canonical or robots tag as a bug, and see our canonical tags guide and robots meta tag guide for the conflict rules.
Content gated behind an interaction
Text that loads only on scroll, on a tab click or after "read more" is a gamble. Content that is already in the DOM but visually collapsed is generally fine. Content that is fetched only when a user acts is not in the DOM when Google renders. Lazy loading with IntersectionObserver works for images and below-the-fold components because the renderer uses a very tall viewport, but a scroll-event listener that waits for real scrolling does not.
Resources Google cannot fetch
If robots.txt disallows the JavaScript bundle, the CSS, or the API endpoint your page calls for its content, the renderer cannot build the page you built. URL Inspection lists blocked page resources, and the advanced robots.txt directives guide covers how those rules are evaluated. Also watch for API calls that need a cookie, an authorization header or a consent flag: the renderer starts every page load with a clean browser state.
Soft 404s in single-page apps
An app shell that returns HTTP 200 for every path, then draws a "page not found" message in the browser, tells Google nothing is wrong. A deleted service page keeps looking like a live page. The server, or the edge, has to return a real 404 or 410 for unknown routes. The crawl error triage guide explains how these surface as soft 404 entries in the Pages report.
Local sites lean heavily on embedded widgets, and these are the most common reason a good-looking page indexes thin. A review carousel pulled from a third-party script is text in the rendered DOM, but whether it is reliably indexed, attributed to your page and worth anything is unpredictable. A Google Maps iframe contributes nothing indexable. Treat all of it as presentation. If testimonials matter to rankings, publish a handful of real ones as plain HTML on the page and let the widget do the rest. Embedded scripts also have a performance cost, which we cover in third-party script performance.
Rendering failures rarely announce themselves. The usual signs are an indexed page whose snippet shows boilerplate instead of body copy, a URL Inspection screenshot that is blank or half drawn, "Crawled, currently not indexed" on pages that look rich in a browser, and a rendered word count far below the raw-plus-script total. Causes include script errors that halt rendering, a render path that takes too long, a resource blocked by robots.txt, or an API that rate-limits or rejects non-browser traffic. Check your server and CDN rules too: a bot-protection challenge that serves a verification page to unfamiliar clients will make Google render the challenge, not your content. Our CDN and caching guide covers that failure mode.
The audit gives you a defect list. Resolve it in this order, because each step is cheaper than the next.
- Move signals into the HTML. Title, meta description, canonical, robots and H1 should come from the server for every route.
- Turn fake links into real anchors. This is usually a template change, not an architecture change.
- Server-render or statically generate the templates that carry rankings. Service and location pages first; logged-in tools can stay client-side.
- Unblock resources. Remove robots.txt rules that hide scripts, styles and content APIs.
- Return proper status codes. Real 404 and 410 responses, and redirects as HTTP redirects, not script redirects.
Dynamic rendering (serving a prerendered copy to bots) is described by Google as a workaround, not a recommendation. It adds a second code path that drifts out of sync, so use it only as a stopgap while the real fix ships.
Re-run the same diff after each release and keep the script. Then check three Google-side signals: URL Inspection shows the rendered HTML with the fixed element present, the Pages report stops listing the template under rendering-related exclusions, and the crawled-versus-rendered link count on a recrawl matches what you ship. Put the diff in your deployment checklist as a regression test, so a future refactor that moves the canonical back into a client-side hook gets caught before it reaches production. Pair it with a mobile-first indexing audit, since Google renders the mobile version of the page and any content missing there is missing from the index.
Does Google index content that is only added by JavaScript?
Often yes, because Google renders pages with a recent version of Chromium. It is not guaranteed, though. Rendering can be delayed, scripts can fail, blocked resources can break the page, and content that appears only after a click or scroll is not in the DOM when Google renders. Put anything you need to rank in the initial HTML or in content that loads without interaction.
How do I see what Googlebot sees for a specific URL?
Use the URL Inspection tool in Search Console. The live test shows the rendered HTML, a screenshot and any page resources that could not be loaded. Compare that rendered HTML with the raw view-source of the page to find content, links or tags that depend on JavaScript.
Is it safe to set the canonical or noindex tag with JavaScript?
It is risky. If the raw HTML contains noindex, Google may not render the page, so a script that removes it never runs. Google also recommends putting the canonical in the HTML rather than injecting it. Emit robots and canonical tags from the server, and treat any difference between raw and rendered values as a defect.
Do AI crawlers and other search engines run JavaScript?
Many do not run it reliably, and capabilities vary by crawler and change over time. That is why the raw HTML is your floor: a page whose main content and links exist without scripts will be understood by the widest range of bots. Test by disabling JavaScript and confirming the essential content is still present.
Why does my page look fine in a browser but show as thin in Search Console?
The browser runs everything: scripts, cookies, interactions and third-party calls. Google's renderer starts clean, does not click or scroll like a visitor, and may be blocked from fetching some scripts or APIs. Compare the rendered HTML in URL Inspection with your browser DOM to find which element or request is failing.
Turn this into a practical SEO action plan
Use RankLocalToday tools to check rankings, diagnose website issues, and prioritize the next organic traffic move.
Get your SEO plan →More in this topic: Website SEO, all 208 guides →