大网数据广告活动
网站运营与故障问答

Does google follow links discovered in JSON-LD?

· 52CE 我爱测

Lets say I have a site with a page of 20 products which are fed through an API. The products are loaded using infinity scroll so the initial page render has 5 products tops. Upon scrolling it adds 5 then 5 and so on. JSON-LD is u…

问题原文

原帖链接 · xaander1 · CC BY-SA 4.0

Lets say I have a site with a page of 20 products which are fed through an API. The products are loaded using infinity scroll so the initial page render has 5 products tops. Upon scrolling it adds 5 then 5 and so on.

JSON-LD is used to pass information to the search engines/crawlers. So instead of creating a JSON-LD of 5 products that the search engine will find its HTML, I create a JSON-LD of 20 products...with links to the products.

code snippet

<script type="application/ld+json">
 {
  "@context": "https://schema.org",
  "@type": "Product",
  "description": "Blah blah blah....",
  "name": "A product",
  "image": "/images/product.jpg",
  "offers": {
   "@type": "Offer",
   "availability": "https://schema.org/InStock",
   "price": "20",
   "priceCurrency": "USD"
  },
 "url": "/products/product-name"
}
</script>
.....

Will google follow the links of the products and index? Is it allowed to have a JSON-LD of products for which the crawler cannot find their HTML?

How google says they use JSON-LD from the google developers documentation:

Google uses structured data that it finds on the web to understand the content of the page, as well as to gather information about the web and the world in general. see here

已采纳解答

原帖链接 · Stephen Ostermiller · CC BY-SA 4.0

Google will almost certainly find links in JSON/LD and will crawl those pages. Regardless of how Google uses JSON/LD, Googlebot has long had heuristics to find and crawl URLs embedded in JavaScript.

I wouldn't count on Google indexing a page whose only reference is a URL embedded in JSON/LD. It isn't clear if Google passes PageRank in URLs that it finds outside of normal HTML links. In any case, you should create alternate link paths to get to each and every one of your products. I usually suggest linking every product to several other products. That is usually done with a "Related Products" type of section in the product page. Then Googlebot can easily find multiple links into each and every product and will index the most product pages.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2021-09-21)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。