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

When JavaScript uses the History API to modify the URL after loading (e.g., simplifying parameters), Google may interpret this as a redirect to the new URL and choose it as canonical. This can be verified through the URL Inspection tool on both versions of the URL.
49:53
🎥 Source video

Extracted from a Google Search Central video

⏱ 55:02 💬 EN 📅 21/08/2020 ✂ 50 statements
Watch on YouTube (49:53) →
Other statements from this video 49
  1. 1:38 Google suit-il vraiment les liens HTML masqués par du JavaScript ?
  2. 1:46 JavaScript peut-il masquer vos liens aux yeux de Google sans les détruire ?
  3. 3:43 Faut-il vraiment optimiser le premier lien d'une page pour le SEO ?
  4. 3:43 Google combine-t-il vraiment les signaux de plusieurs liens pointant vers la même page ?
  5. 5:20 Les liens site-wide dans le menu et le footer diluent-ils vraiment le PageRank de vos pages stratégiques ?
  6. 6:22 Faut-il vraiment nofollow les liens site-wide vers vos pages légales pour optimiser le PageRank ?
  7. 7:24 Faut-il vraiment garder le nofollow sur vos liens footer et pages de service ?
  8. 10:10 Search Console Insights sans Analytics : pourquoi Google rend-il impossible l'utilisation solo ?
  9. 11:08 Le nofollow influence-t-il encore le crawl sans transmettre de PageRank ?
  10. 11:08 Le nofollow bloque-t-il vraiment l'indexation ou Google crawle-t-il quand même ces URLs ?
  11. 13:50 Pourquoi Google refuse-t-il de communiquer sur tous ses incidents d'indexation ?
  12. 15:58 Faut-il vraiment indexer toutes les pages paginées pour optimiser son SEO ?
  13. 15:59 Faut-il vraiment indexer toutes les pages de pagination pour optimiser son SEO ?
  14. 19:53 Les paramètres d'URL sont-ils encore un problème pour le référencement naturel ?
  15. 19:53 Les paramètres d'URL sont-ils vraiment devenus un non-sujet SEO ?
  16. 21:50 Google bloque-t-il vraiment l'indexation des nouveaux sites ?
  17. 23:56 Les liens dans les tweets embarqués influencent-ils vraiment votre SEO ?
  18. 25:33 Les sitemaps sont-ils vraiment indispensables pour l'indexation Google ?
  19. 26:03 Comment Google découvre-t-il vraiment vos nouvelles URLs ?
  20. 27:28 Pourquoi Google impose-t-il un canonical sur TOUTES les pages AMP, même standalone ?
  21. 27:40 Le rel=canonical est-il vraiment obligatoire sur toutes les pages AMP, même standalone ?
  22. 28:09 Faut-il vraiment déployer hreflang sur l'intégralité d'un site multilingue ?
  23. 28:41 Faut-il vraiment implémenter hreflang sur toutes les pages d'un site multilingue ?
  24. 29:08 AMP est-il vraiment un facteur de vitesse pour Google ?
  25. 29:16 Faut-il encore miser sur AMP pour optimiser la vitesse et le ranking ?
  26. 29:50 Pourquoi Google mesure-t-il les Core Web Vitals sur la version de page que vos visiteurs consultent réellement ?
  27. 30:20 Les Core Web Vitals mesurent-ils vraiment ce que vos utilisateurs voient ?
  28. 31:23 Faut-il manuellement désindexer les anciennes URLs de pagination après un changement d'architecture ?
  29. 31:23 Faut-il vraiment désindexer manuellement vos anciennes URLs de pagination ?
  30. 32:08 La pub sur votre site tue-t-elle votre SEO ?
  31. 32:48 La publicité sur un site nuit-elle vraiment au classement Google ?
  32. 34:47 Le rel=canonical en syndication est-il vraiment fiable pour contrôler l'indexation ?
  33. 34:47 Le rel=canonical protège-t-il vraiment votre contenu syndiqué du vol de ranking ?
  34. 38:14 Les alertes de sécurité dans Search Console bloquent-elles vraiment le crawl de Google ?
  35. 38:14 Un site hacké perd-il son crawl budget suite aux alertes de sécurité Google ?
  36. 39:20 Les liens dans les guest posts ont-ils vraiment perdu toute valeur SEO ?
  37. 39:20 Les liens issus de guest posts ont-ils vraiment une valeur SEO nulle ?
  38. 40:55 Pourquoi Google ignore-t-il les dates de modification identiques dans vos sitemaps ?
  39. 40:55 Pourquoi Google ignore-t-il les dates lastmod de votre sitemap XML ?
  40. 42:00 Faut-il vraiment mettre à jour la date lastmod du sitemap à chaque modification mineure ?
  41. 42:21 Un sitemap mal configuré réduit-il vraiment votre crawl budget ?
  42. 43:00 Un sitemap mal configuré peut-il vraiment réduire votre crawl budget ?
  43. 44:34 Faut-il vraiment choisir entre réduction du duplicate content et balises canonical ?
  44. 44:34 Faut-il vraiment éliminer tout le duplicate content ou miser sur le rel=canonical ?
  45. 45:10 Faut-il vraiment configurer la limite de crawl dans Search Console ?
  46. 45:40 Faut-il vraiment laisser Google décider de votre limite de crawl ?
  47. 47:08 Les redirections 301 en interne diluent-elles vraiment le PageRank ?
  48. 47:48 Les redirections 301 internes en cascade font-elles vraiment perdre du jus SEO ?
  49. 49:53 L'History API JavaScript peut-elle vraiment forcer Google à changer votre URL canonique ?
