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

Having a different canonical tag in raw HTML and rendered HTML sends conflicting signals to Google. This can weaken the canonical signal and lead Google to choose a completely different URL or alternate between the two versions, making Search Console reports difficult to interpret.
🎥 Source video

Extracted from a Google Search Central video

💬 EN 📅 26/04/2021 ✂ 26 statements
Watch on YouTube →
Other statements from this video 25
  1. Les liens JavaScript retardent-ils vraiment la découverte par Google ?
  2. Pourquoi Google ignore-t-il vos balises canoniques quand le HTML brut contredit le rendu ?
  3. Le noindex en HTML brut empêche-t-il définitivement le rendu JavaScript par Google ?
  4. JavaScript et SEO : peut-on vraiment modifier title, meta et liens côté client sans risque ?
  5. Le JavaScript côté client est-il vraiment un frein pour vos performances SEO ?
  6. HTML brut vs rendu : Google s'en fiche-t-il vraiment ?
  7. Google AdSense pénalise-t-il vraiment la vitesse de votre site comme n'importe quel script tiers ?
  8. Faut-il s'inquiéter des erreurs 'other error' sur les images dans la Search Console ?
  9. User agent ou viewport : quelle détection privilégier pour vos versions mobiles séparées ?
  10. Les liens de navigation JavaScript affectent-ils vraiment le référencement de votre site ?
  11. Peut-on vraiment perdre le contrôle de sa canonical en laissant l'attribut href vide au chargement ?
  12. Quel crawler Google utilise vraiment ses outils de test SEO ?
  13. Les données structurées de votre version mobile s'appliquent-elles aussi au desktop ?
  14. Faut-il vraiment arrêter de craindre le JavaScript pour le SEO ?
  15. Les liens JavaScript retardent-ils vraiment la découverte par Google ?
  16. Peut-on vraiment retirer un noindex via JavaScript sans risquer la désindexation ?
  17. Peut-on vraiment modifier les balises meta et les liens en JavaScript sans risque SEO ?
  18. Les produits Google bénéficient-ils d'un avantage SEO caché dans les résultats de recherche ?
  19. Faut-il s'inquiéter des erreurs 'other' dans l'outil d'inspection d'URL ?
  20. Google ignore-t-il vraiment vos images lors du rendu pour la recherche web ?
  21. User agent ou viewport : Google fait-il vraiment la différence pour l'indexation mobile ?
  22. Les liens générés en JavaScript transmettent-ils vraiment les signaux de ranking comme les liens HTML classiques ?
  23. Une balise canonical vide en HTML peut-elle forcer Google à auto-canonicaliser votre page par erreur ?
  24. Le Mobile-Friendly Test peut-il remplacer l'URL Inspection Tool pour auditer le crawl mobile ?
  25. Pourquoi Google ignore-t-il vos données structurées desktop après le mobile-first indexing ?
📅
Official statement from (5 years ago)
TL;DR

Google confirms that a divergent canonical tag between raw HTML (source) and rendered HTML (after JavaScript execution) sends conflicting signals that weaken the canonical signal. The consequence: Google may ignore both proposed URLs and choose its own canonical version or unpredictably alternate between the variants. For SEOs, this means that modern JavaScript frameworks (React, Vue, Next.js) manipulating the DOM after loading create a real risk of cannibalization and unstable Search Console reports.

What you need to understand

How does Google handle raw HTML versus rendered HTML?<\/h3>

Google first crawls the raw HTML<\/strong> (what your server directly returns), then executes JavaScript to obtain the rendered HTML<\/strong> (what the user actually sees in the browser). These two versions can be radically different in modern applications.<\/p>

If your canonical<\/strong> tag changes between these two states — for example, the raw HTML points to \/page-a while JavaScript changes the tag to point to \/page-b — Google receives two conflicting instructions on which URL should be considered the canonical version.<\/p>

What actually happens when signals diverge?<\/h3>

