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 change the URL after the page has loaded, Google may interpret this change as a redirect and choose the modified URL as canonical. This behavior depends on the context and timing of the URL change and can be verified using the URL Inspection tool.
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 JavaScript et History API : Google peut-il vraiment traiter ces changements d'URL comme des redirections ?
📅
Official statement from (5 years ago)
TL;DR

Google may interpret a URL change via the JavaScript History API as a redirect and index the modified URL instead of the original one. This behavior depends on the timing and context of the script execution, with no absolute rules. The URL Inspection tool allows you to check which version Google retains as canonical, but this unpredictability poses a risk of unintentional cannibalization.

What you need to understand

What is the History API and why is Google interested in it?

The History API is a JavaScript interface that allows manipulation of the browser's navigation history without reloading the page. It is mainly used in Single Page Applications (SPAs) to change the URL displayed in the address bar when users navigate between sections. The pushState() and replaceState() methods change the URL visible to the client, creating a smooth experience without an HTTP request.

Google crawls and indexes the web as its rendering engine sees it, not necessarily as the user perceives it. When Googlebot loads a page and executes the JavaScript that modifies the URL, it may consider this change as a navigation instruction — just like a classic 301 or 302 redirect. The engine then has to choose which URL to index: the one initially requested or the one modified by the script.

When does Google interpret this change as a redirect?

Mueller clarifies that this behavior depends on context and timing. If the URL change occurs quickly after the initial load, before the main content is rendered, Google may interpret it as a classic server-side redirect. Conversely, if the change happens after a delay or as a result of user interaction, Googlebot may consider the two URLs as distinct.

The issue is that Google does not document a precise threshold. A pushState() executed 50ms vs 500ms vs 2000ms after DOMContentLoaded can trigger different behaviors. This timing gray area leaves developers in uncertainty — it is impossible to predict with certainty which URL will be canonical without manual testing via the URL Inspection tool.

How can you check which URL Google actually retains?

The URL Inspection tool in Google Search Console remains the only reliable means. You need to test both the initially requested URL AND the URL modified by the script to compare the indexed versions. Google displays the selected canonical URL, the rendered HTML, and sometimes warning messages about detected redirects.

What does this mean in practice? Run an inspection on both URLs, compare the HTML snapshots, and verify the canonical tags injected on the server vs client side. If Google treats the change as a redirect, you will see the modified URL appear as the canonical URL selected by Google, even if you requested the initial URL. This manual diagnosis is time-consuming but essential to avoid unpleasant surprises in production.

  • The History API modifies the client-side URL without a server request, creating ambiguity for Googlebot
  • Google may interpret this change as a redirect and index the modified URL rather than the original one
  • The timing and execution context influence the decision, with no documented threshold
  • The URL Inspection tool is the only way to verify which version Google retains
  • Risk of cannibalization if multiple URLs point to the same content with conflicting canonical signals

SEO Expert opinion

Is this statement consistent with real-world observations?

Yes and no. Real-world tests indeed show that Google can index the modified URL by pushState() in certain React, Vue, or Angular applications. But the rule is not systematic. On technically identical sites, sometimes the initial URL is indexed, sometimes the modified one, without a clear pattern. [To verify]: Google has never published technical documentation specifying the exact conditions triggering this behavior.

The problem is that Mueller speaks of “context and timing” without quantifying. A delay of 100ms? 500ms? 2 seconds? This imprecision is typical of Google's statements on JavaScript rendering — many general principles, few actionable thresholds. SEOs managing SPAs know that reproducibility is low: the same code can yield different results depending on Googlebot's server load, crawl budget, or infrastructure variations.

What concrete risks does this ambiguity pose?

The main risk is unintentional cannibalization. Imagine a product page initially loaded at /product-123, where JavaScript modifies the URL to /product-123/blue after detecting the default color. If Google indexes /product-123/blue as canonical, you have two competing URLs: one with the color and one without. Ranking signals (backlinks, anchors, engagement metrics) get dispersed.

Another insidious scenario: listing filters. A /shoes page initially loads a default filter via JavaScript and modifies the URL to /shoes?size=42. Google indexes this parameterized URL as canonical, creating a conflict with your server-side canonical directives pointing to /shoes. The result: authority dilution, perceived duplication, and sometimes deindexing of the desired version.

Let's be honest: this statement resolves nothing. It confirms an already observed behavior without providing technical safeguards. Mueller suggests using the URL Inspection tool — OK, but this forces you to manually test every URL pattern on a site with thousands of pages. Not exactly scalable.

When does this behavior become blocking?

E-commerce and high pagination content sites are the most exposed. Navigation facets, dynamic filters, infinite pagers — anything relying on the History API to maintain navigation state without a complete reload — can trigger this mechanism. If your architecture relies on a “clean” indexable URL and non-indexable parameterized variants, Google may ignore your signals and canonize the variants.

