What does Google say about SEO? /

Official statement

HTML button elements are not considered links by Googlebot. For a link that looks like a button, use a normal HTML link styled in CSS instead of a button with JavaScript.
42:21
🎥 Source video

Extracted from a Google Search Central video

⏱ 1h00 💬 EN 📅 15/01/2021 ✂ 20 statements
Watch on YouTube (42:21) →
Other statements from this video 19
  1. 1:41 Why doesn’t Google always take manual action against low-quality content?
  2. 3:43 Why do your Core Web Vitals differ so much between lab and field?
  3. 5:23 Where do Core Web Vitals data in Search Console really come from?
  4. 7:23 Does choosing ccTLD or subdirectories really give you an SEO advantage for international markets?
  5. 7:37 Why do URL restructurings cause traffic fluctuations for 1 to 2 months?
  6. 10:15 Is it really necessary to optimize for search intent or is it just a semantic trap?
  7. 11:48 Should you optimize your content for BERT, or is it a waste of time?
  8. 15:57 How can you tell if SafeSearch is penalizing your content in Google results?
  9. 17:32 Does SafeSearch really block your rich results?
  10. 19:38 Are Core Web Vitals really applicable everywhere in the world?
  11. 22:33 Does Google truly treat all synonyms and keyword variations the same way?
  12. 26:34 Should you really redirect ALL URLs during a migration?
  13. 27:27 Does using noindex during migration mean you're losing all your SEO value in Google's eyes?
  14. 28:43 Do complex migrations really lead to ranking fluctuations?
  15. 32:25 Do Web Stories really count as regular pages for Google?
  16. 34:58 Does Infinite Scroll Really Hinder Your Content's Indexing on Google?
  17. 46:50 Can hreflang really substitute for internal links on your international pages?
  18. 48:46 What does Google really consider to be crossing the line with paid links?
  19. 50:48 Should you really implement all Schema.org types to boost your SEO?
📅
Official statement from (5 years ago)
TL;DR

Googlebot does not recognize HTML <button> elements as links — they are invisible to the crawler. If you use buttons with JavaScript for navigation, you create dead ends in your architecture. The solution: systematically replace buttons with CSS-stylized <a> tags to maintain appearance without sacrificing crawlability.

What you need to understand

What is an HTML button and why does Googlebot ignore it?

An HTML button (<button>) is an interactive element designed to trigger an action — submit a form, open a modal, launch a script. It was never intended as a navigation vector. Googlebot, on the other hand, looks for hyperlinks (<a href="...">) to discover and index your pages.

When a developer uses <button onclick="navigateTo('/page')"> with JavaScript to simulate a link, they create a black hole for the crawler. No href attribute, no native HTML signal: Googlebot passes right by. It doesn't matter that the button works perfectly on the user side — to the engine, it simply doesn't exist.

Why do some sites fall into this trap?

The mistake often comes from a confusion between design and semantics. Frontend teams want a visually distinct button (color, relief, animation) and instinctively choose <button>. They then add a onClick JavaScript to handle navigation, thinking that Google will "understand" the intent.

Modern JavaScript frameworks (React, Vue, Angular) exacerbate the problem by making it easy to create clickable button components without going through <a> tags. The result: SPA (Single Page Applications) filled with buttons that are invisible to Googlebot, leading to a catastrophic discovery rate of deep pages.

What is the difference between a styled link and a JavaScript button?

An ordinary HTML link (<a href="/category/product">) is natively crawlable — Googlebot reads the URL, follows the link, indexes the destination. You can style it with CSS (background, border-radius, padding) to make it look pixel-for-pixel like a button, without losing its navigation function.

A button with JavaScript (<button onclick="router.push('/product')">) works for the user but forces Google to execute the JS to detect the target URL. The problem: Google limits the rendering budget and does not guarantee complete execution of JavaScript on all pages. The result: some URLs are never discovered.

  • Tag <a> with href: guaranteed crawl, immediate indexing, passing of PageRank.
  • Button <button> + JavaScript: random crawl, delayed or no discovery, no authority passing.
  • CSS styling on a link: retains all SEO benefits of a native link with the appearance of a button.
  • Progressive enhancement: always start with a functional <a>, then enhance with JS if necessary.
  • Regular audits: track button-links in the source code and systematically replace them.

SEO Expert opinion

Is this statement consistent with field observations?

Absolutely — and it confirms what has been observed for years on poorly configured SPA sites. Crawl audits regularly reveal orphan pages accessible through user navigation but absent from the Search Console coverage report. The cause? Button components without href.

I have seen e-commerce sites lose 40% of their product listings from the index because category navigation relied on <button> React components with history.push(). Googlebot crawled the homepage, found zero outgoing links, and stopped there. A switch to <Link> Next.js (which compiles into <a> HTML) was enough to recover indexing within two weeks.

What nuances should be added to this rule?

Google can sometimes discover URLs via JavaScript — but it’s a risky bet. The rendering depends on crawl budget, page priority, server load. On a site with 10,000 pages, not all will be rendered. Relying on JS for navigation is like playing Russian roulette with your indexing.

