Official statement
Other statements from this video 12 ▾
- 1:03 Le modèle first wave / second wave du rendu JavaScript est-il encore pertinent ?
- 3:42 Le contenu JavaScript rendu est-il vraiment indexable sans friction par Google ?
- 4:46 Le dynamic rendering avec accordéons dépliés est-il du cloaking selon Google ?
- 6:56 Faut-il vraiment abandonner le dynamic rendering au profit du server-side rendering ?
- 12:05 Le contenu caché derrière un accordéon ou un onglet est-il vraiment pris en compte par Google ?
- 14:11 Les PWA ont-elles vraiment un traitement SEO identique aux sites classiques ?
- 17:54 Faut-il arrêter d'utiliser Google Cache pour diagnostiquer vos problèmes d'indexation ?
- 21:07 Google peut-il vraiment ignorer une partie de votre site sans prévenir ?
- 23:14 Faut-il vraiment s'inquiéter d'un taux de crawl faible ?
- 26:52 Pourquoi Googlebot crawle-t-il encore en HTTP/1.1 et pas en HTTP/2 ?
- 27:23 Faut-il vraiment découper ses bundles JavaScript par section de site pour le SEO ?
- 33:47 Google ignore-t-il vraiment les en-têtes Cache-Control pour le crawl ?
Google states that JavaScript-generated links are only followed if they use real <a> elements with a valid href attribute. Buttons, divs, or spans with onclick are not crawled, nor are empty or href-less <a> tags. In practical terms: if your navigation relies on pseudo-links, Googlebot will not follow your internal pages and your linking will be invisible.
What you need to understand
Why does Google emphasize the HTML structure of links?
Googlebot analyzes the final DOM after JavaScript execution, but it does not behave like a user clicking everywhere. It looks for elements with href in the rendered code. If your site uses <div onclick="navigate()"> or <button> to trigger navigation, these elements are not recognized as links by the crawler.
The distinction is technical but crucial. A standard HTML link directly exposes the destination URL in the href attribute. Googlebot can extract it and add it to its crawl queue without executing any JavaScript function. In contrast, an onclick event hides the navigation logic in code that needs to be interpreted — and Google does not systematically do this.
What are the common pitfalls with modern frameworks?
JavaScript frameworks like React, Vue, or Angular often generate single-page applications (SPAs) where navigation is managed by client-side code. By default, some components use <div> or <button> with event handlers to change views, without producing real links.
The issue worsens with malformed tags: an <a href=""> or <a href="#"> paired with an onclick may seem functional from the user's perspective, but Googlebot ignores the event and only sees an empty anchor. The result: the link is not followed, and the destination page remains orphaned.
How does Googlebot actually handle JavaScript during crawling?
Google first crawls the raw HTML, then queues the pages for JavaScript rendering. Once the JS is executed, it analyzes the final DOM. If your links appear in this DOM as <a href="/page"> elements, they are discovered and added to the crawl queue.
But if the final DOM contains only pseudo-links (spans, divs with onclick), Googlebot does not see them. It does not simulate user clicks. This logic is consistent with the official crawling guidelines: Google is looking for standard hyperlinks, not complex interactions.
- Only valid
<a href="...">elements are followed — not buttons, divs, or spans with onclick. - An empty or missing href cancels the link, even if the user can navigate via JavaScript.
- JavaScript rendering occurs after the initial crawl, but links must be present in the final DOM to be discovered.
- SPA frameworks require special attention to ensure the router generates real HTML links.
- Google does not simulate user interactions: clicking a button to reveal content will not be taken into account.
SEO Expert opinion
Is this directive really new or just a reminder?
Let's be honest: it’s not a revelation. Google has recommended the use of real HTML links for over a decade. What is changing is the frequency of reminders — a sign that too many modern sites still violate this basic rule. SPAs and front-end frameworks have multiplied bad practices to the point that Martin Splitt must regularly hammer home the obvious.
In the field, we notice that many e-commerce or media sites use styled buttons for category navigation, thinking that an onclick is sufficient. The result: entire sections of the site become orphaned from a crawling perspective, even if the JS performs well on the client side. SEO audits regularly reveal orphaned page rates exceeding 30% on sites that are supposedly “well-developed.”
What exceptions or gray areas should you know?
Google does not crawl all onclick events, but it can index content revealed by JavaScript if it is present in the DOM after rendering. However, if a button triggers the display of a modal with text, that text may be indexed — but the button itself will never be considered a navigation link.
Another gray area: dynamic links generated in JS. If your code creates a <a href="/page"> after loading, Googlebot will see it during rendering. But pay attention to the timing: if the link appears too long after loading or due to infinite scrolling, it may be missed. [To be verified] in each case using the Search Console or a rendering tool like Screaming Frog in JS mode.
When does this rule pose a real technical dilemma?
Complex web applications — dashboards, SaaS tools, collaborative platforms — often use rich UI components where navigation is not a SEO priority. In these contexts, forcing <a href> everywhere can complicate the architecture. And that’s where the problem lies: should you sacrifice usability for crawling?
The answer depends on your strategy. If your content needs to be indexed and discoverable, real links are non-negotiable. If you are managing a private app behind authentication, the question does not arise. The trap lies in the hybrid site — part SEO-friendly showcase, part JS-first app — where the boundary becomes blurred and mistakes are frequent.
Practical impact and recommendations
How to audit JavaScript links on my site?
First step: crawl your site with and without JavaScript enabled. Use Screaming Frog in JS rendering mode and compare the link graphs. If pages appear only in the JS crawl but without a valid <a href> link, you have a problem. Tools like OnCrawl or Botify also offer comparative views between raw crawl vs. JS crawl.
Second check: inspect the final DOM in Chrome DevTools after full loading. Look for navigation elements and verify they are indeed <a> with a provided href. If you see <div class="link"> or <button onclick>, it’s an immediate red flag.
What modifications should be made to React, Vue, or Angular frameworks?
Most modern frameworks offer routing components that generate real links. In React, use <Link to="/page"> from React Router instead of <div onClick={navigate}>. This component produces a <a href> in the final DOM while managing client-side navigation.
For Vue, <router-link> does the job. Angular offers routerLink as a directive on an <a>. In every case, check the generated HTML code — some developers overload these components with styles or logic that break the href. And that’s where you lose the crawl without realizing it.
What should I do if my design requires buttons for navigation?
You can style an <a> to look like a button. CSS allows you to transform any element: display: inline-block, padding, border-radius, colors — there’s nothing that requires you to keep the default rendering of a link. The important thing is the underlying HTML semantics.
If your design team insists on <button> for accessibility reasons (and that’s legitimate in certain interaction contexts), then double the navigation: keep buttons for UX, but also add visually hidden links or a comprehensive HTML sitemap. It's not ideal, but it works.
- Crawl the site with JS enabled and ensure all navigation links are
<a href>. - Inspect the final DOM in DevTools to identify pseudo-links (divs, spans, buttons).
- Use the URL inspection tool in the Search Console to compare Googlebot’s rendering to the browser rendering.
- Modify routing components (React Router, Vue Router, Angular Router) to generate real HTML links.
- Test accessibility: a real link automatically benefits from keyboard focus and standard ARIA attributes.
- Document front-end development rules so that all new navigation respects the
<a href>structure.
❓ Frequently Asked Questions
Un lien <a> sans href mais avec un onclick est-il suivi par Google ?
Les boutons <button> avec onclick peuvent-ils servir de liens internes pour le SEO ?
Est-ce que Google exécute les événements JavaScript comme les clics utilisateur ?
Comment vérifier si mes liens JavaScript sont correctement crawlés ?
Les frameworks comme React ou Vue génèrent-ils automatiquement de vrais liens ?
🎥 From the same video 12
Other SEO insights extracted from this same Google Search Central video · duration 34 min · published on 27/05/2020
🎥 Watch the full video on YouTube →
💬 Comments (0)
Be the first to comment.