Neova高级 SEO 平台

内部链接只出现在渲染后的 HTML 中

在 Neova 中 直接在抓取过程中运行,无需任何设置。

规则最近审核:2026年10月17日 · 指南更新:2026年7月2日

不运行 JavaScript 的爬虫无法从该 HTML 页面发现这些内部链接。菜单、分类、分页和产品链接最为重要。没有任何搜索引擎规定这一上限。这只是提醒您查看。

您可以做什么

在服务器端 HTML 中,把重要的内部链接输出为带 href 的 a 元素。

Neova 为何标记

  • Google 主要通过跟踪 <a href> 链接发现页面,不运行 JavaScript 的爬虫完全看不到这些链接。
  • 菜单、分类、分页和商品链接最重要,因为它们通向其他大部分页面。
  • 没有搜索引擎在这里规定限制;这是提醒您检查哪些链接依赖脚本。

来源

完整指南

这一部分目前只有英文版。

Element Code: PE-020

TL;DR: Google discovers links only from <a> tags with a real URL in the href attribute. Navigation built with onclick handlers, divs, buttons, or javascript:void(0) is invisible for link discovery, passes no link equity, and quietly orphans the pages behind it. Put a crawlable href on everything that navigates.
Severity
High
Affects
Crawling, discovery, PageRank flow
Common in
SPAs, menus, filters
Detection
Screaming Frog JS crawl
Fix effort
Low to medium (dev work)

A JavaScript link is any clickable element that navigates the user through script instead of through a standard anchor. The usual shapes: a <div> or <span> with an onclick handler that sets window.location, a <button> wired to a router, an anchor with href="#" or href="javascript:void(0)" where the real destination lives only in the click handler, or a menu component that builds its navigation entirely in event listeners.

To a human with a mouse, these work perfectly. That is exactly why they survive code review. To a crawler, they mostly do not exist, and Google is unambiguous about this: its JavaScript SEO documentation states that Google can follow links only if they are <a> tags with an href attribute. Googlebot does not click things. It renders the page, extracts URLs from anchor hrefs, and moves on. A destination that only materializes when an event handler fires is a destination Googlebot never learns about from that page.

Why This Hits Harder Than Most Technical Issues

Most technical SEO problems degrade something. This one deletes something. Three separate losses stack up:

Discovery. If the only paths to your product detail pages run through a JavaScript-driven filter or a scripted menu, those pages are orphans in Google's link graph. They might still get found through the XML Sitemap, but sitemap-only URLs crawl slower, and a page with zero internal links pointing at it starts life with a credibility problem.

Link equity. PageRank flows through anchors. A div with a click handler passes nothing. I have watched a retailer rebuild its category navigation as a scripted mega-menu and wondered why deep categories bled positions over the following weeks: the pages were still in the sitemap, still indexed, but the internal links that had been feeding them authority had effectively vanished. The damn pages looked linked to every human who checked.

Anchor text. Even when a page gets discovered another way, the descriptive anchor text that tells Google what the target is about never gets attributed. "Waterproof hiking boots" as anchor text is a relevance signal you are throwing away.

And beyond SEO: script-only navigation usually breaks middle-click to open in a new tab, breaks keyboard navigation and screen readers, and breaks the browser's link preview. The accessibility failure and the crawlability failure are the same failure.

Which Patterns Are Crawlable

How is the link coded? <a href="https://example.com/boots/"> + optional JS enhancement <a href="#" onclick=...> <a href="javascript:..."> <div onclick=...> <button onClick={route}> CRAWLABLE URL discovered, equity flows, anchor text counts DEAD END Anchor exists but points at nothing; destination invisible NOT A LINK Googlebot does not click; target page gets nothing Rule: the destination URL must exist in the href of an <a> tag in the rendered HTML.

Pattern Reference

