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

Google has clarified in its documentation that URLs containing a hash symbol (hash) cannot be used for canonicalization.
🎥 Source video

Extracted from a Google Search Central video

💬 EN 📅 13/11/2024 ✂ 10 statements
Watch on YouTube →
Other statements from this video 9
  1. Faut-il vraiment compter sur les recommandations de la Search Console pour optimiser son site ?
  2. Pourquoi Google Search Console conserve-t-elle enfin vos filtres entre chaque changement de propriété ?
  3. Faut-il s'inquiéter de la suppression du cache Google et de l'opérateur cache: ?
  4. Faut-il encore utiliser la balise meta noarchive après la suppression du cache Google ?
  5. Le paramètre srsltid dans les URLs e-commerce : faut-il s'en préoccuper en SEO ?
  6. Faut-il vraiment créer une page pour chaque variante de mot-clé ?
  7. Pourquoi Google met-il soudainement à jour sa documentation sur le SEO vidéo, les liens de titre et les crawlers ?
  8. Faut-il vraiment limiter l'usage de l'API d'indexation aux types de contenu spécifiques ?
  9. Faut-il adopter le format AVIF maintenant que Google Images le supporte ?
📅
Official statement from (1 year ago)
TL;DR

Google has formalized in its documentation that URLs containing a fragment (hash symbol #) cannot be used as canonical targets. In practical terms, if you declare a canonical tag pointing to a URL with #, Google will ignore it. This clarification ends a gray area in technical implementation that was generating frequent configuration errors.

What you need to understand

What exactly does this technical restriction mean?

The hash symbol in a URL indicates an identification fragment — an internal anchor within a page. Technically, everything that follows the # is never sent to the server during an HTTP request. It's the browser that handles these fragments on the client side.

Google therefore treats example.com/page and example.com/page#section as the same server resource. Declaring a canonical toward a URL with a fragment therefore makes no sense from an indexing perspective: the bot cannot distinguish two different versions of the same page solely through their fragments.

Why did Google feel the need to clarify this point?

This clarification likely comes about because sites are massively using Single Page Applications (SPAs) with client-side routing. In these architectures, the # historically served to simulate different URLs without page reloads.

Result: some developers attempted to create canonicals toward fragmented URLs, thinking they could segment their indexing. Google closes this door and formalizes what was already an established practice observed in the field for years.

What are the concrete implications for indexation?

  • Any canonical tag pointing to a URL with # will be ignored by Googlebot
  • Fragments do not allow differentiation of distinct canonical versions
  • SPAs must use the HTML5 History API (pushState) to generate crawlable URLs without fragments
  • Internal anchors remain perfectly valid for user navigation and featured snippets, but do not structure indexation

SEO Expert opinion

Does this rule contradict practices observed in the field?

No, it simply formalizes what every technical SEO professional has known since SPAs transitioned to History mode. Fragments have always been ignored in canonical tag processing — Google is merely explicitly documenting existing behavior.

What's interesting is the timing. This clarification arrives while some JS frameworks continue to generate fragmented URLs by default in their initial configurations. Google is clearly pushing toward natively crawl-friendly architectures.

What nuances should be applied to this statement?

First point: fragments are still used by Google in specific contexts. Text Fragments (#:~:text=) allow linking to specific passages and appear in SERPs. But these are not canonicals — just enriched deeplinks.

Second nuance: in mobile results, Google sometimes displays anchor links under certain snippets to jump directly to a section. These fragments are dynamically generated by Google and do not depend on your canonical declaration.

Warning: If your CMS automatically generates canonicals toward URLs with fragments (some misconfigured WordPress plugins do this), you create noise in your canonicalization signals. Google ignores them, but this wastes your crawl budget unnecessarily.

In what cases does this rule create a real problem?

Essentially for older sites using Angular 1.x or Backbone.js that still use hashbang mode (#!/). These architectures are obsolete, but some legacy sites still run with them. For these, no alternative exists: migration to History API or complete redesign.

Other edge case: sites that use fragments to display content variations on the client side (e.g., filters, tabs, modals). These variations will never be indexed separately — you must generate distinct server URLs if each variation deserves its own indexing.

Practical impact and recommendations

What should you audit as a priority on your site?

First step: verify that your canonical tags contain no fragments. A simple crawl with Screaming Frog or Oncrawl is sufficient. Filter canonicals containing the # character — if you find any, correct them immediately.

Next, inspect your SPA architecture if you have one. Verify that your routing properly uses the HTML5 History API and not hash mode. In React Router, Angular, or Vue Router, this is a simple configuration parameter — but you need to have activated it.

What errors must you avoid absolutely?

  • Never declare a canonical toward a URL with a fragment, even to "group" variations
  • Do not confuse user fragments (internal navigation) and technical fragments (SPA routing) — the former are fine, the latter must disappear
  • Do not attempt to work around this limitation with 301 redirects including fragments — they will also be ignored
  • Avoid generating XML sitemaps containing fragmented URLs — Google will crawl them but will not distinguish them from the fragment-free version

How to verify your site's technical compliance?

Use Search Console and inspect your indexed pages. If Google reports URLs with fragments as declared canonicals, that's an alarm signal. You'll probably see warnings like "Malformed canonical" or "Canonical URL ignored".

On the development side, test your SPAs with Google's Mobile-Friendly Test. This tool renders JavaScript and shows you exactly which URLs Googlebot sees after execution. If fragments persist in final URLs, your routing is incorrect.

The rule is simple: no URL with a fragment can serve as a canonical. Audit your tags, migrate your SPAs to History API, and clean up your sitemaps. These optimizations often touch deep technical layers — JS architecture, server configurations, rendering logic. If these aspects escape you or if your stack is complex, guidance from a technical SEO agency can save you months and prevent costly visibility errors.

❓ Frequently Asked Questions

Les ancres internes (#section) fonctionnent-elles toujours pour la navigation utilisateur ?
Oui, les fragments restent parfaitement fonctionnels pour la navigation. Ils permettent aux utilisateurs de sauter à une section précise d'une page. Google les utilise aussi pour les featured snippets et les liens d'ancrage dans les SERPs mobiles.
Mon site SPA utilise des # dans les URLs — dois-je tout refaire ?
Si votre SPA utilise le routing avec fragments (mode hash), migrez vers l'HTML5 History API. C'est un paramètre de configuration dans la plupart des frameworks modernes (React Router, Vue Router, Angular). Sans ça, vos pages ne seront pas crawlables correctement.
Google indexe-t-il les URLs avec fragments même si je ne les déclare pas en canonical ?
Google crawle les URLs avec fragments mais les traite comme identiques à la version sans fragment. Il n'indexera pas séparément chaque variation fragmentée — tout sera consolidé sous l'URL de base.
Puis-je utiliser des fragments dans mes liens internes sans risque SEO ?
Oui, c'est même recommandé pour améliorer l'UX. Les liens d'ancrage aident les utilisateurs à naviguer dans des pages longues. Mais ne comptez pas dessus pour structurer votre indexation.
Les Text Fragments (#:~:text=) sont-ils concernés par cette restriction ?
Non, les Text Fragments sont une fonctionnalité spécifique de Google pour lier vers des passages précis. Ils ne sont pas des canoniques et fonctionnent indépendamment de cette règle.
🏷 Related Topics
Crawl & Indexing Domain Name PDF & Files

🎥 From the same video 9

Other SEO insights extracted from this same Google Search Central video · published on 13/11/2024

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