Neova고급 SEO 플랫폼

링크 목적지가 onclick 속성에만 있음

Neova에서는 크롤링 자체에서 실행됩니다. 따로 설정할 것이 없습니다.

규칙 최종 검토: 2026년 10월 17일 · 가이드 업데이트: 2026년 7월 1일

Google은 href가 있는 a 요소의 링크를 따라가며, onclick 속성에만 적힌 목적지는 따라가지 않으므로, 크롤러는 이 요소를 통해서는 대상을 놓칠 수 있습니다.

해 볼 수 있는 조치

목적지를 href에 넣은 a 요소를 사용하세요. HTML 페이지에 필요하다면 onclick은 남겨 둬도 됩니다.

Neova가 플래그를 지정하는 이유

  • Google은 href가 있는 <a> 요소만 확실히 따라가므로, onclick에만 적힌 목적지는 놓칠 수 있습니다.
  • 방문자는 새 탭에서 열거나, 복사하거나, 클릭 전에 어디로 가는지 볼 수 없습니다.
  • 요소가 실제 링크가 아니면 키보드와 스크린 리더 사용자가 도달하지 못할 수 있습니다.

출처

전체 가이드

이 부분은 현재 영어로만 제공됩니다.

TL;DR: If a link's destination lives only in an onclick JavaScript handler instead of a real href, search engines usually will not treat it as a link. The fix is boring but non-negotiable: put the URL in an <a href>. Everything else is a workaround for a problem you created.
Element
LI-023
Category
Links / Crawlability
Severity
High
Effort
Low
Detection
HTML source

You have a clickable element that sends a user somewhere, but the destination URL is not in the anchor's href attribute. Instead it lives inside a JavaScript click handler. Classic shapes of this look like:

<a href="#" onclick="location.href='/pricing/'">Pricing</a>
<span onclick="window.open('/pricing/')">Pricing</span>
<div class="card" onclick="goTo('/pricing/')">Pricing</div>
<button onclick="navigate('/pricing/')">Pricing</button>

To a human with a mouse, all four behave the same: click, arrive at the pricing page. To a crawler reading the raw HTML, three of them are dead ends and the first one points at # (the current page). The real URL is trapped in script that the crawler may never execute the way a browser does.

Googlebot renders pages, so people assume onclick navigation "works for SEO." It sometimes does and often does not, and betting your internal linking on "sometimes" is a bad trade. Here is what is really going on:

  • Discovery. Google's own documentation is explicit: it follows links only when they are <a> tags with an href attribute. A span or div with an onclick is not a link in their eyes, even after rendering. If a page is reachable only through onclick handlers, it may never be found.
  • PageRank flow. Even when a URL gets crawled through some other path, a non-href "link" passes no internal link signal. Your money pages stop receiving the internal equity you think you are sending them.
  • Rendering is not guaranteed or free. Rendering happens on a delay and on a budget. Relying on JavaScript execution to expose your navigation means slower discovery at best and missed pages at worst.
  • Accessibility collapses too. A div onclick is not keyboard focusable, exposes no destination to screen readers, and breaks middle-click, open-in-new-tab, and "copy link address." This is the same root cause hurting both SEO and real users.

The Spectrum: From Invisible to Fully Crawlable

Not crawlable Fully crawlable div onclick no href invisible

a href="#" onclick nav points nowhere

a href + onclick real URL, JS on top

plain a href real URL no JS needed

How to Detect It

Tool How to Find Onclick Navigation
View source / DevTools Search the raw HTML for onclick. Anything with a URL inside that is not backed by an href is a suspect.
Screaming Frog Crawl with JavaScript rendering off, then on. Pages that appear only in the rendered crawl are likely reachable only through scripted navigation.
Sitebulb Compares rendered vs raw links and flags links that exist only after JavaScript runs.
Search Console URL Inspection Use "View crawled page" to see the rendered HTML Google stored, and check whether your target links resolve to real anchors.
Server logs If Googlebot never requests a URL that should be internally linked, the link it depends on probably is not a real anchor.

How to Fix It, Step by Step

  1. Find the destination. Read the onclick handler and pull out the actual URL it navigates to.
  2. Put it in an anchor. Replace the element with <a href="https://example.com/real-url/">Label</a>. If it was a div or span acting as a button, make it a genuine anchor.
  3. Keep JavaScript only if it adds behavior. Analytics, SPA routing, or a modal are fine as an enhancement layered on top of a working href. The pattern is <a href="https://example.com/pricing/" onclick="track(); return spaRoute(event)">, where the href is the source of truth and JS is optional polish.
  4. Never use href="#" or href="javascript:void(0)" as the real link. Those tell the crawler the destination is the current page or nothing. Put the actual path in.
  5. Re-crawl and confirm. Run Screaming Frog again with rendering off. Your previously hidden pages should now appear as normal internal links.

DO

  • Put every real destination in an <a href>
  • Use JavaScript as an enhancement on top of a working link
  • Keep middle-click and open-in-new-tab working
  • Make card-style clickable blocks wrap a real anchor
  • Re-crawl with rendering off to confirm links are visible

DON'T

  • Hide URLs inside onclick with no href
  • Use href="#" or javascript:void(0) as the destination
  • Make div or span elements your primary navigation
  • Assume rendering will always rescue you
  • Route important internal links through scripted handlers only

What "Good" Looks Like

Open the page, disable JavaScript, and click your main navigation and internal links. If they still work, you are done. Every important destination resolves from a plain anchor in the raw HTML, JavaScript adds tracking or transitions without being load-bearing, and a rendering-off crawl surfaces the same link graph a rendering-on crawl does. When those three things are true, crawlers see what users see and your internal equity flows where you intend.

FAQ

Does Google Not Just Render the JavaScript and Follow It Anyway?
Sometimes. Google renders pages, but it only treats <a href> tags as links for discovery and PageRank. A scripted onclick navigation is not a link even after rendering, so it may be crawled through another path or not at all, and it passes no internal link signal.
Is It Fine to Keep the Onclick If I Also Add a Proper href?
Yes. That is the correct pattern. Put the real URL in the href so crawlers and assistive tech get the destination, and keep the onclick for analytics or single-page-app routing. The link works with or without the script.
My Whole-Card Click Uses Onclick. How Do I Fix That Without Redesigning?
Wrap the card content in a single anchor pointing at the destination, then stretch that anchor over the card with CSS (a positioned pseudo-element). You keep the big clickable area and gain a real, crawlable link.
Does This Hurt Accessibility as Well as SEO?
Badly. A div onclick is not keyboard focusable, announces no destination to screen readers, and breaks open-in-new-tab and copy-link. Fixing it with a real anchor solves the SEO and the accessibility problem at once.

An audit that compares your rendered and raw crawls will show exactly which pages are reachable only through scripted navigation, and what it is costing your internal linking.

내 사이트에서 찾아보기

Neova는 크롤링할 때마다 이 점검과 다른 모든 점검을 실행하고, 수정 방법을 팀을 위한 티켓으로 작성합니다.

  • Mac, Windows, Linux용 데스크톱 앱
  • 출처가 함께 있는 696개 점검 전체
  • Search Console과 Analytics 4를 읽기 전용으로 연결
  • Jira, Linear, Asana로 티켓 보내기

Neova 다운로드 Desktop Free 플랜 또는 Solo 14일 무료, 카드 불필요.

링크 점검 전체 · 가이드 · 점검 라이브러리

작성: Neova Labs · 점검 라이브러리로 돌아가기