コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Google 検索で Signed Exchange の利用を開始する
Google 検索は Signed Exchange(SXG)を利用して、ユーザーのプライバシーを保護しながらコンテンツをプリフェッチできます。具体的には、AMP または非 AMP を問わずウェブサイトが SXG に対応している場合、Google 検索したときに返される、関連する結果の主要なリソースのいくつか(HTML、JavaScript、CSS、画像、フォントなど)を、プライバシーに配慮した形でプリフェッチできます。
ユーザーが最終的に結果をクリックした時点で主要なリソースがすでに使用可能になっているため、ウェブページが表示を開始するまでの時間が大幅に短縮され、ユーザー エクスペリエンスが向上します。これにより、コンテンツに関する Largest Contentful Paint(LCP)スコアが低減し、ページ エクスペリエンスが全体的に改善される可能性があります。
SXG を実装する
SXG を実装するには、web.dev の詳細ガイドに沿って進めてください。実装後は、Chrome のガイド Signed Exchanges を使用して LCP を最適化するを参考にしてください。
AMP ページについては、amp.dev の詳細ガイドに沿って進めてください。
Google 検索に関するその他の要件
Google は SXG のキャッシュを使用してコンテンツをプリフェッチします。このようなキャッシュに保存された SXG は複数回配信される場合があります。
Google 検索に最新のコンテンツが表示されるようにするには、SXG の有効期限の値を適切に設定します。目安として、有効期限は次の両方の日数よりも短く設定してください。
- HTTP ヘッダーによって決まるキャッシュの有効期限
- コンテンツが JavaScript またはインライン JavaScript で作成された場合は 1 日後。それ以外の場合は 7 日後
複数のデバイスに配信された場合にコンテンツが適切に表示されるようにするには、次のようにします。
- ショッピング カートなど、パーソナライズされたコンテンツは遅延読み込み要素に移動し、SXG 対応から外します。または、
Vary: Cookie
符号付きヘッダーを追加します。このヘッダーを含む SXG は、サイトの Cookie を持たないユーザーにのみ表示されます。
- レスポンシブ ウェブ デザインでページをビルドします。または、パソコン用ページとモバイルページを別々の URL で配信するか、
supported-media
meta
タグを使用して、レスポンシブ デザインでないことを示すアノテーションをページに付けます。たとえば、ページの <head>
要素に次のタグを追加します。<meta name=supported-media content="only screen and (max-width: 640px)">
SXG のモニタリングとデバッグを行う
SXG をデバッグするために使用できるツールの一覧については、web.dev の SXG ツールに関するガイドをご覧ください。
Googlebot が SXG を解析できない場合は、Accept
ヘッダーに application/signed-exchange;v=b3
が含まれていない URL を再クロールして、text/html
のバリアントを取得することもあります。SXG のインデックス登録でエラーが発生した場合、Google 検索は SXG を含まない元の URL にリンクします。
AMP ページについては、Search Console の AMP ステータス レポートを使用して、SXG エラーをモニタリングします。
Google SXG のキャッシュをデバッグする
SXG がキャッシュ要件を満たしているかどうかを判別するには、Chrome 拡張機能の SXG Validator を使用します。
または、Google SXG キャッシュに直接クエリを実行することもできます。
たとえば、SXG URL が https://signed-exchange-testing.dev/sxgs/valid.html
の場合は、対応するキャッシュ URL を次のように作成します。
https://signed--exchange--testing-dev.webpkgcache.com/doc/-/s/signed-exchange-testing.dev/sxgs/valid.html
サブドメインと URL パスのサフィックスを計算するアルゴリズムは AMP Cache の場合と同じですが、インフィックス文字列 /doc/-/
は異なります。
レスポンスが SXG の場合は、配信元サーバーからのレスポンスが Google SXG のキャッシュ要件を満たしていることを意味します。それ以外の場合は、理由を示す HTTP ヘッダーが含まれます。
Warning
ヘッダーが存在する場合、エラーのために SXG がキャッシュ要件を満たせなかったことを意味します。
Location
ヘッダーが存在する場合、キャッシュにまだフェッチされていないことを意味します。これは SXG のエラーではありません。
レスポンスに関係なく、キャッシュに保存されている URL のコピーを更新するために、元の URL に対するリクエストがキューに追加されます。このリクエストの実行のタイミングと有無については、サイトの Googlebot のクロール速度など、いくつかの要因によって決定されます。
SXG のキャッシュは、SXG 署名の expires
値、または SXG レスポンスの符号なしヘッダーの有効期間を超えて保存されることはありません。
AMP ページについては、URL 検査ツールを使用してキャッシュ エラーをデバッグできます。
次の変更内容に関する最新情報を受け取るには、webpackaging-announceメーリング リストにご登録ください。
- 新しい機能を有効にするために、または他の機能を非推奨にするために Google SXG キャッシュに加えられた変更。
- SXG ツールの Web Packager、NGINX SXG モジュール、libsxg に対する大幅な変更。
Google 検索における SXG について質問がありましたら、検索セントラルのヘルプ コミュニティにアクセスしてください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-04 UTC。
[null,null,["最終更新日 2025-08-04 UTC。"],[[["\u003cp\u003eSigned Exchanges (SXGs) enable Google Search to prefetch website content, enhancing user experience by speeding up page load times while maintaining privacy.\u003c/p\u003e\n"],["\u003cp\u003eImplementing SXGs involves following specific guides for general websites and AMP pages, ensuring content is optimized for Google Search.\u003c/p\u003e\n"],["\u003cp\u003eGoogle caches SXGs and recommends setting appropriate expiration values to keep content up-to-date in search results.\u003c/p\u003e\n"],["\u003cp\u003eFor content to display correctly across devices, developers should consider lazy-loading personalized elements or implementing responsive design techniques.\u003c/p\u003e\n"],["\u003cp\u003eMonitoring and debugging SXGs involves utilizing various tools and resources, including Chrome extensions and Google Search Console, to identify and resolve potential issues.\u003c/p\u003e\n"]]],["Signed exchanges (SXG) enable Google Search to prefetch website content, improving user experience by reducing page load times. To implement SXG, use guides from web.dev or amp.dev (for AMP pages). Ensure up-to-date content by setting SXG expiration to less than one day (for JavaScript) or seven days, or less than the HTTP cache expiration. Optimize for multiple devices, and use debugging tools like the SXG Validator extension. Monitor SXG performance and errors via Google Search Console, and stay informed of updates via the webpackaging-announce mailing list.\n"],null,["# Signed Exchanges on Google Search | Google Search Central\n\nGet started with signed exchanges on Google Search\n==================================================\n\n\n[Signed exchanges](https://web.dev/articles/signed-exchanges) (SXG) allow\nGoogle Search to prefetch your content while preserving the user's privacy. In practice, this\nmeans that both AMP and non-AMP results shown on Google Search may prefetch a few key\nresources (such as HTML, JavaScript, CSS, images, or fonts) in a privacy-preserving manner,\nif the associated website supports SXG.\n\n\nWhen the user ultimately clicks the result, the web page starts rendering much sooner since\nkey resources are already available, leading to a better user experience. This could mean a\nlower [Largest Contentful Paint (LCP)](https://web.dev/articles/lcp) score\nfor your content, which can improve\n[page experience](/search/docs/appearance/page-experience) overall.\n\nImplement SXG\n-------------\n\n\nTo implement SXG, follow [web.dev's\nin-depth guide](https://web.dev/articles/signed-exchanges#tooling). After implementing, follow\n[Chrome's guide to optimizing LCP using Signed Exchanges](https://developer.chrome.com/blog/optimizing-lcp-using-signed-exchanges).\n\n\nFor AMP pages, follow [amp.dev's in-depth guide](https://amp.dev/documentation/guides-and-tutorials/optimize-and-measure/signed-exchange/).\n\n### Additional requirements for Google Search\n\n\nGoogle uses a cache of SXG to prefetch your content. Google may serve these cached SXG\nmultiple times.\n\n\nTo make sure that up-to-date content displays in Google Search, set the SXG expiration values\nappropriately. As a rule of thumb, make sure that the expiration date is less than both of these dates:\n\n- The cache expiration determined by your HTTP headers\n- 1 day in the future if the content is JavaScript or inlines JavaScript; otherwise 7 days in the future\n\n\nTo make sure that content displays properly when served on multiple devices, do the following:\n\n1. Move personalized content, such as shopping carts, into lazy-loaded elements that are outside of the SXG. Alternatively, add the `Vary: Cookie` signed header; SXGs with this header will be shown only to visitors without a cookie for your site.\n2. Build the pages with [responsive web design](https://web.dev/articles/responsive-web-design-basics). Alternatively, serve desktop and mobile pages on [separate URLs](/search/docs/crawling-indexing/mobile/mobile-sites-mobile-first-indexing#separate-urls), or annotate the pages to state that they aren't responsive, using the [`supported-media` `meta` tag](https://github.com/google/webpackager/blob/main/docs/supported_media.md). For example, in the page's `\u003chead\u003e` element, add the following tag: \n\n ```text\n \u003cmeta name=supported-media content=\"only screen and (max-width: 640px)\"\u003e\n ```\n\nMonitor and debug SXG\n---------------------\n\n\nFor a list of tools that you can use to debug SXG, check out [web.dev's guide to SXG tools](https://web.dev/articles/signed-exchanges#tooling).\n\n\nIn the event that Googlebot can't parse an SXG, it may recrawl the URL without `application/signed-exchange;v=b3`\nin the `Accept` header, in order to retrieve the `text/html` variant. In\nthe event of any SXG indexing error, Google Search will link to the original URL, without SXG.\n\n\nFor AMP pages, use the [AMP\nstatus report](https://support.google.com/webmasters/answer/7450883) in Search Console to monitor [SXG errors](https://support.google.com/webmasters/answer/7450883#sgx_warning_list).\n\nDebug the Google SXG cache\n--------------------------\n\n\nTo determine whether SXG meets the cache requirements, use the\n[SXG Validator Chrome extension](https://chrome.google.com/webstore/detail/sxg-validator/hiijcdgcphjeljafieaejfhodfbpmgoe).\n\n\nAlternatively, query the Google SXG cache directly.\nFor example, if the SXG URL is `https://signed-exchange-testing.dev/sxgs/valid.html`, formulate\nthe corresponding cache URL:\n\n\n`https://signed--exchange--testing-dev.webpkgcache.com/doc/-/s/signed-exchange-testing.dev/sxgs/valid.html`\n\n\nThe algorithm for computing the subdomain and the URL path suffix is the\n[same as for the AMP Cache](https://amp.dev/documentation/guides-and-tutorials/learn/amp-caches-and-cors/amp-cache-urls/),\nwhile the infix string `/doc/-/` is different.\n\n\nIf the response is a SXG, then this means the response from the origin server meets the\nGoogle SXG [cache requirements](https://github.com/google/webpackager/blob/main/docs/cache_requirements.md).\nOtherwise, it will include an HTTP header that indicates the reason.\n\n- If there is a `Warning` header, then it indicates an error that prevented the SXG from meeting the cache requirements.\n- If there is a `Location` header, then it has not yet been fetched by the cache. This is not an error in your SXG.\n\n\nRegardless of the response, the cache enqueues a request to the original URL for an updated\ncopy. There are several factors for when and if this request happens, including how fast\nGooglebot can crawl your site.\n\n\nGoogle doesn't cache SXGs for longer than the `expires` value of the SXG signature\nor the\n[freshness\nlifetime](https://datatracker.ietf.org/doc/html/rfc7234#section-4.2.1) of the unsigned headers of the SXG response.\n\n\nFor AMP pages, you can use the\n[URL Inspection Tool](https://support.google.com/webmasters/answer/9012289)\nto debug caching errors.\n\nStay informed\n-------------\n\n\nSubscribe to the [webpackaging-announce](https://groups.google.com/g/webpackaging-announce)\nmailing list to stay up-to-date with the following changes:\n\n- Changes to the Google SXG cache that enable new capabilities or deprecate other capabilities.\n- Major changes to the SXG tools Web Packager, NGINX SXG module, and libsxg.\n\n\nIf you have questions about SXG on Google Search, visit the\n[Search Central Help Community](https://support.google.com/webmasters/community)."]]