en
English Español Deutsch Français Italiano Português (Brasil) Русский 中文 日本語
Submit post
Go to Blog

Weekly Wisdom with Bartosz Góralewicz: 4 Steps to Diagnose Your JavaScript SEO Issues

Weekly Wisdom with Bartosz Góralewicz: 4 Steps to Diagnose Your JavaScript SEO Issues

Bartosz Góralewicz

Modified transcript

Hello, everyone. My name is Bartosz Góralewicz. I am the CEO of Onely and welcome to SEMrush Weekly Wisdom. Today we are going to talk about JavaScript SEO, and we are going to get a little bit geeky with this topic.

Let's talk about the history of JavaScript SEO for a second. JavaScript SEO is a fairly new concept. It started getting popular around 2016 when we published our first experiment that showed that Google has a few problems indexing JavaScript-generated content properly. This experiment got very, very popular quickly because it basically showed that Google is not very good; it is not perfect. It is struggling with rendering JavaScript. So Google actually could render a little bit of JavaScript. It was basically and still is a little bit slow. But at that time, most of the other search engines didn't even have the technology or the resources to index even a little bit of JavaScript content. Still, this showed a little bit of a problem, and that is what I want to talk about today.

HTML vs. JavaScript

Let's start with what's the main difference between HTML content and JavaScript content because this is something that we really need to differentiate somehow. We are all used to HTML and CSS-built websites, for years now. With an HTML website, you just look into the source code, and you can see most of the content that is going to be visible on the website when you open it. With JavaScript, in a lot of cases, it is not like that at all. When you look into the code of the JavaScript-powered website, in many cases you can just see a few lines of JavaScript script, and there is no content that is visible on the page at all.

So we can compare that very in a visual way that HTML is like a ready-to-go cake and that it is basically ready to be consumed by Googlebot and WRS (web rendering service). And JavaScript is just a lot of ingredients that still have to be processed by either your browser on your mobile, your desktop or by Googlebot and then the rendering service to create the final product or, in this comparison, final cake. So this is very resource-intensive, especially on the CPU of either your device or Google servers. And this is actually what makes JavaScript so difficult to work with, a little bit complex at the same time.

Let me tell you one thing before we move further. And a lot of SEOs will be claiming that JavaScript is evil. I can understand where it comes from. But working with JavaScript for quite a bit and working with a lot of enterprise companies, eCommerce platforms that are powered by JavaScript, we never had the problem with that once we understood the problem and we worked with developers to fix it. So I guess JavaScript is not really evil. It is just a little bit more complex than the HTML and CSS that we are all used to.

4-Step Process — Is Your Website Properly Crawled and Indexed?

Let's go through a quick checklist of how to make sure that your website is properly crawled and indexed in Google and other search engines. With these steps, you can check if you have a JavaScript problem or maybe this is something that is not a problem for your website.

Step 1: Check How Your Site Works With Disabled JS

The first, amazingly simple step is basically going to your Chrome browser. Just download Quick JavaScript Switcher plugin. Switch off JavaScript and see if any of the content within your page is going to change. If you switch off JavaScript and you see that, for example, part of your article or your product description or images disappear, this means that Google may struggle to index these parts of your website. So that's step number one.

Quick Javascript Switcher

Step 2: Google URL Inspection Tool

Go to the Google URL inspection tool and see if your website renders properly for Google. That is a very simple step, and you can see,= if the website renders properly. And you can only look into the code that was processed by Google, and you can see, okay, is that what we are looking for? Is that the content we are actually sending to the browsers? Is it the same content I see in my Chrome browser or whatever you are using?

URL Inspection Tool

Step 3: Indexing Check

Step number three is, and this is actually a little bit tricky, but this is the simplest way to check if your website relies on two waves of indexing. Go to google.com and see if Google indexed the content from the website or from the page that you published within the last few minutes or few hours. If you published a new article one hour ago and you can see, okay, the URL is indexed, make sure that every single piece of that article or that page is indexed in Google.

Two waves of indexing

And this is where I have to introduce a new concept, which is partial indexing. It may happen that with JavaScript content, some of your content within that URL is indexed, some of the content isn't. And this is where it gets a little bit tricky because the content that is not going to be indexed is content that relies on JavaScript. Make sure to check different parts of the page and see if they are appropriately indexed in Google.

Step 4: Code Comparison

Step four is if you are feeling geeky, if you want to dive a little bit deeper, go to your search console and check a few last crawled pages. Compare the code that you can see in the Google Search Console with what you are seeing in your browser and see, okay, are there any anomalies?

Conclusion

So those are the four steps that you have to take. But now what happens if you found some problems or some potential issues during those four steps? For example, you are seeing that Google is taking a little bit too long to index your content, or some of your content is never indexed in Google or other search engines.

If that happens, you need to consider some form of rendering your JavaScript for a search engine, especially, depending on your market, in most cases, for Google and Googlebot. This is something I am going to cover in the next episode of Weekly Wisdom with Bartosz, so make sure to subscribe. And I hope you enjoyed this episode. Thank you so much.

Bartosz Góralewicz
Pro

Asks great questions and provides brilliant answers.

Bartosz Goralewicz has been a staple in the SEO industry over the last decade as both the co-founder of Elephate (2018’s “Best Small SEO Agency” in Europe) and a thought leader. His ground-breaking research on JavaScript SEO has been the subject of numerous viral articles and has brought him on stages all over the world to share his knowledge. In 2019, he decided to go even more technical and founded Onely – the one and only technical SEO house. Onely’s specialized team works with Fortune 100 companies and other major international brands while continuing to push the envelope in technical SEO. He is also a husband and father of two.
Share this post
or

Comments

2000
Newcomer

Either just recently joined or is too shy to say something.

But when we looked into one of popular News website AMP article -The Guadian . it is not indexing images like its desktop version when check using plugin mentioned in article . Is this a problem for Google bots to index such images?
Tomek Rudzki
Enthusiast

Occasionally takes part in conversations.

Prash Mysore
Hello Prash.
I checked the AMP version of The Guardian using The Quick JavaScript Switcher plugin and all the images are apparent here with JS switched off.

Besides, I don't see any problem that Google doesn't index images on the AMP version, assuming images on the canonical version are indexed fine.
Newcomer

Either just recently joined or is too shy to say something.

Tomek Rudzki
Thanks for your reply.
Another Case - News website [link removed by moderator] does not show about 90% of content when Quick JavaScript Switcher plugin is ON. Is it an issue? Can Google crawl the content in those pages?
Newcomer

Either just recently joined or is too shy to say something.

Prash Mysore
Since link is removed you can search in Google as Deccan Herald Liveblog.
Newcomer

Either just recently joined or is too shy to say something.

Really really helpful. I watch a lot of tutorials and nobody ever gave such a detailed information like you did, I love to see more videos about java-script and technical SEO, please.
Paul Lovell
Master

A veteran community member.

Thanks Bartosz, I usually use a different extension for java but i have been looking to change it as it is no longer available in the chrome store any more

Send feedback

Your feedback must contain at least 3 words (10 characters).

We will only use this email to respond to you on your feedback. Privacy Policy

Thank you for your feedback!