本頁說明如何使用 schema.org JSON-LD,以 CreativeWork
屬性表示網站上的付費牆內容。這種結構化資料可協助 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": ["CreativeWork","Article","Person"]
AMP 須知
以下是使用 AMP 網頁時要考量的事項:
- 如果您有含付費牆內容的 AMP 網頁,請視情況使用 amp-subscriptions。
- 請確保您的授權端點會向適當的 Google 漫遊器和其他服務供應商的漫遊器授予內容存取權 (適合的漫遊器視發布者而定)。
- 請確保 AMP 和非 AMP 網頁都採用相同的漫遊器存取權政策,否則可能會導致 Search Console 中出現內容不一致錯誤。
確認 Google 能夠檢索您的網頁並將其編入索引
您可以透過下列幾種方法,確認 Google 是否能夠檢索您的網頁內容並將其編入索引:
- 如果只要讓 Google 檢索付費牆外開放所有人瀏覽的網頁內容並將其編入索引,請略過這項步驟。
- 如要讓 Google 檢索包括付費牆在內的整個網頁,並將其編入索引,請視適用情形確認 Googlebot 和 Googlebot-News 是否能存取您的網頁。
- 如果不想讓 Google 顯示網頁的快取連結,請使用
noarchive
漫遊器中繼標記。
疑難排解
如果您無法順利導入結構化資料,請參考下列資源。
- 結構化資料可能含有錯誤。請查看結構化資料錯誤清單。
- 疑難排解:未出現複合式搜尋結果或是複合式搜尋結果總數減少。
- 如有關於檢索和索引建立作業的一般問題,請參閱網站管理員常見問題。
- 在網站管理員線上諮詢會中提問。
- 前往網站管理員論壇發文提問。