What does Google say about SEO? /
Quick SEO Quiz

Test your SEO knowledge in 3 questions

Less than 30 seconds. Find out how much you really know about Google search.

🕒 ~30s 🎯 3 questions 📚 SEO Google

Official statement

Conflicts between canonical tags in raw HTML versus rendered HTML can create indexing problems because contradictory information is sent to search engines regarding the canonical URL for the same page.
🎥 Source video

Extracted from a Google Search Central video

💬 EN 📅 15/04/2021 ✂ 22 statements
Watch on YouTube →
Other statements from this video 21
  1. Google indexe-t-il vraiment tout le contenu JavaScript ou faut-il encore du HTML classique ?
  2. Pourquoi JavaScript et balises meta robots forment-ils un cocktail explosif pour l'indexation ?
  3. Faut-il vraiment publier plus de contenu pour mieux ranker ?
  4. Vos liens internes tuent-ils votre crawl budget sans que vous le sachiez ?
  5. Faut-il vraiment utiliser rel='ugc' et rel='sponsored' si ça n'apporte rien au PageRank ?
  6. Pourquoi JSON-LD écrase-t-il tous les autres formats de données structurées ?
  7. Les données structurées modifiées en JavaScript créent-elles vraiment des signaux contradictoires ?
  8. Les rich snippets boostent-ils vraiment l'adoption des données structurées ?
  9. HTTPS est-il vraiment devenu obligatoire pour exploiter HTTP/2 et booster les performances ?
  10. L'index mobile-first est-il vraiment terminé et que risquez-vous encore ?
  11. Pourquoi les Core Web Vitals restent-ils catastrophiques sur mobile malgré le mobile-first ?
  12. JavaScript et indexation : Google indexe-t-il vraiment tout le contenu rendu côté client ?
  13. Le JavaScript peut-il vraiment modifier un meta robots noindex après coup ?
  14. Pourquoi les canonical tags contradictoires entre HTML brut et rendu bloquent-ils l'indexation de vos pages ?
  15. Faut-il vraiment produire plus de contenu pour ranker ?
  16. Pourquoi Google conseille-t-il d'utiliser rel='ugc' et rel='sponsored' s'ils n'apportent aucun avantage direct aux éditeurs ?
  17. Pourquoi JavaScript modifie-t-il vos données structurées et sabote-t-il votre visibilité dans les SERP ?
  18. Faut-il vraiment retirer les avis agrégés de votre page d'accueil ?
  19. Comment la visibilité donnée par Google booste-t-elle l'adoption des données structurées ?
  20. Pourquoi HTTPS est-il devenu incontournable pour accélérer vos pages ?
  21. Pourquoi la parité mobile-desktop est-elle devenue l'enjeu critique de votre visibilité organique ?
📅
Official statement from (5 years ago)
TL;DR

Google warns of an indexing issue related to contradictions between canonical tags in raw HTML and those added post-JavaScript rendering. These conflicts send mixed signals to search engines, which then must decide which canonical URL to prioritize. For SEO, this means systematically auditing both code versions to identify these inconsistencies before they affect crawling and indexing.

What you need to understand

How does this conflict between raw HTML and rendered output manifest?

The raw HTML refers to the initial source code sent by the server, the one you see in 'View Page Source'. The rendered HTML, on the other hand, is the result after JavaScript execution — this is what Googlebot sees after its rendering phase.

A conflict occurs when the raw HTML contains a <link rel="canonical" href="https://example.com/page-a"> tag, and then JavaScript injects or modifies this tag to point to https://example.com/page-b. Googlebot receives two contradictory directives for the same page.

Why do these conflicts occur on real sites?

Modern architectures heavily rely on JavaScript frameworks — React, Vue, Angular — that manipulate the DOM after loading. A CMS might insert a canonical tag on the server side while an application script dynamically rewrites it based on navigation or application state.

A/B testing, personalization modules, or headless content management systems exacerbate the phenomenon. A developer adds a canonical tag through a React component without checking if the server template already injects a different one — and voila, the conflict arises.

What does Googlebot do in response to these conflicting signals?

Google must make a decision. It generally prioritizes the rendered HTML, but not always — and that's where it gets tricky. If the rendering partially fails, if JavaScript takes too long to execute, or if Googlebot crawls the page before rendering is complete, it may fall back on the raw HTML.

The result: your page might be indexed under a canonical URL you didn’t intend. Worse, if conflicts are frequent, Google may lose trust in your canonical signals and apply its own heuristics — which dilutes SEO control.

  • Raw HTML = initial source code sent by the server, without JavaScript execution
  • Rendered HTML = code after full JavaScript execution, what Googlebot sees after rendering
  • Conflict = two different canonical tags for the same page, one in each version
  • Impact = unpredictable indexing, dilution of PageRank, loss of control over the canonical URL
  • Prioritization = Google favors rendered content, but may switch to raw in case of technical issues

SEO Expert opinion

Is this statement consistent with real-world observations?

Absolutely. Sites are regularly observed being indexed under unexpected URLs while the canonical tags appear correct on the surface. Digging deeper reveals that the raw HTML and rendered HTML diverge — and Google has made a choice that aligns with neither but with its own interpretation.

What’s frustrating is that Google does not precisely document how it resolves these conflicts. [To verify]: the exact weighting between raw HTML and rendered output remains unclear. We know it favors rendered content, but to what extent? What are the latency or error thresholds that trigger a fallback to raw? No official data clarifies this.

What nuances should be applied to this statement from Google?

Google refers to 'indexing issues', but in practice, it’s not binary. A page generally remains indexable — it doesn’t simply disappear. The real concern is that the chosen canonical URL may not be the one you want.

