使用結構化資料標記常見問題

常見問題 (FAQ) 網頁含有特定主題的問答集。FAQ 網頁只要具有適當標記,就能在 Google 搜尋服務上以複合式搜尋結果的形式呈現;您還可以運用 Google 助理的動作,讓網站更容易觸及目標使用者。以下是 FAQ 複合式搜尋結果的範例:

FAQ 複合式搜尋結果的圖片

如何新增結構化資料

結構化資料是一種標準化格式,作用是提供網頁相關資訊以及將網頁內容分類。如果您是第一次使用結構化資料,請參閱這篇文章進一步瞭解結構化資料的運作方式。

以下簡要說明如何建立、測試及發布結構化資料。如需在網頁中新增結構化資料的逐步指南,請前往結構化資料程式碼研究室

  1. 新增必要屬性。如要瞭解應在網頁上的何處插入結構化資料,請觀看「JSON-LD 結構化資料:網頁上的插入位置」影片。
  2. 遵循指南
  3. 使用複合式搜尋結果測試驗證程式碼。
  4. 部署幾個包含結構化資料的網頁,並使用網址檢查工具測試 Google 轉譯網頁的情形。請確認 Google 可以存取您的網頁,且網頁並未遭到 robots.txt 檔案或 noindex 標記封鎖,也未設有登入規定。如果網頁看起來沒問題,您可以要求 Google 重新檢索您的網址
  5. 為了讓 Google 掌握異動內容,建議您提交 Sitemap。您可以使用 Search Console Sitemap API 自動執行這項操作。

功能適用情況

只要 Google 搜尋適用於您所在的國家/地區,無論是桌機或行動裝置上,您都能以搜尋服務支援的語言使用 FAQ 複合式搜尋結果。

範例

JSON-LD

採用 JSON-LD 格式的 FAQPage 範例如下:


<html>
  <head>
    <title>Example Site - Frequently Asked Questions(FAQ)</title>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "FAQPage",
      "mainEntity": [{
        "@type": "Question",
        "name": "What is the return policy?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Most unopened items in new condition and returned within <strong>90 days</strong> will receive a refund or exchange. Some items have a modified return policy noted on the receipt or packing slip. Items that are opened or damaged or do not have a receipt may be denied a refund or exchange. Items purchased online or in-store may be returned to any store.<br /><p>Online purchases may be returned via a major parcel carrier. <a href=http://example.com/returns> Click here </a> to initiate a return.</p>"
        }
      }, {
        "@type": "Question",
        "name": "How long does it take to process a refund?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "We will reimburse you for returned items in the same way you paid for them. For example, any amounts deducted from a gift card will be credited back to a gift card. For returns by mail, once we receive your return, we will process it within 4–5 business days. It may take up to 7 days after we process the return to reflect in your account, depending on your financial institution's processing time."
        }
      }, {
        "@type": "Question",
        "name": "What is the policy for late/non-delivery of items ordered online?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Our local teams work diligently to make sure that your order arrives on time, within our normaldelivery hours of 9AM to 8PM in the recipient's time zone. During  busy holiday periods like Christmas, Valentine's and Mother's Day, we may extend our delivery hours before 9AM and after 8PM to ensure that all gifts are delivered on time. If for any reason your gift does not arrive on time, our dedicated Customer Service agents will do everything they can to help successfully resolve your issue. <br/> <p><a href=https://example.com/orders/>Click here</a> to complete the form with your order-related question(s).</p>"
        }
      }, {
        "@type": "Question",
        "name": "When will my credit card be charged?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "We'll attempt to securely charge your credit card at the point of purchase online. If there's a problem, you'll be notified on the spot and prompted to use another card. Once we receive verification of sufficient funds, your payment will be completed and transferred securely to us. Your account will be charged in 24 to 48 hours."
        }
      }, {
        "@type": "Question",
        "name": "Will I be charged sales tax for online orders?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text":"Local and State sales tax will be collected if your recipient's mailing address is in: <ul><li>Arizona</li><li>California</li><li>Colorado</li></ul>"}
        }]
    }
    </script>
  </head>
  <body>
  </body>
</html>
微資料

採用微資料格式的 FAQPage 範例如下:


<html itemscope itemtype="https://schema.org/FAQPage">
<head>
  <title>Example Site - Frequently Asked Questions(FAQ)</title>
    </head>
<body>
  <div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
    <h3 itemprop="name">What is the return policy?</h3>
    <div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
      <div itemprop="text">
        Most unopened items in new condition and returned within <strong>90 days</strong> will receive a refund or exchange. Some items have a modified return policy noted on the receipt or packing slip. Items that are opened or damaged or do not have a receipt may be denied a refund or exchange. Items purchased online or in-store may be returned to any store.
        <br /><p>Online purchases may be returned via a major parcel carrier. <a href="http://example.com/returns"> Click here </a> to initiate a return.</p>
      </div>
    </div>
  </div>
  <div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
    <h3 itemprop="name">How long does it take to process a refund?</h3>
    <div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
      <div itemprop="text">
        We will reimburse you for returned items in the same way you paid for them. For example, any amounts deducted from a gift card will be credited back to a gift card. For returns by mail, once we receive your return, we will process it within 4–5 business days. It may take up to 7 days after we process the return to reflect in your account, depending on your financial institution's processing time.
    </div>
  </div>
