Seo 谷歌网站链接搜索框

Seo 谷歌网站链接搜索框,seo,search-engine,google-search,schema.org,json-ld,Seo,Search Engine,Google Search,Schema.org,Json Ld,我们正在谷歌的搜索结果中为我们的网站实现搜索框。 我们在网站上有自己的搜索功能,不想使用谷歌自定义搜索 我们正在按照下一页上的说明进行操作,但发现很难进行设置。 我在头部添加了以下JSON-LD,但它不起作用 <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "WebSite", "url": "http://www.oursite.com.au/", "poten

我们正在谷歌的搜索结果中为我们的网站实现搜索框。 我们在网站上有自己的搜索功能,不想使用谷歌自定义搜索

我们正在按照下一页上的说明进行操作,但发现很难进行设置。

我在头部添加了以下JSON-LD,但它不起作用

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

{
“@context”:”http://schema.org",
“@type”:“网站”,
“url”:”http://www.oursite.com.au/",
“潜在作用”:{
“@type”:“SearchAction”,
“目标”:http://www.oursite.com.au/search.aspx?keyword={search_term}“,
“查询输入”:“所需名称=搜索项”
}

您的语法可能存在一个错误,即缺少最后一个结束括号。您的脚本也没有正确结束。我猜这两个问题都可能是由于复制到SO中造成的

为了更好地衡量,它应该如下所示:

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

{
“@context”:”http://schema.org",
“@type”:“网站”,
“url”:”http://www.oursite.com.au/",
“潜在作用”:{
“@type”:“SearchAction”,
“目标”:http://www.oursite.com.au/search.aspx?keyword={search_term}“,
“查询输入”:“所需名称=搜索项”
}
}
之后,您能否确认以下内容:

  • 是否会成功地在您的站点上搜索术语“测试”?根据规范,该搜索是否位于代码所在的同一域上
  • 在进行这些更改后,您是否允许您的站点有足够的时间进行索引