Fix Search-related JavaScript problems

This guide helps you identify and fix JavaScript issues that may be blocking your page, or specific content on JavaScript powered pages, from showing up in Google Search. While Googlebot does run JavaScript, there are some differences and limitations that you need to account for when designing your pages and applications to accommodate how crawlers access and render your content.

Googlebot is designed to be a good citizen of the web. Crawling is its main priority, while making sure it doesn't degrade the experience of users visiting the site. Googlebot and its Web Rendering Service (WRS) component continuously analyze and identify resources that don’t contribute to essential page content and may not fetch such resources. For example, reporting and error requests that don’t contribute to essential page content, and other similar types of requests are unused or unnecessary to extract essential page content.

If you suspect that JavaScript issues might be blocking your page, or specific content on JavaScript powered pages, from showing up in Google Search, follow the steps below:

  1. To test how Google crawls and renders a URL, use the Mobile-Friendly Test or the URL inspection tool in Search Console. You can see loaded resources, JavaScript console output and exceptions, rendered DOM, and more information by clicking the more information link on the page verdict card.

    Optionally, we also recommend collecting and auditing JavaScript errors encountered by users, including Googlebot, on your site to identify potential issues that may affect how content is rendered.

  2. Expect Googlebot to decline user permission requests.
  3. Don't rely on data persistance to serve content.
  4. Ensure that your application uses feature detection for all critical APIs that it needs and provide a fallback behavior or polyfill where applicable.
  5. Make sure your web components are search-friendly:
    1. To encapsulate and hide implementation details, use shadow DOM.
    2. Put your content into light DOM whenever possible.
  6. After you fix the items in this checklist, test your page with the Mobile-Friendly Test or the URL inspection tool in Search Console again.

    If you fixed the issue, a green check mark appears and no errors display. If you still see errors, post in the JavaScript Sites in Search Working Group.

Send feedback about...