Google附加链接搜索框摘要不起作用 [英] Google sitelinks search box snippet doesn't work

查看:107
本文介绍了Google附加链接搜索框摘要不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据 https://developers.google.com/webmasters/richsnippets/sitelinkssearch .

我的实现如下:

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

如果用关键字替换{Q}并且搜索字段的名称为"Q",则目标可以工作.此实现有问题吗?

The target works if you replace {Q} by a keyword and the name of the search field is "Q". Is there something wrong with this implementation?

我已将代码放在页面底部的body标签内.

I've put the code inside the body tag, at the bottom of the page.

推荐答案

我注意到这对petmd.com现在有效,因此,除非您进行了任何更改,否则我怀疑您没有足够长的时间供Google选择上.

I noticed this is now working for petmd.com so, unless you changed anything, I suspect you just didn't give it long enough for Google to pick this up.

要对其他任何人寻找的时间框架有所了解,我将在下面记录我的经历(请注意,这将根据您网站的大小而改变):

To give some idea of the time frames involved for anyone else looking for this I'll note my experiences below (note this will change depending on the size of your site):

我在我的网站主页上添加了与上面类似的代码段.我使用Google Web Master Tools上的以Google身份获取"将主页再次提交给Google,以试图迫使其尽快重新抓取.

I added a snippet similar to above to the home page of my website. I used "Fetch as Google" on Google Web Master Tools to submit the home page to Google again to try to force it to recrawl ASAP.

几天后,我在搜索外观"->结构化数据"中看到了Google网站站长工具上的代码段,然后点击它显示了所有数据均已正确提取,因此看起来一切正常,但Google结果框上的附加链接搜索框仍然在Google本地而不是通过我的网站使用.

Within a few days I saw the snippet on Google Webmaster Tools in Search Appearance->Structured Data and clicking on it showed all the data was picked up correctly so all looked good but the Sitelinks Search Box on the Google Results box still was used locally in Google rather than via my website.

"Google结果"框中的附加链接搜索框"又花了3个半星期才能重定向到我网站的搜索页面.

It took a further 3 and a half weeks for the Sitelinks Search Box on the Google Results box to redirect to my site's search page.

因此添加时只需要耐心,因为可能要花几周的时间.请注意,更新后,搜索结果或Google Web Master工具没有明显变化,因此您只需要继续尝试测试搜索,看看它是否已更新为指向您的网站.

So you just have to be patient when adding this as it can take a few weeks. Note after it's updated there is no visible change to the search results or Google Web Master Tools so you just have to keep trying a test search to see if it's updated to point to your website yet.

这篇关于Google附加链接搜索框摘要不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