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

Can I have multiple JSON-LD scripts in the same page?

· 52CE 我爱测

The below script appears if I check the “Display the site links search box” in All in One SEO General Settings: <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "WebSite", "name": "mywebsite.com", "…

问题原文

原帖链接 · Regi · CC BY-SA 3.0

The below script appears if I check the “Display the site links search box” in All in One SEO General Settings:

<script type="application/ld+json">
        {
          "@context": "http://schema.org",
          "@type": "WebSite",         "name": "mywebsite.com",        "potentialAction": {
          "@type": "SearchAction",
          "target": "http://mywebsite.com/?s={search_term}",
          "query-input": "required name=search_term"
        }, "url": "http://mywebsite.com/"
        }
</script>

The below script appears if I configure the social sites under Social Meta:

<script type="application/ld+json">
{ "@context" : "http://schema.org",
  "@type" : "Organization",
  "name" : "My Website",
  "url" : "http://mywebsite.com",
  "sameAs" : ["https://www.facebook.com/mywebsite","https://plus.google.com/+mywebsite","https://twitter.com/mywebsite"] 
}
</script>
  1. Can I have multiple ld+json scripts in the same page?
  2. If yes, what is the significance of the two scripts?
  3. Do I need to configure additional parameters for these scripts or this is enough to boost my site's SEO ranking?

社区高分解答

原帖链接 · Mikko Piippo · CC BY-SA 3.0

  1. Yes, you can.

  2. The first script indicates the URL of internal site search to be shown in Google SERP between your main entry and sitelinks. The second script indicates your social media accounts to be shown in the Knowledge Graph.

  3. The scripts don't boost your rankings, they just give Google clues about what to include in the SERP if your site is strong enough to have a search box or your brand is important enough to get a Knowledge Graph box.

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

资料来源与适用范围

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

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

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