只有当您的链接使用正确的 <a> 标记可解析的网址时,Google 才能跟踪这些链接:

使用正确的 <a> 标记

只有链接是含有 href 属性的 <a> 标记时,Google 才能跟踪这些链接。Google 的抓取工具不会跟踪使用其他格式的链接。Google 无法跟踪缺少 href 标记的 <a> 链接,也无法跟踪含有其他通过脚本事件起到链接作用的标记的 <a> 链接。以下是 Google 可以跟踪以及无法跟踪的链接示例:

可以跟踪的链接示例:

  • <a href="https://example.com">
  • <a href="/relative/path/file">

无法跟踪的链接示例:

  • <a routerLink="some/path">
  • <span href="https://example.com">
  • <a onclick="goto('https://example.com')">

确保 <a> 标记所链接到的网址是 Googlebot 可以向其发送请求的实际网址,例如:

可以解析:

  • https://example.com/stuff
  • /products
  • /products.php?id=123

无法解析:

  • javascript:goTo('products')
  • javascript:window.location.href='/products'
  • #

发表评论

邮箱地址不会被公开。 必填项已用*标注

16 − 11 =