Pattern Googlebot Follows It? Verdict
<a href="https://example.com/page/"> Yes The standard. Use it.
<a href="https://example.com/page/" onclick="..."> Yes Fine. JS enhances, href remains the source of truth.
SPA router link rendering a real href Yes React Router Link, Next.js Link, Vue router-link all output proper anchors. Verify in rendered HTML.
<a href="#"> + handler No (follows to #, i.e. nowhere) Replace the # with the real destination.
<a href="javascript:void(0)"> No Google explicitly warns against javascript: URLs in links.
<div onclick="location.href=..."> No Invisible as a link. Rebuild as an anchor.
<button> that routes No Buttons are for actions (submit, toggle). Navigation gets an anchor.

How to Detect It on Your Site

  1. Compare a raw crawl to a rendered crawl. In Screaming Frog, crawl once with plain HTML extraction, then again with JavaScript rendering enabled (Config, Spider, Rendering). Now compare inlinks per URL. Pages with healthy inlink counts in neither crawl, but which you know your menus "link" to, are your victims. Sitebulb runs the same comparison and visualizes the delta nicely.
  2. Disable JavaScript and click around. Toggle JS off in DevTools (Command palette, "Disable JavaScript") and try to use your main nav, faceted filters, pagination, and footer. Anything that stops being a followable link deserves scrutiny. This five-minute test finds most offenders.
  3. Inspect the rendered HTML in Search Console. URL Inspection, Test Live URL, View Tested Page. Search the rendered source for the hrefs you expect. If your category page's product links are not in that HTML as anchors, Google is not seeing them either.
  4. Grep the codebase. Searching templates for javascript:void, href="#", and onclick near navigation components is crude and effective.
  5. Watch server logs. Sections of the site Googlebot rarely requests, despite being "linked" from high-traffic templates, are a symptom worth chasing back to the markup.

How to Fix It

  1. Give every navigation element a real anchor. The destination URL goes in the href. If you want client-side routing on top, attach the handler to the anchor and call preventDefault; crawlers read the href, users get the SPA experience. This is standard progressive enhancement and every major framework supports it out of the box.
  2. Use your framework's link component, not raw handlers. Next.js Link, React Router Link, Nuxt's NuxtLink all render anchors with hrefs. The bugs appear when developers bypass them with onClick navigation on divs and buttons.
  3. Make filter and pagination states real URLs where you want them indexed. A "load more" button can stay a button if a crawlable paginated alternative exists in the markup.
  4. Keep buttons for actions. Add to cart, open modal, toggle menu: buttons. Go to another URL: anchor. This split also fixes your accessibility story for free.
  5. Re-crawl after the fix. Rendered Screaming Frog crawl, confirm the target pages now show inlinks with sensible anchor text, then watch crawl stats pick up over the following weeks.

What good looks like: every URL you care about is reachable through anchor hrefs present in the rendered HTML, no javascript: or bare # hrefs anywhere in navigation, and your raw versus rendered crawls tell approximately the same link story.

DO

  • Put the real destination URL in every anchor's href
  • Layer JS behavior on top of working anchors (preventDefault pattern)
  • Use framework link components that render true anchors
  • Verify links exist in the rendered HTML, not just in the browser
  • Audit nav, filters, and pagination after every front-end redesign
DON'T

  • Navigate with divs, spans, or buttons plus click handlers
  • Ship href="#" or javascript:void(0) in navigation
  • Assume the sitemap compensates for missing internal links
  • Trust that "it works when I click it" means crawlers see it
  • Hide your only path to deep pages inside scripted mega-menus

FAQ

Google Renders JavaScript Now. Doesn't That Make This a Non-Issue?
No. Rendering means Google executes your JS and reads the resulting DOM. It still only extracts links from anchor hrefs in that rendered DOM. It does not simulate clicks, so a URL that only exists inside an event handler stays invisible regardless of rendering.
My Pages Are Indexed Anyway via the Sitemap. Why Should I Care?
Indexed is the floor, not the goal. Sitemap-only pages receive no internal link equity and no anchor text signals, and they tend to get crawled less often. They rank like the orphans they are.
Is Onclick on an Anchor With a Real href Okay?
Yes. That is the recommended pattern: the href carries the crawlable destination, the handler upgrades the experience for users. Just make sure the href and the handler agree on where the user ends up.
What About Links That Appear Only After User Interaction, Like an Accordion or a Tab?
If the anchors are in the DOM on load and merely hidden with CSS, Google reads them. If the interaction fetches or builds the links after a click, Google never sees them, because it does not click. Render the anchors up front and toggle visibility instead.
Do JavaScript Links at Least Pass PageRank If Google Finds the URL Some Other Way?
No. Link equity flows through the anchor itself. If the anchor does not exist as a crawlable link, there is nothing to flow through, however Google discovered the destination.
Suspect your internal linking is weaker than it looks?

An advanced audit compares your raw and rendered link graphs, finds the pages your navigation silently abandoned, and hands your developers an exact fix list.

在您自己的网站上找到它

Neova 在每次抓取时都会运行此检查项和其他所有检查项,然后把修复方法写成工单交给您的团队。

  • 适用于 Mac、Windows 和 Linux 的桌面应用
  • 全部 696 项检查,每项都附来源
  • Search Console 和 Analytics 4,以只读方式连接
  • 工单发送到 Jira、Linear 和 Asana

下载 Neova Desktop Free 套餐,或免费试用 Solo 14 天,无需银行卡。

全部可索引性检查 · 指南 · 检查项库

作者:Neova Labs · 返回检查项库