コレクションでコンテンツを整理 必要に応じて、コンテンツの保存と分類を行います。
読み込みの遅いコンテンツを修正する
重要でないコンテンツや非表示のコンテンツの読み込みを後回しにすることは、一般に「遅延読み込み」とも呼ばれ、パフォーマンスおよびユーザー エクスペリエンスに関する一般的なおすすめの方法としてよく行われます。詳しくは、web.dev の画像や動画の遅延読み込みに関するリソースをご覧ください。ただし、こうした方法が正しく実装されていないと、対象のコンテンツを Google が認識できなくなるおそれがあります。ここでは、Google が遅延読み込みコンテンツをクロールしてインデックスに登録できるようにする方法について説明します。
ビューポートに表示されるタイミングでコンテンツを読み込む
Google がページのすべてのコンテンツを認識できるようにするには、すべての関連コンテンツについて、ビューポートに表示されるタイミングで読み込まれるように遅延読み込みを実装します。遅延読み込みを実装する方法には、次のようなものがあります。
上記の方法は、コンテンツの読み込みにユーザーの操作(スクロールやクリックなど)を必要としません。Google 検索はページ上での操作を行わないため、この点は重要です。
ページを開いた直後に表示される可能性が高いコンテンツには、遅延読み込みを実装しないでください。ブラウザでのコンテンツの読み込みや表示に時間がかかり、ユーザー エクスペリエンスに影響する可能性があります。
必ず遅延読み込みの実装をテストしてください。
簡単に言うと、無限スクロールとは、長いページをユーザーが下にスクロールするにつれて、後続するコンテンツやページが次々と読み込まれる技術です。複数のチャンクに分けた 1 つの長い記事や、同じく複数のチャンクに分けたアイテムの集合体などで使用できます。インデックス登録が可能なように無限スクロールを実装するには、次の方法を使用してウェブサイトがこうしたチャンクをページごとに読み込めるようにします。
- チャンクごとに永続的かつ固有の URL を設定します。
- 各 URL をブラウザで読み込んだときに、常に同じコンテンツが表示されるようにします。その方法の一つは、たとえばクエリ パラメータに
?page=12
を使うことで、URL の中に絶対的なページ番号を入れることです。 - URL に
?date=yesterday
のような相対的な要素を使うことは避けます。そうすることで、検索エンジンやユーザーが特定の URL で常に同じコンテンツを見つけられるようになります。これにより検索エンジンは常に適切にインデックスに登録できるようになり、ユーザーはコンテンツの特定の部分を共有したり再表示したりできるようになります。 - 個々の URL を連続的にリンクさせることで、ページ分けされた一連のコンテンツの各 URL を検索エンジンが見つけられるようにします。詳しくは、ページ分けを実装する際のベスト プラクティスをご覧ください。
- スクロールに応じて新たなページのチャンクが読み込まれ、ユーザーが目にする主要な要素となったら、History API を使って表示された URL を更新します。これによりユーザーは、ブラウザに表示された現在の URL を再読み込み、共有したり、その URL にリンクしたりできます。
テスト
実装の設定が済んだら、正しく機能することを確認します。Search Console の URL 検査ツールを使うと、すべてのコンテンツが読み込まれたか確認できます。レンダリングされた HTML を確認し、URL 検査ツールでコンテンツを探すことによって、レンダリングされた HTML 内にコンテンツがあることを確認します。画像や動画の URL が、レンダリングされた HTML で <img>
要素または <video>
要素の src
属性に表示されていれば、正しく設定ができています。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-04 UTC。
[null,null,["最終更新日 2025-08-04 UTC。"],[[["\u003cp\u003eEnsure lazy-loaded content is loaded when visible in the viewport, using methods like browser-level lazy-loading or the IntersectionObserver API, so Google can see all content.\u003c/p\u003e\n"],["\u003cp\u003eSupport paginated loading for infinite scroll by giving each content chunk a unique URL, using absolute page numbers, linking sequentially, and updating the URL with the History API.\u003c/p\u003e\n"],["\u003cp\u003eTest your implementation using the URL Inspection Tool in Search Console to verify all content is loaded and appears in the rendered HTML.\u003c/p\u003e\n"]]],["Lazy-loading should load content when visible in the viewport using methods like browser built-in loading, IntersectionObserver API, or JavaScript libraries, avoiding reliance on user actions. For infinite scroll, each content chunk needs a unique, persistent URL (e.g., `?page=12`), and avoid relative elements, also link sequentially to these URL. Update the URL with the History API. Finally, verify implementation with the URL Inspection Tool in Search Console to check if content is present in rendered HTML.\n"],null,["Fix lazy-loaded content\n\n\nDeferring loading of non-critical or non-visible content, also commonly known as \"lazy-loading\", is a common performance and UX best practice. For more information, see [web.dev's resources on lazy-loading images and video](https://web.dev/fast#lazy-load-images-and-video).\nHowever, if not implemented correctly, this technique can inadvertently hide content from Google. This document explains how to make sure Google can crawl and index lazy-loaded content.\n\nLoad content when it's visible in the viewport\n\nTo ensure that Google sees all content on your page, make sure that your lazy-loading implementation loads all relevant content whenever it is visible in the viewport. Here are a few methods to implement lazy-loading:\n\n- [Browser built-in lazy-loading](https://web.dev/articles/browser-level-image-lazy-loading) for images and iframes\n- [IntersectionObserver API](https://web.dev/articles/intersectionobserver) and [a polyfill](https://github.com/GoogleChromeLabs/intersection-observer)\n- A JavaScript library that supports loading data when it enters the viewport\n\nThe methods mentioned don't rely on user actions, such as scrolling or clicking, to load content, which is important as Google Search does not interact with your page.\n\nDon't add lazy-loading to content that is likely to be immediately visible when a user opens a page. That might cause content to take longer to load and show up in the browser, which will be very noticeable to the user.\n\nMake sure to [test your implementation](#test).\n\nSupport paginated loading for infinite scroll\n\n\nAt a high level, infinite scroll is a technique that loads more content, more distinct pages,\nas the user scrolls down a long page. This could be one long article that's split into multiple\nchunks, or a collection of items that's similarly split into chunks. To implement infinite scroll\nin an indexable way, make sure your website supports paginated loading of these chunks by doing\nthe following:\n\n- Give each chunk its own persistent, unique URL.\n- Ensure that the content shown on each URL remains the same every time it's loaded in a browser. One way this can be done is to use absolute page numbers in the URL, for example by using `?page=12` as a query parameter.\n- Avoid using relative elements like `?date=yesterday` in these URLs. This allows search engines and users to consistently find the same content under a given URL, making it easier for search engines to properly index the content, and allowing users to share and reengage with that part of your content.\n- Link sequentially to the individual URLs so that search engines can discover the URLs in a paginated set. Find out more about [best\n practices when implementing pagination](/search/docs/specialty/ecommerce/pagination-and-incremental-page-loading#best-practices-when-implementing-pagination).\n- When a new page chunk is loaded in response to the user scrolling, and it becomes the primary visible element for the user, update the displayed URL using the [History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API). This allows the user to refresh, share, and link to the current URL displayed in the browser.\n\nTest\n\n\nAfter you set up your implementation, make sure it works correctly.\nYou can use the [URL Inspection Tool](https://support.google.com/webmasters/answer/9012289) in Search Console to see if all content was loaded.\nCheck the rendered HTML to make sure your content is in the rendered HTML by looking for it in URL Inspection Tool. If your image or video URLs appear in the `src` attribute on the `\u003cimg\u003e` or `\u003cvideo\u003e` elements in the rendered HTML, your setup works correctly."]]