📅
Official statement from (5 years ago)
TL;DR

Google states that URL changes made by JavaScript through the History API can be interpreted as redirects, with the new URL potentially becoming the canonical version. For an SEO, this means that a simple client-side manipulation can impact indexing without a traditional server redirect. It remains essential to systematically verify through the URL Inspection tool whether Google is correctly understanding your initial intention.

What you need to understand

What is the History API and why do developers use it?

The History API allows JavaScript to change the URL displayed in the browser without triggering a page reload. Developers typically use it to clean up URL parameters after an action (removing ?utm_source or ?session_id), improve UX on single-page applications (SPAs), or manage complex navigation states.

For instance, a user arrives at https://example.com/page?ref=newsletter&utm_campaign=promo, and JavaScript uses history.replaceState() to change the URL to https://example.com/page once the page has loaded. From the user's perspective, it is seamless. But what about Googlebot? That's where it gets interesting.

How does Google interpret these client-side URL changes?

According to Mueller, Google may treat this manipulation as an implicit redirect to the new URL. In other words, if Googlebot visits the original URL with parameters and detects the change via JavaScript, it may decide that the parameter-free version is the canonical version to index.

The mechanism resembles a 301 or 302 redirect, but without the classic HTTP code — it is a client-side interpretation. Google crawls URL A, executes the JS, sees that the URL becomes B, and may potentially choose B as the reference URL. This logic has been part of Google's JavaScript rendering management for several years.

Mueller specifies that this behavior can be verified with the URL Inspection tool by testing both versions. If Google has correctly interpreted the change as a redirect, the final URL displayed in the tool will be the version modified by JavaScript.

What are the concrete risks for SEO?

The main danger is the loss of control over the canonical URL. If your intention was to keep the parameterized URL for tracking or segmentation reasons, but Google unilaterally decides that the cleaned version is the right one, you end up with unwanted canonicalization.

Another risk is the dilution of signals. If backlinks point to the original URL but Google indexes the modified version, PageRank and authority may become fragmented between the two versions. Without an explicit rel="canonical" tag, Google makes its own choice — and it doesn't always align with your strategy.

Finally, this behavior can create inconsistencies in Search Console: impressions and clicks distributed between URL A and URL B, confusing coverage reports, inspected URLs that do not match those you thought were indexed.

  • History API allows modifying the URL without reloading, often to clean parameters
  • Google may interpret this change as a client-side redirect and choose the new URL as canonical
  • Verifiable via URL Inspection by testing both versions
  • Risk of unwanted canonicalization if the initial intent was to keep the original URL
  • May create signal dilution between URL versions and inconsistencies in Search Console

SEO Expert opinion

Is this statement consistent with observed practices in the field?

Yes and no. On JavaScript-heavy sites (React, Vue, Angular), it is indeed observed that Google sometimes indexes client-modified URLs. But the interpretation as a "redirect" remains ambiguous — is Google referring to a signal equivalent to a 301, or merely a preference for the final URL? [To be verified]

Tests show that the behavior is not systematic. On some sites, Google indexes the destination URL (with parameters), while on others, the cleaned version. Nothing deterministic. The speed of JS rendering, the presence of a rel="canonical", and the delay between crawl and rendering can all play a role. Mueller does not provide any specific criteria to predict which behavior will prevail.

What nuances should be added to this statement?

First, saying Google "can" treat this as a redirect admits that this is not guaranteed. Unlike a true server redirect (301/302), there is no certainty that Googlebot will consistently respect URL changes made by JavaScript.

Additionally, Mueller does not specify whether this behavior applies only to replaceState() or also to pushState(). These two methods have different implications: replaceState() replaces the current URL in history, while pushState() adds a new one. If Google treats pushState() as a redirect, it could cause issues on SPAs with complex navigation.

Another point: Mueller mentions "cleaning parameters," but what about structural URL changes? If JavaScript transforms /product?id=123 into /product/product-name-123, will Google really consider that as a legitimate redirect, or as an attempt at cloaking? [To be verified]

In what cases is this rule likely not applicable?

If the URL change occurs after user interaction (click, scroll), it is unlikely that Googlebot will detect it. The bot generally crawls the initial state of the page, without simulating clicks or complex events. So a history.replaceState() triggered on scroll will probably never be seen by Google.

Similarly, if the site uses obfuscated or poorly structured JavaScript, Googlebot may fail to execute the code and thus miss the URL change entirely. Rendering timeouts (a few seconds maximum) also limit what Google can capture. A script that takes 10 seconds to modify the URL will not be processed.

