訂閱和付費牆內容
本頁說明如何在 schema.org JSON-LD 中運用 CreativeWork
屬性指出網站上的付費牆內容。這種結構化資料可以幫助 Google 區分付費牆內容與違反 Google 規範的偽裝手法。進一步瞭解訂閱和付費牆內容。
範例
以下是含有付費牆內容的 NewsArticle
結構化資料範例。
<html> <head> <title>Article headline</title> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "NewsArticle", "mainEntityOfPage": { "@type": "WebPage", "@id": "https://example.org/article" }, "headline": "Article headline", "image": "https://example.org/thumbnail1.jpg", "datePublished": "2025-02-05T08:00:00+08:00", "dateModified": "2025-02-05T09:20:00+08:00", "author": { "@type": "Person", "name": "John Doe" }, "publisher": { "name": "The Exemplary Times", "@type": "Organization", "logo": { "@type": "ImageObject", "url": "https://example.org/logo.jpg" } }, "description": "A most wonderful article", "isAccessibleForFree": "False", "hasPart": { "@type": "WebPageElement", "isAccessibleForFree": "False", "cssSelector" : ".paywall" } } </script> </head> <body> <div class="non-paywall"> Non-Paywalled Content </div> <div class="paywall"> Paywalled Content </div> </body> </html>
指南規範
您的網頁必須遵循一般結構化資料指南和技術指南,才能顯示在搜尋結果中。此外,付費牆內容還適用下列規範:
- JSON-LD 和微資料格式都能用來指定付費牆內容的結構化資料。
- 請勿以巢狀結構編排內容。
- 僅針對
cssSelector
屬性使用.class
選取器。
為付費牆內容新增標記
如果您提供了任何需要訂閱才能存取的網站內容,或是想將使用者需要註冊才能存取的內容編入索引,請按照這些步驟進行。以下範例適用於 NewsArticle
結構化資料。無論您的網頁有哪些版本,請務必為所有版本 (包括 AMP 和非 AMP 版本) 執行下列步驟。
-
在網頁中每個付費牆部分的前後加入類別名稱標記,例如:
<body> <p>This content is outside a paywall and is visible to all.</p> <div class="paywall">This content is inside a paywall, and requires a subscription or registration.</div> </body>
-
新增
NewsArticle
結構化資料。 -
將醒目顯示的 JSON-LD 結構化資料新增至
NewsArticle
結構化資料。{ "@context": "https://schema.org", "@type": "NewsArticle", "mainEntityOfPage": { "@type": "WebPage", "@id": "https://example.org/article" }, (...) "isAccessibleForFree": "False", "hasPart": { "@type": "WebPageElement", "isAccessibleForFree": "False", "cssSelector": ".paywall" } }
多個付費牆部分
如果網頁中有多個付費牆部分,請以陣列形式新增類別名稱。
以下是網頁中付費牆部分的範例:
<body> <div class="section1">This content is inside a paywall, and requires a subscription or registration.</div> <p>This content is outside a paywall and is visible to all.</p> <div class="section2">This is another section that's inside a paywall, and requires a subscription or registration.</div> </body>
以下是含有多個付費牆部分的 NewsArticle
結構化資料範例。
{ "@context": "https://schema.org", "@type": "NewsArticle", "mainEntityOfPage": { "@type": "WebPage", "@id": "https://example.org/article" }, (...) "isAccessibleForFree": "False", "hasPart": [ { "@type": "WebPageElement", "isAccessibleForFree": "False", "cssSelector": ".section1" }, { "@type": "WebPageElement", "isAccessibleForFree": "False", "cssSelector": ".section2" } ] }
支援的類型
這個標記適用於 CreativeWork
類型,或是下列任一特定的 CreativeWork
類型:
您可以使用多種 schema.org 類型,如以下範例所示:
"@type": ["Article", "LearningResource"]
AMP 須知
以下是使用 AMP 網頁時要考量的事項:
- 如果您有含付費牆內容的 AMP 網頁,請視情況使用 amp-subscriptions。
- 請確保您的授權端點會將內容存取權授予 Google 和其他服務供應商的適當漫遊器 (因發布者而異)。
- 請確保 AMP 和非 AMP 網頁都採用相同的漫遊器存取權政策,否則可能會導致 Search Console 中出現內容不一致錯誤。
確認 Google 能夠檢索您的網頁並將其編入索引
如果想讓 Google 檢索包含付費牆部分在內的內容並建立索引,請務必讓 Googlebot 和 Googlebot-News (如果適用) 能夠存取您的網頁。
您可以使用網址檢查工具測試 Google 檢索及轉譯網站上網址的情形。
控管搜尋結果中顯示的資訊
如果不希望 Google 顯示網頁的快取連結,請使用 noarchive
漫遊器中繼標記。
如果不想讓特定部分的內容出現在搜尋結果摘要中,請使用 data-nosnippet
HTML 屬性。您也可以使用 max-snippet
漫遊器中繼標記來限制搜尋結果摘要顯示的字元數。
疑難排解
如果無法順利導入結構化資料,或是偵錯時遇到困難,請參考下列資源。
- 結構化資料可能含有錯誤。請查看結構化資料錯誤清單。
- 如果您的網頁遭到結構化資料專人介入處理處置,系統會忽略網頁上的結構化資料,但該網頁仍然會出現在 Google 搜尋結果中。請使用專人介入處理報告來修正結構化資料問題。
- 再次查看指南規範,確認您的內容是否符合規定。
- 疑難排解:未出現複合式搜尋結果/複合式搜尋結果總數減少。
- 如有關於檢索和索引建立作業的一般問題,請參閱 Google 搜尋檢索和索引常見問題。
- 在 Google 搜尋中心的諮詢時間提問。
- 前往 Google 搜尋中心論壇發文提問。