Why does Googlebot sometimes ignore a fully rendered page and index the pre-render HTML instead, even when rendering succeeds?
Answered 3-minute answer rooted in 1 page
When it happens, the raw HTML and the rendered page disagree about something Google treats as an instruction, such as the canonical, a robots directive or the title, and Google may act on either version. Google’s JavaScript guide warns against exactly this for canonicals: “you shouldn’t use JavaScript to change the canonical URL to something else than the URL you specified as the canonical URL in the original HTML.” It adds that “Conflicting or multiple rel=”canonical” link tags may lead to unexpected results.” For robots directives the order matters even more: Google’s guide says pages are queued for rendering unless a robots meta tag or header says not to index them, so a noindex in the raw HTML can stop rendering before a script ever removes it.
Where raw and rendered versions conflict
| Element | Raw HTML | Rendered page | What can happen |
|---|---|---|---|
| Canonical | Points to URL A | Script changes it to URL B | Either may be used; results inconsistent |
| Robots meta | noindex | Script removes noindex | The page may never be rendered or indexed |
| Robots meta | None | Script adds noindex | Google may drop the page once rendered |
| Title | Generic shell title | Specific title set by script | Mixed title signals |
| Main content | Placeholder | Real content | Rendered content is used when the render succeeds |
Source: Google’s JavaScript SEO basics.
The last row is the normal case and works as intended. The problem is limited to instructions about how to treat the URL.
Why instructions behave differently from content
Content is meant to be read from the finished page. Instructions about indexing and canonicalization shape what happens to the URL at all, and Google can act on them at an earlier stage. When two versions of the same instruction exist, the result depends on which one Google used, which is not something a site can control case by case.
The fix
- Put the final canonical, robots directives and title in the server HTML.
- Never let scripts change them to a different value; if a script must set the canonical, it should be the only canonical and match the intended URL.
- Audit raw against rendered: for a sample of each template, compare these elements in the raw response and in URL Inspection’s rendered HTML.
- Check third-party scripts, such as personalization or A/B testing tools, which can rewrite head elements without the SEO team knowing.
A worked example
For example, imagine a software company whose server sets every regional pricing page’s canonical to the main pricing URL, while a personalization script added later rewrites the canonical to self-reference after load. URL Inspection shows some regional pages consolidated and others indexed separately. The team removes the head rewrite from the script and decides the canonical once, on the server, and the regional pages then behave consistently.
Google can act on the pre-render HTML when raw and rendered versions disagree on canonicals, robots directives or titles, which is why its guidance is to set those instructions correctly in the server HTML and never change them with JavaScript.
Answers that share these roots
- Is WordPress inherently better for SEO than enterprise CMS platforms like Adobe Experience Manager or Sitecore, or does that belief mask deeper implementation issues? shares 1 page
- What is the misconception that Googlebot scrolls pages like a user, and how does this misunderstanding lead to lazy-loaded content being missed during indexing? shares 1 page
- How does Googlebot lack of support for certain CSS layout features (e.g., container queries, advanced grid) affect content visibility in rendered snapshots? shares 1 page
- How should enterprise SEO teams evaluate CMS re-platforming decisions when the current system has accumulated years of SEO-specific customizations? shares 1 page
- Why does reducing JavaScript bundle size sometimes fail to improve Googlebot rendering success when the bottleneck is API call latency rather than parse time? shares 1 page
- How should a site with 100+ third-party JavaScript tags prioritize which scripts to defer or eliminate to stay within Googlebot rendering resource limits? shares 1 page
Leave a Reply