</div>
<div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
  <h3 itemprop="name">What is the policy for late/non-delivery of items ordered online?</h3>
  <div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
    <div itemprop="text">
      Our local teams work diligently to make sure that your order arrives on time, within our normal delivery hours of 9AM to 8PM in the recipient's time zone. During  busy holiday periods like Christmas, Valentine's and Mother's Day, we may extend our delivery hours before 9AM and after 8PM to ensure that all gifts are delivered on time. If for any reason your gift does not arrive on time, our dedicated Customer Service agents will do everything they can to help successfully resolve your issue.
      <br/> <p><a href="https://example.com/orders/">Click here</a> to complete the form with your order-related question(s).</p>
    </div>
  </div>
</div>
<div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
  <h3 itemprop="name">When will my credit card be charged?</h3>
  <div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
    <div itemprop="text">
      We'll attempt to securely charge your credit card at the point of purchase online. If there's a problem, you'll be notified on the spot and prompted to use another card. Once we receive verification of sufficient funds, your payment will be completed and transferred securely to us. Your account will be charged in 24 to 48 hours.
    </div>
  </div>
</div>
<div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
  <h3 itemprop="name">Will I be charged sales tax for online orders?</h3>
  <div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
    <div itemprop="text">
      Local and State sales tax will be collected if your recipient's mailing address is in:
      <ul>
        <li>Arizona</li>
        <li>California</li>
        <li>Colorado</li>
      </ul>
    </div>
  </div>
</div>
  </body>
</html>

指南規範

如果想讓您的 FAQ 網頁顯示 FAQ 複合式搜尋結果,請務必遵循下列指南:

內容指南

  • FAQPage 只適用於含有問答集的網頁。如果網頁上有讓使用者針對單一問題新增其他答案的設計,請改用 QAPage。以下舉幾個例子說明:

    適用標的

    • 網站本身提供的 FAQ 網頁,未開放使用者新增其他答案。
    • 含有 FAQ 的產品支援網頁,未開放使用者新增其他答案。

    不適用標的

    • 使用者能在其中為單一問題提供答案的論壇網頁
    • 使用者能在其中為單一問題提供答案的產品支援網頁
    • 使用者可以在其中提出多個問題並提供答案的產品網頁
  • 請勿將 FAQPage 用於廣告用途。
  • 每個 Question 必須包含完整的題目文字,每個 Answer 必須包含完整的答案文字。網頁上可能會顯示完整的題目和答案文字。
  • 如果問題與答案包含下列類型的內容,則可能無法以複合式搜尋結果的形式呈現:猥褻、不雅用語、煽情露骨內容、暴力圖像、鼓吹危險或不法活動,或是使用仇恨或騷擾言詞。
  • 必須讓瀏覽來源網頁的使用者能看到所有 FAQ 內容。
  • 如果您的網站有重複的 FAQ 內容 (也就是說,同一個問題和答案會出現在網站的多個網頁上),那麼您只需要標記網站上的其中一個例項。

結構化資料類型定義

您必須加入內容所需要的屬性,才能顯示複合式搜尋結果。您也可以加入建議屬性來為結構化資料補充更多資訊,創造更優質的使用者體驗。

FAQPage

schema.org 內提供 FAQPage 的完整定義。

FAQPage 類型代表網頁上有 FAQ 和答案。每個網頁都需要有一個 FAQPage 類型定義。

必要屬性
mainEntity Question

構成這個 FAQPage 所適用問答集的 Question 元素陣列。

Question

schema.org 內提供 Question 的完整定義。

Question 類型定義的是 FAQ 中附有答案的一個問題。每個 Question 例項都必須包含在 schema.org/FAQPagemainEntity 屬性陣列中。

必要屬性
acceptedAnswer Answer

問題答案。每個問題都要有一個答案。

name Text

問題全文,例如:「退款作業需要多久時間?」。

Answer

schema.org 內提供 Answer 的完整定義。

Answer 類型定義的是這個網頁中個別 QuestionacceptedAnswer

必要屬性
text Text

問題的完整答案。答案可能含有連結、清單之類的 HTML 內容。Google 搜尋只會顯示下列 HTML 標記,除此之外的所有標記都會遭到忽略:<h1><h6><br><ol><ul><li><a><p><div><b><strong><i><em>

透過 Search Console 監控複合式搜尋結果

Search Console 這項工具能協助您監控網頁在 Google 搜尋中的成效。 Google 會主動將您的網頁納入搜尋結果,您無需為此申請使用 Search Console,但是您可以藉由這項服務瞭解並改善 Google 檢索您網站的方式。建議在下列情況查看 Search Console:

  1. 首次部署結構化資料後
  2. 發布新範本或更新程式碼後
  3. 定期分析流量

首次部署結構化資料後

在 Google 為網頁建立索引後,請透過相關複合式搜尋結果狀態報告查看是否存在任何問題。 理想情況下,有效網頁會增加,但錯誤或警告不會變多。如果您在結構化資料中發現問題,請依下列步驟操作:

  1. 修正錯誤
  2. 檢查線上網址,查看問題是否仍繼續發生。
  3. 透過狀態報告要求驗證

發布新範本或更新程式碼後

當您對網站進行大幅變更時,請留意結構化資料中錯誤和警告的數量是否增加。
  • 如果錯誤增加,代表新推出的範本可能無法正常運作,或者網站採用新方式與現有範本互動,但效果不佳。
  • 如果有效項目減少,但錯誤並未隨之增加,代表您的網頁可能已不再內嵌結構化資料。請使用網址檢查工具找出問題的原因。

定期分析流量

透過成效報表分析您的 Google 搜尋流量。 這些資料會顯示您的網頁在 Google 搜尋中呈現為複合式搜尋結果的頻率、使用者點擊的頻率,以及您的搜尋結果平均排名。您也可以使用 Search Console API 自動提取這些結果。

疑難排解

如果您無法順利導入結構化資料,請參考下列資源。