Finally, if a <link rel="canonical"> tag is already present in the initial HTML and points to a different URL than the one modified by JS, Google is likely to favor the HTML canonical over the JavaScript change. Signal hierarchy: an explicit canonical should always take precedence over heuristic interpretation.

Warning: Never rely solely on this mechanism to manage your canonicals. A traditional server redirect (301) remains infinitely more reliable and predictable than a probabilistically interpreted client-side URL change by Google.

Practical impact and recommendations

What actions should you take if you use the History API?

First, systematically audit the URL changes made by JavaScript on your site. List all occurrences of history.replaceState() and history.pushState(), identify the original URL and the target URL. For each pair, ask yourself: do I want Google to index the modified URL or the destination URL?

Next, use the URL Inspection tool from Search Console on both versions. Check which URL Google considers canonical, and if it matches your intention. If you notice a discrepancy, add an explicit <link rel="canonical"> tag in the initial HTML to guide Google.

If your goal is to clean tracking parameters while keeping the parameterized URL for indexing (a rare but possible case), do not rely solely on the History API — instead, use a server redirect or a well-placed rel="canonical" parameter. Never let Google guess your intention.

What mistakes should you absolutely avoid?

Never change the URL drastically via JavaScript without a corresponding server redirect. For example, transforming /category/product into /other-category/product solely via JS is risky: Google may not follow, or worse, consider it cloaking if the content does not match the final URL.

Avoid also accumulating conflicting signals: an HTML canonical pointing to URL A, a history.replaceState() transforming to URL B, and a sitemap referencing URL C. Google will make a choice, but it is unlikely to be the one you want. Consistency: all your signals should point in the same direction.

Finally, do not rely solely on URL Inspection to validate. This tool tests a snapshot state of rendering, not necessarily representative of what Googlebot does at scale. Cross-reference with Search Console data (indexed URLs, coverage reports) and server logs if you have access.

How to check if your implementation is SEO-safe?

Establish monitoring of indexed URLs via Search Console. Regularly export the list of indexed URLs, compare it with your sitemap and intentions. If modified URLs by JavaScript appear when you do not want them, that is an alarm signal.

Test also with third-party JavaScript rendering tools (Screaming Frog in JavaScript mode, OnCrawl, Botify) to see what final URL is detected after code execution. Compare with what Google reports in the URL Inspection. If the two diverge, there is an inconsistency issue.

Finally, document every URL change via JS in a technical decision log. Note the intention, source URL, target URL, and the associated canonicalization strategy. This will help you avoid rediscovering in 6 months why a URL is indexed differently than you thought.

  • Audit all uses of history.replaceState() and pushState() on the site
  • Check with the URL Inspection tool which version Google considers canonical
  • Add an explicit rel="canonical" tag if the intention differs from observed behavior
  • Cross-reference Search Console data, server logs, and JS crawl tools to detect inconsistencies
  • Avoid accumulating conflicting signals (HTML canonical vs JS change vs sitemap)
  • Regularly monitor the list of indexed URLs to spot discrepancies
These optimizations require a fine mastery of JavaScript rendering and continuous monitoring of signals sent to Google. If your technical team lacks bandwidth or SEO expertise on these aspects, it may be wise to seek a specialized SEO agency for a thorough audit and personalized support. An external perspective often helps identify blind spots and secure your indexing strategy.

❓ Frequently Asked Questions

Google traite-t-il tous les changements d'URL via History API comme des redirections ?
Non, ce n'est pas systématique. Mueller dit que Google "peut" les traiter ainsi, ce qui signifie que le comportement dépend de plusieurs facteurs (vitesse de rendu, présence de canonical, cohérence des signaux). Rien de garanti.
Quelle différence entre replaceState() et pushState() pour Google ?
Mueller ne précise pas. replaceState() remplace l'URL actuelle dans l'historique, pushState() en ajoute une nouvelle. On ne sait pas si Google les traite de manière identique ou différente en termes de canonicalisation.
Faut-il éviter l'API History pour des raisons SEO ?
Pas nécessairement, mais il faut l'utiliser avec précaution. Si vous voulez un contrôle total sur l'URL indexée, privilégiez une redirection serveur classique (301) ou une balise canonical explicite. L'API History seule est trop imprévisible.
Comment vérifier quelle URL Google a choisi comme canonical après un changement JS ?
Utilisez l'outil Inspection d'URL de la Search Console sur les deux versions (URL d'origine et URL modifiée). Google affichera quelle version il considère comme canonical. Croisez aussi avec les données de couverture et les logs.
Un changement d'URL client-side peut-il être considéré comme du cloaking ?
Potentiellement oui, si l'URL finale ne correspond pas au contenu affiché ou si le changement semble destiné à tromper les moteurs. Google évalue la cohérence entre URL, contenu et intention. Un écart trop marqué peut lever un red flag.
🏷 Related Topics
Crawl & Indexing AI & SEO JavaScript & Technical SEO Domain Name Redirects Search Console

🎥 From the same video 49

Other SEO insights extracted from this same Google Search Central video · duration 55 min · published on 21/08/2020

🎥 Watch the full video on YouTube →

Related statements

💬 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.