Martin Splitt clarifies that this contradiction weakens the signal<\/strong> of the canonical overall. Google no longer knows which instruction to follow: the server's or the client's? As a result: the algorithm may decide to choose a completely different third URL<\/strong> as canonical, based on other signals (backlinks, URL structure, content).<\/p>

Even worse, Google may alternate<\/strong> between the two versions across successive crawls. One day, \/page-a is indexed as canonical, the next day it’s \/page-b. This instability renders Search Console reports completely unusable<\/strong> since metrics spread over multiple URLs instead of consolidating into one.<\/p>

What types of sites are affected by this issue?<\/h3>

Sites that use client-side rendering<\/strong> (CSR) or hybrid rendering are particularly exposed. Frameworks like React or Vue.js can alter the DOM after the initial load, including meta tags in the .<\/p>

Single Page Applications (SPAs) that handle client-side routing are also at risk if they dynamically inject different canonical tags depending on the state of the application. E-commerce sites with filters and URL parameters managed by JavaScript fall directly into this category.<\/p>

  • The raw HTML and the rendered HTML must strictly present the same canonical tag<\/strong><\/li>
  • Server-side rendering (SSR) or static generation (SSG) eliminate this risk at the source<\/strong><\/li>
  • Tools like Mobile-Friendly Test or URL inspection in Search Console allow for comparison of the two versions<\/strong><\/li>
  • A canonical divergence creates indexing instability that results in unpredictable position fluctuations<\/strong><\/li>
  • Google can completely ignore your instructions and arbitrarily choose a URL based on other signals<\/strong><\/li><\/ul>

SEO Expert opinion

Does this statement align with field observations?<\/h3>

Absolutely. For years, SEO consultants have observed that sites with complex JavaScript rendering experience unusual volatility<\/strong> in indexing. URLs expected to be consolidated via canonical appear in the index all at once or disappear then reappear over the weeks.<\/p>

What Martin Splitt confirms here is the exact mechanism<\/strong>: Google does not harshly reject conflicting signals, it gradually weakens them until it ignores them. This is consistent with the principle of 'multiple signals': when indices contradict each other, Google resorts to its own heuristics rather than trusting webmaster directives.<\/p>

What gray areas remain in this explanation?<\/h3>

Martin Splitt does not specify the threshold<\/strong> at which the signal becomes too weak to be considered. Is it immediate at the first divergence, or does Google tolerate a short window of time between raw HTML and rendered output? [To be verified]<\/strong><\/p>

Another unclear point: how does Google handle the case where JavaScript removes<\/strong> a canonical tag present in the raw HTML, without adding a new one? Technically, this is not a strict contradiction, but a lack of signal<\/strong> after rendering. The statement does not explicitly cover this scenario.<\/p>

In what cases is this rule not as strong?<\/h3>

If your site uses server-side rendering<\/strong> (SSR) or static generation (SSG), the raw HTML and rendered HTML are by definition identical at the time of crawling. Next.js in SSR mode, Nuxt.js configured correctly, or good old PHP/Python that sends complete HTML structurally eliminate the problem.<\/p>

Entirely static sites (pure HTML, without JavaScript modifying the DOM) obviously are not affected. But let's be honest: in 2025, how many professional sites can afford this luxury of simplicity?<\/p>

Warning:<\/strong> Some WordPress plugins and e-commerce modules add JavaScript that modifies canonical tags without your knowledge, notably to handle product variations or sorting filters. A complete technical audit is essential before declaring your site 'clean' on this point.<\/div>

Practical impact and recommendations

How can you detect if your site has conflicting canonicals?<\/h3>

Use the URL inspection tool<\/strong> in Google Search Console. Compare the 'raw HTML' tab with the 'rendered HTML' tab: the canonical tag must be strictly identical. If it differs, you have a problem.<\/p>

The Mobile-Friendly Test<\/strong> from Google also provides a view of the rendered output. On the browser side, open Chrome DevTools, disable JavaScript, refresh the page, and inspect the canonical tag in the . Then re-enable JS, refresh, and check again. Any divergence is a warning signal.<\/p>

What technical errors cause this type of divergence?<\/h3>

