
Google’s Martin Splitt recently shared insights on how JavaScript mistakes can hurt a website’s search performance.
His talk comes as Google Search Advocate John Mueller also urges SEO pros to learn more about modern client-side technologies.
Mistake 1: Rendered HTML vs. Source HTML
During the SEO for Paws Conference, a live-streamed fundraiser by Anton Shulke, Splitt drew attention to a trend he’s noticing.
Many SEO professionals still focus on the website’s original source code even though Google uses the rendered HTML for indexing. Rendered HTML is what you see after JavaScript has finished running.
Splitt explains:
“A lot of people are still looking at view source. That is not what we use for indexing. We use the rendered HTML.”
This is important because JavaScript can change pages by removing or adding content. Understanding this can help explain some SEO issues.
Mistake 2: Error Pages Being Indexed
Splitt pointed out a common error with single-page applications and JavaScript-heavy sites: they often return a 200 OK status for error pages.
This happens because the server sends a 200 response before the JavaScript checks if the page exists.
Splitt explains:
“Instead of responding with 404, it just responds with 200 … always showing a page based on the JavaScript execution.”
When error pages get a 200 code, Google indexes them like normal pages, hurting your SEO.
Splitt advises checking server settings to handle errors properly, even when using client-side rendering.
Mistake 3: Geolocation Request Issue
Another problem arises when sites ask users for location or other permissions.
Splitt says Googlebot will always refuse the request if a site relies on geolocation (or similar requests) without a backup plan.
Splitt explains:
“Googlebot does not say yes on that popup. It says no on all these requests … so if you request geolocation, Googlebot says no.”
The page can appear blank to Googlebot without alternative content, meaning nothing is indexed. This can turn into a grave SEO mistake.
How to Debug JavaScript for SEO
Splitt shared a few steps to help diagnose and fix JavaScript issues:
- Start with Search Console: Use the URL Inspection tool to view the rendered HTML.
- Check the Content: Verify if the expected content is there.
- Review HTTP Codes: Look at the status codes in the “More info” > “Resources” section.
- Use Developer Tools: Open your browser’s developer tools. Check the “initiator” column in the Network tab to see which JavaScript added specific content.
Splitt adds:
“The initiator is what loaded it. If it’s injected by JavaScript, you can see which part of the code did it.”
Following these steps can help you find the problem areas and work with your developers to fix them.
See Splitt’s full talk in the recording below:
[embedded content]
A Shift in SEO Skills
Splitt’s advice fits with Mueller’s call for SEOs to broaden their skill set.
Mueller recently suggested that SEO professionals learn about client-side frameworks, responsive design, and AI tools.
Mueller stated:
“If you work in SEO, consider where your work currently fits in … if your focus was ‘SEO at server level,’ consider that the slice has shrunken.”
Modern JavaScript techniques create new challenges that old SEO methods cannot solve alone. Splitt’s real-world examples show why understanding these modern web practices is now critical.
What This Means For SEO Professionals
Both Google Advocates point to a clear trend: SEO now requires more technical skills. As companies look for professionals who can blend SEO and web development, the demand for these modern skills is growing.
To keep up, SEO pros should:
- Learn How JavaScript Affects Indexing: Know the difference between source and rendered HTML.
- Master Developer Tools: Use tools like Search Console and browser developer tools to spot issues.
- Collaborate with Developers: Work together to build sites that serve users and search engines well.
- Broaden Your Skillset: Add client-side techniques to your traditional SEO toolkit.
Looking Ahead
As the web evolves, so must the skills of SEO professionals. However, leveling up your knowledge doesn’t have to be intimidating.
This fresh look at JavaScript’s role in SEO shows that even simple changes can have a big impact.
Featured Image: BestForBest/Shutterstock