Updated: June 9, 2023.

Learn how to check if Google is indexing JavaScript content correctly in three simple ways.

Ensuring that Google is indexing JavaScript-generated content correctly is a crucial step in any SEO audit.

In this article, I’ll cover the key steps you need to take to check if Google is indexing your JavaScript-generated content correctly. Let’s get started!

How to check JavaScript content indexing

TL;DR: How to check if Google is indexing JavaScript content correctly

The easiest way is to simply copy a piece of JavaScript-added content and paste it (in quotation marks) into Google together with site: indicating the domain of the site.

Using site: command with the sentence in quotation marks to check if JavaScript content is indexed in Google

If the results are returned, then Google is indexing this content correctly. If not, then you need to do the troubleshooting.

Checking if Google indexed a piece of JavaScript-generated text

JavaScript content indexing basics

If you are a less advanced SEO auditor, this is the section for you.

What is JavaScript-generated content?

JavaScript-generated content refers to the dynamic content on a website that is generated by JavaScript code. This type of content can include things like pop-up windows, dropdown menus, and even entire sections of a webpage that load dynamically without the need for a page refresh. It’s a powerful tool for creating a more engaging user experience, but it can also pose challenges for search engines like Google when it comes to crawling and indexing content.

Why is it important to ensure Google is indexing JavaScript-generated content correctly?

When search engines like Google crawl and index a website, they rely on the HTML code to understand the content of the site. If JavaScript-generated content is not properly coded or implemented, it may not be indexed correctly, which can result in lower search rankings and reduced visibility for the site.

Here is an episode of Crawling Mondays by Aleyda Solice where I had a chance to talk about JavaScript content a bit.

How to check a website’s reliance on JavaScript?

There are lots of ways of checking a website’s reliance on JavaScript. The most popular ones include:

  • Simply disable JavaScript in the browser to see what elements on the page are added with JS.
  • Crawl the website with a crawling tool like JetOctopus or Screaming Frog with JavaScript execution and compare the source vs rendered HTML.

Check my entire guide on how to check a website’s reliance on JavaScript and how to check how Google renders JavaScript on a website.

How to check if Google is indexing JavaScript-generated content correctly

Here are the two top methods to check if Google is indexing JavaScript content correctly.

Method 1: Do a site: search

One of the first steps in checking whether Google is indexing JavaScript-generated content correctly is to use the site: Google search operator.

This search tells you how many pages of your website Google has indexed, and can give you an idea of whether your JavaScript-generated content is being indexed properly.

  • To conduct a site: search, go to Google and type in “site:yourdomain.com” (replace “yourdomain.com” with your actual domain name). Google will then return a list of all the pages on your website that it has indexed.

Doing a site: search to check how many pages are indexed in Google
  • To check whether your JavaScript-generated content is being indexed correctly, look for pages that contain JavaScript-generated content or do a site: search for a specific JavaScript-based page
Doing a site: search for a specifc page

Depending on what elements of the page are generated with JavaScript, you may need to refine your search a bit:

  • If JavaScript changes or adds meta titles or descriptions (which is not an ideal solution), check whether you can see the content of these elements correctly in SERPs.
Doing a site: for website that is entirely generated with JavaScript
  • If JavaScript is used to generate content (like the content of FAQs in accordions), copy and paste the content of the accordion in quotation marks to check if exactly this piece of text is indexed. If you see it in SERPs, then Google has no issues indexing this JS content.
Checking if Google is indexing JS content correctly on an example website

However, keep in mind that a site: search is not a comprehensive audit of your website’s indexation, so you should also use other methods to check whether your JavaScript-generated content is being indexed correctly.

Method 2: Use Google Search Console

To check if Google has crawled and indexed your page, you can use the URL Inspection Tool in Google Search Console.

  • Go to your Google Search Console dashboard and select your property.
  • Enter the URL you want to inspect and click “Enter”.
  • If the page has already been indexed, you’ll see a message that says “URL is on Google” with a green checkmark.
URL Inspection tool in Google Search Console showing that the URL is indexed
  • If it hasn’t been indexed yet, you’ll see a message that says “URL is not on Google”.