JavaScript frameworks that modify the document.head<\/strong> after the initial mount are the main culprits. React Helmet, Vue Meta, or custom scripts that inject canonical tags via appendChild<\/strong> or innerHTML<\/strong> create this risk.<\/p>

Client-side routing systems that change the canonical based on the application state (URL parameters, hash routing) are also problematic. If your SPA loads with a default canonical and then replaces it after route analysis, Google crawls both versions.<\/p>

What strategy should you adopt to eliminate this risk definitively?<\/h3>

Favor server-side rendering<\/strong> or static generation. Next.js, Nuxt.js, SvelteKit configured in SSR mode send the complete HTML with the correct canonical from the first server response. JavaScript can then hydrate the interface without touching critical tags.<\/p>

If you remain in pure CSR, ensure that your JavaScript never modifies<\/strong> the canonical tags after the initial load. The tag must be present in the raw HTML, end of story. Use server-side conditional rendering (even minimal) to inject the correct canonical before the DOM reaches the browser.<\/p>

  • Audit all JavaScript components that manipulate the of the document<\/li>
  • Systematically check raw HTML vs rendered on a representative sample of URLs via Search Console<\/li>
  • Migrate to SSR/SSG or implement pre-rendering for critical pages<\/li>
  • Document the canonical strategy in the technical guidelines of the dev team<\/li>
  • Implement automated tests (Puppeteer, Playwright) that compare raw canonical vs rendered<\/li>
  • Monitor indexing fluctuations in Search Console as an early indicator of divergences<\/li><\/ul>
    Canonicalization is a signal already fragile by nature — Google follows it when it deems consistent with other indices. Adding contradictions between raw HTML and rendered output deliberately undermines this signal and leaves Google to arbitrarily decide which URL to index. For complex sites with modern JavaScript architectures, these technical optimizations can prove particularly tricky to diagnose and correct. If your in-house team lacks expertise in server-side rendering or in-depth technical SEO audits, enlisting a specialized SEO agency experienced in JavaScript architectures can save you months of unexplained fluctuations and lost rankings.<\/div>

❓ Frequently Asked Questions

Est-ce que la balise canonical dans le sitemap XML compte comme un signal contradictoire ?
Non, le sitemap XML n'est pas considéré comme une directive canonical stricte. Il indique simplement les URLs à crawler. Une divergence entre sitemap et balise canonical HTML n'entre pas dans la même catégorie de signal contradictoire que HTML brut vs rendu.
Si mon JavaScript supprime une canonical sans en ajouter une autre, Google la considère-t-il toujours ?
Google crawle d'abord le HTML brut, donc la canonical initiale est capturée. Si le JavaScript la supprime ensuite, cela crée une incohérence. Google risque de traiter cela comme un signal affaibli, même si techniquement ce n'est pas une contradiction stricte entre deux URLs différentes.
Les balises canonical auto-référencées sont-elles concernées par ce problème ?
Oui, si votre HTML brut contient <link rel="canonical" href="/page-a"> et que votre JavaScript la modifie pour pointer vers /page-a avec des paramètres différents (query strings, trailing slash), c'est une divergence. L'URL doit être strictement identique, caractère pour caractère.
Combien de temps Google met-il à détecter et réagir à une divergence canonical ?
Aucun délai officiel communiqué. En pratique, cela dépend de la fréquence de crawl et de rendu de vos pages. Un site à fort crawl budget peut voir les effets en quelques jours, tandis qu'un site moins prioritaire mettra plusieurs semaines avant que Google ne re-rende suffisamment de pages pour détecter le pattern.
Est-ce que Googlebot mobile et desktop peuvent interpréter différemment ces signaux contradictoires ?
Théoriquement oui, car ils peuvent crawler et rendre à des moments différents. Mais avec le mobile-first indexing, c'est principalement le Googlebot smartphone qui détermine l'indexation. Si la divergence existe sur mobile, c'est là que le problème se manifestera en priorité.

🎥 From the same video 25

Other SEO insights extracted from this same Google Search Central video · published on 26/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.