This fragments signals: if Google indexes an unexpected URL variant, backlinks, internal PageRank, and ranking metrics become scattered. You might intend to push /product-a, but Google consolidates on /product-a?utm_source=test — and your internal linking strategy falls apart.

In what cases is this problem most critical?

E-commerce sites with dynamic product facets are particularly exposed. A JavaScript filter rewrites the canonical to point to a category URL — while the server already sends another canonical. Media sites that personalize content based on user profiles also encounter this issue.

Headless or SPA (Single Page Application) architectures amplify the risk: all critical SEO content is generated client-side, and a synchronization oversight between SSR (Server-Side Rendering) and CSR (Client-Side Rendering) creates conflicts. If your tech stack relies on deferred rendering, this is a priority audit point.

Warning: Classic testing tools (Search Console URL Inspection, Screaming Frog in simple mode) do not always reveal these conflicts. You need to explicitly compare the raw source code and the rendered DOM after JavaScript — and check that the canonicals are strictly identical.

Practical impact and recommendations

How can I detect these conflicts on my site?

First step: systematically compare raw HTML and rendered HTML. Use the browser's 'View Page Source' function to see raw, then use the DOM inspector (F12) to view rendered. Look for the <link rel="canonical"> tag in both versions — any differences signify a conflict.

On the tools front, Screaming Frog in 'Rendering' mode allows you to crawl with and without JavaScript enabled. Compare the reports. Google Search Console also provides the 'URL Inspection' tool which displays the rendered HTML as seen by Googlebot — compare it with the source code. Python scripts or Chrome extensions like 'Canonical Checker' can automate this check at scale.

What concrete actions can I take to correct these inconsistencies?

If you identify a conflict, eliminate the duplication. Ideally, define the canonical tag only once — either server-side (in the raw HTML) or via JavaScript, but never both. Best practice: inject the canonical server-side and never modify it in JavaScript.

If your architecture mandates JavaScript (SPA, frameworks), ensure that Server-Side Rendering or pre-rendering generates the full HTML with the correct canonical before sending it to the browser. Check that your JavaScript hydration does not rewrite the tag. Test with different user-agents — Googlebot may not execute JS in the same manner as a desktop Chrome.

What mistakes should I absolutely avoid?

Never leave a 'blank' canonical tag in the raw HTML, hoping that JavaScript will fill it later. Googlebot might crawl before the full execution and interpret that as a lack of directive. Also avoid relative canonicals in the rendered output if the raw uses absolute URLs — guaranteed inconsistency.

Another trap: tag management systems (GTM, Segment) that inject canonicals via JavaScript without coordination with the CMS. Result: two sources of truth, no synchronization. Finally, do not rely solely on local tests — deploy in staging with real network conditions and crawl with Googlebot User-Agent to reproduce the exact conditions.

  • Audit raw HTML vs rendered with Screaming Frog or an automated comparison script
  • Ensure that the canonical tag is set only once, ideally server-side
  • Test with the 'URL Inspection' tool from Search Console to see Googlebot's rendering
  • Synchronize SSR and CSR if using headless architecture, avoid any unnecessary JavaScript rewrites
  • Eliminate canonical tags injected by uncontrolled third-party tag managers
  • Regularly monitor indexed URLs in Search Console to detect indexing deviations
These optimizations touch on highly technical aspects — rendering architecture, SSR, JavaScript hydration — which often go beyond a simple one-time intervention. If your site relies on a modern framework or a headless stack, alignment between raw HTML and rendered output requires cross-disciplinary expertise in SEO and development. In this context, enlisting a specialized SEO agency can be relevant: they will know how to audit both code versions, identify sources of conflict, and coordinate fixes with technical teams to ensure lasting coherence.

❓ Frequently Asked Questions

Google privilégie-t-il toujours le HTML rendu sur le HTML brut ?
En théorie oui, mais dans la pratique Google peut basculer sur le brut si le rendering échoue, prend trop de temps ou rencontre des erreurs JavaScript. Aucune documentation officielle ne précise les seuils exacts.
Comment savoir quelle version de la balise canonique Google a retenue ?
Utilise l'outil « Inspection d'URL » dans Search Console. Il affiche le HTML rendu tel que Googlebot le voit après exécution du JavaScript. Compare avec le code source brut pour détecter les écarts.
Un conflit de canonique peut-il empêcher l'indexation d'une page ?
Rarement. La page reste généralement indexable, mais Google peut choisir une URL canonique inattendue, ce qui dilue les signaux de ranking et fragmente le PageRank interne.
Les frameworks JavaScript modernes créent-ils systématiquement ces conflits ?
Pas forcément. Si le SSR ou le pre-rendering génère le HTML complet côté serveur et que l'hydratation JavaScript ne touche pas aux balises canoniques, aucun conflit n'apparaît. Le problème survient quand deux sources définissent la canonique indépendamment.
Faut-il supprimer toute balise canonique du HTML brut si on utilise du JavaScript pour la générer ?
Non, c'est même l'inverse recommandé. Définis la canonique côté serveur dans le HTML brut et évite de la manipuler en JavaScript. Cela garantit que Googlebot voit toujours la bonne directive, même si le rendering échoue.

🎥 From the same video 21

Other SEO insights extracted from this same Google Search Central video · published on 15/04/2021

🎥 Watch the full video on YouTube →

💬 Comments (0)

Be the first to comment.

2000 characters remaining
🔔

Get real-time analysis of the latest Google SEO declarations

Be the first to know every time a new official Google statement drops — with full expert analysis.

No spam. Unsubscribe in one click.