我们对搜索结果中的搜索框进行了改进
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
2014年9月23日星期二
今天,我们推出了全新的站点链接搜索框。该搜索框经过了改进,可让用户直接通过您的网站搜索页面更轻松地找到您网站上的特定内容。
该搜索框是指什么?何时会显示在我的网站上?
当用户通过名称(例如[
Megadodo Publications
]或[
Dunder Mifflin
])搜索某个公司时,他们实际上也许是想搜索相应网站上的特定内容。过去,当我们的算法识别出这种意图时,会显示更多的
站点链接
,并会在相应搜索结果下方另外显示一个搜索框,用户可以直接从搜索结果中对相应网站执行
site: searches
搜索,例如[
site:example.com hitchhiker guides
]。
现在,该搜索框更加显眼(位于站点链接上方),并支持
自动填充
功能。此外,如果您使用了正确的标记,用户还可从该搜索框直接跳转到您网站自身的搜索页面。
如何标记我的网站?
如果您按上述方法标记了自己的网站,用户将能够直接从站点链接搜索框跳转到您网站的搜索结果页面。如果我们未找到任何相应标记,我们会遵循此前一直采用的做法,为用户显示与相应的site:查询对应的Google搜索结果页面。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2014-09-01。
[null,null,["最后更新时间 (UTC):2014-09-01。"],[[["\u003cp\u003eGoogle has launched an improved sitelinks search box, displayed above sitelinks, enabling users to search specific content within a website directly from Google Search results.\u003c/p\u003e\n"],["\u003cp\u003eThe sitelinks search box appears when users search for a company or website name, indicating an intent to find something specific on that site.\u003c/p\u003e\n"],["\u003cp\u003eWebsite owners with a site-specific search engine can implement schema.org/SearchAction markup on their homepage to direct users from the sitelinks search box to their own search results.\u003c/p\u003e\n"],["\u003cp\u003eIf the markup is not implemented, Google will display a regular Google Search results page for a site: query.\u003c/p\u003e\n"],["\u003cp\u003eCommon implementation issues include ensuring the search query URL is valid and that the query-input field matches the target field's search term parameter.\u003c/p\u003e\n"]]],["The document discusses an enhanced sitelinks search box feature for websites. When users search for a company, a prominent search box may appear above sitelinks. Website owners can enable users to search their site directly from this box by implementing specific markup on their homepage, using `schema.org/WebSite` and `schema.org/SearchAction`. This markup, using JSON-LD, microdata, or RDFa, directs users to the site's search results page. Proper URL formatting and `query-input` field alignment in the markup are crucial for correct functionality. The old sitelink search box is no longer available.\n"],null,["# An improved search box within the search results\n\nFriday, September 05, 2014\n| It's been a while since we published this blog post. Some of the information may be outdated (for example, some images may be missing, and some links may not work anymore). The [sitelinks search box feature is no longer available](/search/blog/2024/10/sitelinks-search-box).\n\n\nToday you'll see a new and improved sitelinks search box. When shown, it will make it easier for\nusers to reach specific content on your site, directly through your own site-search pages.\n\nWhat's this search box and when does it appear for my site?\n-----------------------------------------------------------\n\n\nWhen users search for a company by name---for example, \"Megadodo Publications\" or\n\"Dunder Mifflin\"---they may actually be looking for something specific on that website. In the\npast, when our algorithms recognized this, they'd display a larger set of\n[sitelinks](/search/docs/appearance/sitelinks) and an additional search box\nbelow that search result, which let users do\n[`site:` searches](/search/docs/monitor-debug/search-operators/all-search-site)\nover the site straight from the results, for example `site:example.com hitchhiker guides`.\n\n\nThis search box is now more prominent (above the sitelinks), supports\n[Autocomplete](https://support.google.com/websearch/answer/106230),\nand---if you use the right markup---will send the user directly to your website's own\nsearch pages.\n\nHow can I mark up my site?\n--------------------------\n\n\nYou need to have a working site-specific search engine for your site. If you already have one, you\ncan let us know by marking up your home page as a\n[schema.org/WebSite](https://schema.org/WebSite) entity with the\n[potentialAction](https://schema.org/docs/actions.html)\nproperty of the\n[schema.org/SearchAction](https://schema.org/SearchAction)\nmarkup. You can use JSON-LD, microdata, or RDFa to do this; check out the\n[full implementation details](/search/docs/appearance/structured-data/sitelinks-searchbox)\nin our documentation.\n\n\nIf you implement the markup on your site, users will have the ability to jump directly from the\nsitelinks search box to your site's search results page. If we don't find any markup, we'll show\nthem a Google search results page for the corresponding `site:` query, as we've done\nuntil now.\n\n\nAs always, if you have questions, you can ask in our\n[Webmaster Help forum](https://support.google.com/webmasters/go/community).\n|\n| **Update (16:30h CET, September 12th)**: We're noticing an enthusiastic uptick in the markup\n| implementation after the initial announcement last week! Here are the two main issues we've\n| observed so far, and what you need to do to fix them:\n|\n| 1.\n| Make sure that when you replace the curly braces and all that's inside of it with a search\n| term it leads to a valid URL on your site.\n|\n|\n| For example: if your `target` value is\n| `https://www.example.com/search?q={searchTerm}`,\n| ensure that `https://www.example.com/search?q=foo` and\n| `https://www.example.com/search?q=bar` both lead to search result pages about\n| `foo` and `bar`.\n| 2.\n| Make sure that the `query-input` field points to the same string that's inside\n| the curly braces in the `target` field.\n|\n|\n| For example: if your `target` value is\n| `https://www.example.com/search?q={searchTerm}`, you must use\n| `searchTerm` as the `name` within `query-input`.\n\nPosted by [Mariya\nMoeva](https://twitter.com/marrrr), Webmaster Trends Analyst, and Kaylin Spitz, Software Engineer"]]