Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
SearchNorwich recently published an excellent video in which Google’s Martin Splitt discusses how to troubleshoot JavaScript-related indexing and indexing problems, saying that most of the time it’s not JavaScript that causes indexing problems, the real cause is something else. Even if you don’t know how to code with JavaScript, the tips Martin shares will get anyone off to a good start in fixing crawling errors that occur on a website.
Martin’s SearchNorwich video was published a month ago. Just a few days ago John Mueller advises that too much JavaScript can have a negative impact on SEOwhich agrees with Martin’s point that JavaScript is rarely the cause of SEO problems, that it’s either misuse of JavaScript or something else entirely.
He explains that almost all of the suspected JavaScript problems emailed to him end up being something else. He blames the wrong approach to debugging for SEO problems. What he describes is confirmation bias, which is suspecting something is the cause and then looking for clues to justify that opinion. The definition of confirmation bias is the tendency to interpret existing evidence or look for evidence that confirms existing beliefs while ignoring evidence that contradicts those beliefs.
Martin explained:
“…it seems to me, as someone on the Google side of things, that SEOs are looking for clues that allow them to blame things they see on JavaScript. Then they show up, or someone from their team shows up, in my inbox or on social media and says, “We found a bug. It’s JavaScript. You say JavaScript works in Google search, but we have a strong indication that it doesn’t, and you know it’s because of JavaScript.”
He goes on to say that out of the hundreds of times a year he’s been approached with a diagnosis that JavaScript is to blame for an SEO problem, he’s only seen one actual case where an actual error related to JavaScript was to blame. Just one.
He also says:
“People often claim, “You say it works if you use client-side rendering, but clearly it doesn’t. It must be a problem with JavaScript, and maybe even a bug in Google.” Surprisingly, many people who end up in my inbox suspect it’s Google’s mistake. I find that interesting, especially when a small niche website claims to be affected by a bug that doesn’t affect any other websites. Most of the time it’s not us – it’s you.”
Splitt explains that when JavaScript is involved in a crawling or rendering problem, it’s usually not because JavaScript is at fault, but because it’s being used incorrectly
Martin suggests troubleshooting display issues by checking how Google “sees” the website. Rendering, in the context of Googlebot crawling, is the process of taking all the resources from a web page such as fonts, JavaScript, CSS, and HTML, and then creating a fully functional web page that is similar to what a human user would experience in a web browser.
Debugging how Google renders a page can show that the page is rendering fine, that certain parts aren’t rendering, or that the page can’t be indexed at all.
He recommends using the following tools to debug potential JavaScript issues:
1. Google Search Console URL viewer tool
2. Google Rich Results Test
3. Chrome Dev Tools
Both of the first two tools allow you to submit a URL that is indexed by Google immediately and they will show you the rendered page, how the page looks to Google for indexing purposes.
Martin explains the usefulness of JavaScript console messages in Chrome Dev Tools:
“There’s also more information that gives you very useful details about what happened in the JavaScript console messages and what happened on the network. If your content is there and what you expect it to be, then it’s very likely not JavaScript that’s causing the problem. If people were doing just that, checking these basics, 90% of the people that show up in my inbox wouldn’t show up in my inbox. That’s what I do.”
He also explained that just because the JavaScript console indicates an error does not mean that the problem is with JavaScript itself. He uses the example of a JavaScript failure error caused by an API blocking Robots.txt, preventing the page from rendering.
Martin implies that not knowing how to debug JavaScript is the cause of the reputation it has received as the cause of indexing and indexing problems. I get it, I learned the basics of JavaScript coding by hand 25 years ago and I didn’t like it then and it’s never been my style now.
But Martin is right that knowing a few JavaScript debugging tricks will save a lot of wasted time looking for the wrong problem.
It might not be JavaScript – Martin Splitt at SearchNorwich 18
Featured Image Shutterstock/Artem Samokhvalov