URL Inspection tool in Google Search Console showing that the URL is not indexed
  • To check if your JavaScript-generated content has been indexed, use the “TEST LIVE URL” feature in the URL Inspection Tool. This will allow you to see a live rendering of the page, including any JavaScript-generated content. If you don’t see the content, it’s likely that Google hasn’t indexed it.
Doing a LIVE TEST in Google Search Console
  • When the test is done, click “VIEW TESTED PAGE”.
LIVE TEST in Google Search Console
  • When doing a LIVE TEST, always look for the JavaScript-generated content in the rendered HTML because the screenshot may not include the entire page. If you see the JS-added content in the rendered HTML, then Google has no issues rendering and indexing that content.
Rendered HTML and screenshot in Google Search Console
  • If you want to see a historical view of the page’s indexing status, you can use the Indexing report in Search Console. This will show you the number of pages that have been indexed and any errors or issues that may be affecting indexing.

Method 3: Use Mobile-Friendly Test

The Google Search Console method is great if you have GSC access to a website. If you don’t then, you need to use the Mobile-Friendly Test.

Mobile-Friendly Test provides both a screenshot and the rendered HTML, allowing you to analyze any discrepancies between the two versions. This can help identify any issues that may be affecting the indexation of your JavaScript-generated content. It’s a simple and easy-to-use tool that can provide valuable insights into the mobile-friendliness of your website, as well as any potential indexation issues.

Using Mobile-Friendly Test to analyze potential JavaScript indexing issues

Method 4: Use a third-party tool like

And here is how to use my two favorite SEO tools to check and troubleshoot JavaScript indexation.

Use JetOctopus

JetOctopus is a fantastic tool for analyzing and troubleshooting indexation issues.

  • With its Indexation report, you can easily check for common issues such as blocked robots and meta tags, multiple canonical and meta robot tags, and more.
JetOctopus Indexation report
  • Additionally, JetOctopus allows you to execute JavaScript and compare the source and rendered versions.
  • By connecting it with Google Search Console, you can see the live status of indexation, making it an incredibly valuable resource for ensuring your JavaScript-generated content is being indexed correctly.

Use Screaming Frog SEO Spider

Screaming Frog SEO Spider is another powerful tool that can help you troubleshoot and analyze indexation issues.

  • With the help of Google Search Console API integration, you can easily see the status of all pages in bulk. This makes it easy to identify which pages are not being indexed correctly.
Google Search Console API in Screaming Frog SEO Spider
  • One of the great features of Screaming Frog SEO Spider is that it also allows you to execute JavaScript and compare the source and rendered versions of a page. This is especially helpful when it comes to checking for JavaScript-generated content.
  • Using this tool, you can identify common indexation issues such as pages blocked by robots.txt or X-Robots header, pages with multiple canonical tags or meta robots tags, hreflang tags with relative URLs or non-indexable URLs, and more.

Learn more about JavaScript SEO

This was a beginner/intermediate guide on JavaScript indexation. I strongly recommend you learn more about the topic as it is super interesting and super important for any technical SEO or SEO auditor.

Here are the resources I recommend you check:

Olga Zarr is an SEO consultant with 10+ years of experience. She has been doing SEO for both the biggest brands in the world and small businesses. She has done 200+ SEO audits so far. Olga has completed SEO courses and degrees at universities, such as UC Davis, University of Michigan, and Johns Hopkins University. She also completed Moz Academy! And, of course, has Google certifications. She keeps learning SEO and loves it. Olga is also a Google Product Expert specializing in areas, such as Google Search and Google Webmasters.
Show 1 Comment

1 Comment

  1. Abhirup Ghosh

    Thanks Olga for another great insight. But if a piece of content in the webpage is used JavaScript, how will you identify it through Method 2 and Method 3? Because the screenshot in both cases shows parts of the web page not showing the whole page.

    In the case of SEOSLY, I tried to test the ‘https://seosly.com/blog/how-to-check-if-google-is-indexing-javascript-content/’ page. But HTML and screenshots for both cases do not show the “SEO Newsletter For SEOs” box, which uses JavaScript.

Comments are closed