FAQ(FAQPage
、Question
、Answer
)结构化数据
常见问题解答 (FAQ) 页包含一系列有关特定主题的问题和回答。如果您正确标记了 FAQ 页,它们可能会在 Google 搜索中显示为富媒体搜索结果,并可通过 Google 助理的 Action,帮助您的网站覆盖合适的用户。
How to add structured data
Structured data is a standardized format for providing information about a page and classifying the page content. If you're new to structured data, you can learn more about how structured data works.
Here's an overview of how to build, test, and release structured data.
- Add the required properties. Based on the format you're using, learn where to insert structured data on the page.
- Follow the guidelines.
- Validate your code using the Rich Results Test and fix any critical errors. Consider also fixing any non-critical issues that may be flagged in the tool, as they can help improve the quality of your structured data (however, this isn't necessary to be eligible for rich results).
- Deploy a few pages that include your structured data and use the URL Inspection tool to test how Google sees the page. Be sure that your page is
accessible to Google and not blocked by a robots.txt file, the
noindex
tag, or login requirements. If the page looks okay, you can ask Google to recrawl your URLs. - To keep Google informed of future changes, we recommend that you submit a sitemap. You can automate this with the Search Console Sitemap API.
功能可用性
FAQ 富媒体搜索结果适用于侧重政府或健康内容的知名权威网站。此功能适用于 Google 搜索支持的所有国家/地区和语言的桌面设备和移动设备。
示例
下面是一个 JSON-LD 格式的 FAQPage
示例:
<html> <head> <title>Finding an apprenticeship - Frequently Asked Questions(FAQ)</title> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{ "@type": "Question", "name": "How to find an apprenticeship?", "acceptedAnswer": { "@type": "Answer", "text": "<p>We provide an official service to search through available apprenticeships. To get started, create an account here, specify the desired region, and your preferences. You will be able to search through all officially registered open apprenticeships.</p>" } }, { "@type": "Question", "name": "Whom to contact?", "acceptedAnswer": { "@type": "Answer", "text": "You can contact the apprenticeship office through our official phone hotline above, or with the web-form below. We generally respond to written requests within 7-10 days." } }] } </script> </head> <body> </body> </html>
下面是一个微数据格式的 FAQPage
示例:
<html itemscope itemtype="https://schema.org/FAQPage"> <head></head> <body> <h1> Frequently Asked Questions(FAQ) </h1> <div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question"> <h2 itemprop="name">How to find an apprenticeship?</h2> <div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer"> <div itemprop="text"> We provide an official service to search through available apprenticeships. To get started, create an account here, specify the desired region, and your preferences. You will be able to search through all officially registered open apprenticeships. </div> </div> </div> <div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question"> <h2 itemprop="name">Whom to contact?</h2> <div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer"> <div itemprop="text"> You can contact the apprenticeship office through our official phone hotline above, or with the web-form below. We generally respond to written requests within 7-10 days. </div> </div> </div> </body> </html>
指南
要让您的常见问题解答页能够显示为富媒体搜索结果,您必须遵循以下指南:
内容指南
- 您的网站必须是健康类网站或政府网站。该网站还必须广为人知且权威。
- 请仅在您的网页包含 FAQ(其中,每个问题都有答案)时使用
FAQPage
。如果您的网页中只列出了一个问题且用户可以提交备选答案,请改用QAPage
。下面是一些示例:有效用例:
- 由健康网站本身编写的一个 FAQ 网页,用户无法在该网页上提交备选答案
- 一个政府机构的支持网页,其中列有常见问题解答,用户无法在该网页上提交备选回答
无效用例:
- 一个论坛网页,用户可以在该网页上提交单个问题的答案
- 一个产品支持页,用户可以在该网页上提交单个问题的答案
- 一个产品页面,用户可以在这个页面上提交多个问题和答案
- 请勿将
FAQPage
用于广告宣传。 - 确保每个
Question
包含完整的问题内容,并确保每个Answer
包含完整的答案内容。可以显示整个问题和答案内容。 - 如果问题和答案包含以下任何类型的内容,那么它们可能不会显示为富媒体搜索结果:淫秽、亵渎、露骨色情、血腥暴力、宣传危险/违法活动,或仇恨性/骚扰性语言。
- 所有
FAQ
内容都必须在源网页上对用户可见。以下是一些示例:有效用例:
- 问题和答案在网页上都对用户可见。
- 问题在网页上可见,而答案隐藏在可展开的部分。用户可以通过点击可展开的部分查看答案。
无效用例:用户根本无法在网页上找到 FAQ 内容。
- 如果您的网站上存在重复的 FAQ 内容(也就是说,相同的问题和答案出现在您网站的多个网页上),在整个网站上,请仅标记一处该内容。
结构化数据类型定义
要使您的内容能够显示为富媒体搜索结果,您必须为其添加必需属性。你还可以添加建议的属性,以便向结构化数据添加更多信息,进而提供更好的用户体验。
FAQPage
schema.org 上提供了 FAQPage 的完整定义。
FAQPage
类型表示网页是包含已获解答问题的 FAQ 页。每个网页都必须有一个 FAQPage
类型定义。
Google 支持的属性如下:
必要属性 | |
---|---|
mainEntity |
Question
以 |
Question
如需了解 Question
的完整定义,请访问 schema.org。
Question
类型定义了 FAQ 中的一个已获解答的问题。每个 Question
实例都必须包含在 schema.org/FAQPage
的 mainEntity
属性数组中。
Google 支持的属性如下:
必要属性 | |
---|---|
acceptedAnswer |
Answer
问题的答案。每个问题必须有一个答案。 |
name |
Text
问题的完整内容。例如,“处理退款需要多长时间?”。 |
Answer
如需了解 Answer
的完整定义,请访问 schema.org。
Answer
类型定义了相应网页上每个 Question
的 acceptedAnswer
。
Google 支持的属性如下:
必要属性 | |
---|---|
text |
Text
问题的完整答案。答案可能包含 HTML 内容(如链接和列表)。Google 搜索会显示以下 HTML 标记,所有其他标记均会被忽略: |
Monitor rich results with Search Console
Search Console is a tool that helps you monitor how your pages perform in Google Search. You don't have to sign up for Search Console to be included in Google Search results, but it can help you understand and improve how Google sees your site. We recommend checking Search Console in the following cases:
- After deploying structured data for the first time
- After releasing new templates or updating your code
- Analyzing traffic periodically
After deploying structured data for the first time
After Google has indexed your pages, look for issues using the relevant Rich result status report. Ideally, there will be an increase of valid items, and no increase in invalid items. If you find issues in your structured data:
- Fix the invalid items.
- Inspect a live URL to check if the issue persists.
- Request validation using the status report.
After releasing new templates or updating your code
When you make significant changes to your website, monitor for increases in structured data invalid items.- If you see an increase in invalid items, perhaps you rolled out a new template that doesn't work, or your site interacts with the existing template in a new and bad way.
- If you see a decrease in valid items (not matched by an increase in invalid items), perhaps you are no longer embedding structured data in your pages. Use the URL Inspection tool to learn what is causing the issue.
Analyzing traffic periodically
Analyze your Google Search traffic using the Performance Report. The data will show you how often your page appears as a rich result in Search, how often users click on it and what is the average position you appear on search results. You can also automatically pull these results with the Search Console API.问题排查
如果您在实施或调试结构化数据时遇到问题,请查看下面列出的一些实用资源。
- 如果您使用了内容管理系统 (CMS) 或其他人负责管理您的网站,请向其寻求帮助。请务必向其转发列明问题细节的任何 Search Console 消息。
- Google 不能保证使用结构化数据的功能一定会显示在搜索结果中。如需查看导致 Google 无法将您的内容显示为富媒体搜索结果的各种常见原因,请参阅结构化数据常规指南。
- 您的结构化数据可能存在错误。请参阅结构化数据错误列表。
- 如果您的网页受到结构化数据手动操作的影响,其中的结构化数据将会被忽略(但该网页仍可能会出现在 Google 搜索结果中)。如需修正结构化数据问题,请使用“人工处置措施”报告。
- 再次查看相关指南,确认您的内容是否未遵循指南。问题可能是因为出现垃圾内容或使用垃圾标记导致的。不过,问题可能不是语法问题,因此富媒体搜索结果测试无法识别这些问题。
- 针对富媒体搜索结果缺失/富媒体搜索结果总数下降进行问题排查。
- 请等待一段时间,以便 Google 重新抓取您的网页并重新将其编入索引。请注意,网页发布后,Google 可能需要几天时间才会找到和抓取该网页。有关抓取和索引编制的常见问题,请参阅 Google 搜索抓取和索引编制常见问题解答。
- 在 Google 搜索中心论坛中发帖提问。