Another point: internal links in JavaScript do not guarantee PageRank transmission. Google has confirmed that links discovered after rendering “may” pass juice, but without specifying the conditions. [To verify]: no public study quantifies PageRank loss on JS links versus native HTML links. My field intuition? A minimum loss of 20-30%.

In what cases is a button still acceptable?

A <button> is legitimate for non-navigational actions: submitting a form (type="submit"), opening a modal, toggling a dropdown menu, launching an AJAX filter. As soon as the action changes the URL or leads to a new page, it’s a link, not a button.

Concrete example: a button “Add to Cart” that opens a popup without changing the page? Perfect <button>. A button “View Product” that redirects to /product/123? <a href="/product/123"> styled like a button. HTML semantics matter — they determine what Googlebot sees.

Warning: even if your JavaScript works in navigation, the absence of <a href> blocks crawl. Always plan for an HTML fallback for the discovery of critical URLs.

Practical impact and recommendations

What should be done concretely on an existing site?

First step: a source code audit. Use Chrome DevTools or a crawler like Screaming Frog in “Render JS” mode vs. “HTML only.” Compare the two: if links only appear after rendering, they rely on JavaScript. Identify all <button> elements with onClick that trigger navigation.

Next, systematically refactor these buttons into <a href="...">. Keep existing CSS classes to maintain the design. If you use React/Vue, prioritize <Link> or <router-link> components that generate valid <a> tags in HTML. Then verify in the rendered source code (Ctrl+U) that the href attributes are present.

What mistakes should be avoided during the migration?

Don't just add a href to a <button> — that remains invalid in HTML5. A button cannot have a href attribute. The only valid solution: replace <button> with <a> and apply your CSS styles (display: inline-block, padding, background, etc.).

Another trap: leaving a preventDefault() JavaScript that blocks the native link navigation. If you enhance a <a> with JS (analytics, animations), ensure that the default click works without JavaScript. Progressive enhancement: the link should work even if the script fails.

How to verify that the fix worked?

Crawl your site with Screaming Frog in “HTML only” mode (JavaScript disabled). All your critical navigation links must appear. If a page is only discovered in “Render JS” mode, it remains vulnerable. Also check the Search Console coverage report: previously orphaned pages should be reindexed within 2-4 weeks.

Test the internal PageRank passing with a tool like Oncrawl or Botify. Deep pages accessible only via JS buttons should see their internal authority score increase after migration to <a>. If not, check that old buttons weren’t mistakenly replaced by nofollow links.

  • Audit the source code to identify <button onClick> navigation.
  • Replace all button-links with <a href> with identical CSS classes.
  • Check that the href attributes are visible in the raw HTML (Ctrl+U).
  • Crawl in “HTML only” mode to confirm the discovery of critical pages.
  • Monitor the indexing rate in Search Console post-migration.
  • Test behavior without JavaScript (navigation must remain functional).
These technical optimizations often touch upon the very architecture of your site — between code refactoring, crawl verification, and indexing monitoring, the load can quickly become substantial. If you manage a complex site or lack internal resources, hiring a specialized SEO agency can speed up compliance and secure execution, especially if your tech stack involves advanced JavaScript frameworks.

❓ Frequently Asked Questions

Google peut-il quand même découvrir mes pages via des boutons JavaScript ?
Parfois oui, si Googlebot rend la page et exécute le JS. Mais c'est aléatoire, dépendant du crawl budget, et ne garantit ni l'indexation ni le passage de PageRank. Miser sur le rendering JS pour la découverte est un pari risqué.
Un bouton stylisé en lien perd-il ses fonctionnalités interactives ?
Non. Avec CSS, vous reproduisez à l'identique l'apparence d'un bouton (hover, focus, active). Vous pouvez même ajouter du JavaScript pour enrichir l'interaction, tant que le lien reste fonctionnel sans JS.
Les frameworks comme React ou Vue posent-ils problème pour le crawl ?
Seulement si vous utilisez des composants qui ne compilent pas en <a href> HTML. Les composants Link de Next.js, Nuxt.js ou React Router génèrent des balises <a> valides — vérifiez juste le rendu HTML final.
Faut-il réécrire tout mon site si j'ai des boutons de navigation ?
Pas forcément tout. Priorisez les pages stratégiques (catégories, fiches produits, contenus piliers). Un audit crawl ciblé vous dira quelles zones sont impactées et où concentrer l'effort de refactoring.
Un bouton avec href est-il une alternative valide ?
Non, c'est invalide en HTML5 — un <button> ne peut pas avoir d'attribut href. La seule solution conforme et crawlable : remplacer le bouton par un <a> et le styliser en CSS.
🏷 Related Topics
Crawl & Indexing JavaScript & Technical SEO Links & Backlinks

🎥 From the same video 19

Other SEO insights extracted from this same Google Search Central video · duration 1h00 · published on 15/01/2021

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