In contrast, simple showcase sites or blogs with little JavaScript are less affected. The problem concentrates on complex SPA architectures where the URL reflects a rich application state. And that’s where it gets tricky: these architectures are precisely the ones where SEO is most difficult to manage, and Google adds a layer of unpredictability.

Warning: If your site heavily utilizes the History API for internal navigation, systematically audit the indexed URLs through Search Console. Compare with the URLs you want indexed. Any significant discrepancy indicates that Google is likely applying this implicit redirect mechanism.

Practical impact and recommendations

What should be prioritized in auditing your site?

Start by listing all uses of pushState() and replaceState() in your JavaScript code. Identify patterns: section navigation, filters, pagination, UI states. For each pattern, check in Search Console which URLs are actually indexed. Compare with the URLs you want to canonize. Any divergence signals a potential issue.

Use the URL Inspection tool on a representative sample: at least 20-30 URLs covering the main use cases. Check the selected canonical URL, the rendered HTML, and the injected canonical tags. If Google consistently retains the modified URL via JavaScript instead of the original URL, you have confirmation that this mechanism applies to your site. At this point, two options: adapt your architecture or force the server-side canonical signals.

What technical modifications reduce risks?

Option 1: Delay pushState() until the main content is fully rendered and indexable. Add an explicit delay or condition execution to a specific DOM event (e.g., after full rendering of critical content). This reduces the likelihood that Google interprets the change as an immediate redirect. But be careful, no guaranteed threshold — it’s trial and error.

Option 2: Align the initial URL and modified URL on the same canonical structure. If JavaScript changes /product to /product/blue, ensure that /product/blue is the canonical URL served by the server from the start. Avoid contradictions between server-side canonical and client-side. Google generally favors the server signal, but against the History API, this is no longer a certainty.

Option 3: Abandon the History API for critical SEO navigations and revert to classic links with page reloads. Less sexy in terms of UX, but infinitely more predictable for indexing. Reserve pushState() for non-SEO interactions (modals, tabs, temporary UI states). This hybrid approach limits exposure to risk while maintaining smooth navigation where it matters for the user.

How to continuously monitor this phenomenon?

Set up Search Console alerts for variations in indexed URLs. Compare monthly the list of indexed URLs with your reference XML sitemap. Any significant deviation (parameterized URLs indexed when they shouldn’t be, main URLs deindexed) should trigger a manual audit. Coverage reports and server logs cross-referenced with GSC data often reveal these discrepancies.

Use third-party crawl tools (Screaming Frog, OnCrawl, Botify) configured to execute JavaScript and compare the initial URL vs the final URL after script execution. Automate this monthly crawl and compare snapshots. If a category of URLs suddenly starts being implicitly redirected by Google due to a front-end code change, you’ll detect it before it impacts traffic.

  • List all occurrences of pushState()/replaceState() in the JavaScript code
  • Manually inspect 20-30 representative URLs via the URL Inspection tool
  • Compare indexed URLs in Search Console with the reference sitemap
  • Check the consistency of canonical tags on the server-side and client-side
  • Test a delay or condition for pushState() to reduce interpretation as a redirect
  • Set up Search Console alerts for indexing variations
The History API offers a smooth user experience but introduces a major SEO unpredictability. Google may canonize the modified URL without you precisely controlling the trigger. Systematically audit, continuously test, and prioritize architectural simplicity when SEO is critical. These optimizations require advanced technical expertise and ongoing monitoring — if the internal team lacks resources or advanced JavaScript SEO skills, consulting a specialized agency can prevent costly mistakes and accelerate compliance.

❓ Frequently Asked Questions

Google traite-t-il systématiquement un pushState() comme une redirection ?
Non, cela dépend du timing et du contexte. Un changement d'URL rapide après le chargement initial a plus de chances d'être interprété comme une redirection, mais Google ne documente pas de seuil précis.
Comment savoir quelle URL Google a indexée quand j'utilise l'History API ?
Utilise l'outil Inspection d'URL dans Google Search Console sur l'URL initiale ET l'URL modifiée. Compare l'URL canonique sélectionnée par Google et le HTML rendu pour identifier celle retenue.
Peut-on forcer Google à ignorer le changement d'URL via pushState() ?
Pas directement. Tu peux retarder l'exécution du pushState(), aligner les signaux canonical côté serveur, ou limiter l'usage de l'History API aux interactions non-SEO. Aucune méthode n'offre une garantie absolue.
Les balises canonical côté serveur priment-elles sur l'History API ?
En théorie oui, mais en pratique Google peut privilégier l'URL modifiée par JavaScript si le timing et le contexte suggèrent une redirection. Le signal serveur n'est plus systématiquement dominant face au rendu JavaScript.
Ce comportement affecte-t-il le budget crawl ?
Potentiellement oui. Si Google indexe à la fois l'URL initiale et l'URL modifiée, il crawle deux versions de la même page, diluant le budget. Vérifie les logs serveur pour détecter un crawl excessif sur des variantes d'URLs.
🏷 Related Topics
Domain Age & History Content 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.