All Posts

May 06, 2019

How JavaScript can hurt your SEO

Written by Nick Wineland
Find me on:

The little things can hurt or help your search engine optimization (SEO). A case in point: web pages built with JavaScript, which is a computer programming language commonly used to create dynamic content such as video. When I use a search engine to look for a business’s web page and am having trouble finding pages that are easily navigated to on the site, one of the first questions I ask is whether the page or certain elements were designed with JavaScript. JavaScript can be a powerful tool for creating dynamic content, but there are downsides to using this programming language. 

Why JavaScript?

We live in a world in which employees, customers, and shareholders expect to see dynamic content. Text-heavy web pages don’t cut it anymore. The need to create websites and location pages with rich video has made JavaScript more popular. Many businesses have adopted the practice of using JavaScript for creating pages with complex video and HTML for static content.

This practice is all well and good except for one problem: a web crawler might have a hard time finding and understanding the content on your page if you have coded the page entirely in JavaScript. JavaScript can affect two specific issues:

  • Crawlability: a web crawler’s ability to navigate your site page by page. JavaScript can limit which content a web crawler is able to find. If the crawler can’t find your content, it can’t index it.
  • Obtainability: a web crawler reads your page but cannot figure out what the content pertains to. If the crawler can’t figure out what your content is, it can’t rank it for relevant keywords. 

A crawlability or obtainability problem could result in your page not showing up at all in a search on Google, Bing, or any other search engine, resulting in a loss in web traffic. Obviously, this is not a good outcome. The problem can also arise if you migrate a web page from HTML to JavaScript.

The JavaScript Paradox

In a recently published article on Moz, “How to Diagnose and Solve JavaScript SEO Issues in 6 Steps,” author Tomek Rudzki describes the migration-related issues as “the JavaScript paradox.” He summarizes the paradox this way:

1.) The big brands jump on the JavaScript hype train after hearing all the buzz about JavaScript frameworks creating amazing UXs.

2.) Reality reveals that JavaScript frameworks are really complex.

3.) The big brands completely butcher the migrations to JavaScript. They lose organic traffic and often have to cut corners rather than creating this amazing UX journey for their users.

What You Should Do

So, what should you do if you’re losing traffic because of a page designed in JavaScript? Well, the solutions can get complicated, but allow me to boil them down for you:

  • Troubleshoot some specific issues that could have arisen when you coded your page. Those issues range from Google failing to discover content hidden under tabs to your team blocking JavaScript files by mistake. Tomek Rudzki’s Moz article does a great job taking you through useful troubleshooting steps as does “Demystifying JavaScript: Tips & Tools for Testing Rendering,” by Rachel Costello.
  • Ask your developers (or agency, if you rely on one) to edit the web page framework so that JavaScript works in conjunction with HTML. Search engines will be able to crawl, understand, and index your site.
  • If editing the framework does not work, you may need to create a new set of pages, which is more expensive and time consuming.

An even better solution is to take steps to avoid the problem arising in the first place. How? Involve your SEO team in web development. A good SEO expert will flag potential problems and alternatives before you code your pages.

Google is making strides to understand JavaScript. Google is currently able to index JavaScript, but it still has trouble with crawling the information. Consequently, pages with JavaScript elements or JavaScript-heavy pages may show up in the search results, but Google will have a hard time understanding what the content is about. Therefore, you most likely will see your rankings reflect the search engines’ misunderstanding.

I think we are just starting to scratch the surface of JavaScript and SEO, and as Google makes improvements with its ability to understand JavaScript, the landscape will certainly change.

At Investis Digital, we help many clients create content that is compelling and findable. Our content teams possess a full complement of skills creating content and designing pages for performance and SEO. For more insight on how we can help, contact Investis Digital.

Subscribe to Email Updates