The Five Commandments Of JavaScript And SEO For Beginners

uncaptioned

Your business has a website. You’re not a tech expert. These two sentences describe most business owners, and that presents some challenges. First, you probably don’t care about the process and theory behind the construction of a website. You don’t have to — but you do need a website that delivers desired results. If potential customers can’t find your business online based on relevant search terms, that’s a big, big problem.

And that means you should learn a little about your website and how to ensure it ranks high for the appropriate searches. You know you need excellent search engine optimization (SEO), but there are elements of your website itself — independent from your content and SEO  — that can dramatically affect your page ranking. JavaScript is one of those elements.

JavaScript is a programming language, and the good news is that you don’t have to learn it! It’s used to make websites super responsive and interactive … all good qualities as far as users are concerned. But here’s the catch: Crawler bots for search engines aren’t particularly good at understanding JavaScript, which means that some of your website content may not be indexed and used to optimize relevant search results. And that, as you might imagine, can hurt your rankings.

Without any further ado, here are the Five Commandments of JavaScript and SEO (for people who don’t know anything about JavaScript.) These are practical, simplified points that will help you assess your website’s SEO and begin the right conversations with your web developer. A note: We’re focused primarily on Google, but that isn’t the only search engine on the planet. We’re not dissing other search engines; rather, we’re starting with the most obvious ways to evaluate and improve your SEO.

1. Thou shall get to know thy programmer/developer. JavaScript isn’t a DIY aspect of a website for most people, and that’s okay. But if you’re not a tech expert, you need to be talking to the people who are. While it would be ideal for every website builder to reflect on the ways in which their choices will affect your page ranking, do you really want to gamble on it? Get to know your tech folks, and get ready to work with them to ensure your site is indexed and ranked properly.

2. Thou shall know how to test thy website. Sure, you could just assume that everything’s great with your website — or you could check it for yourself. Hint: Check it for yourself. Here are some tools that will show you how Google’s crawler sees and interprets your website. Included are links that will walk you through the process and help you interpret results. FYI, these tools change over time, so old articles may refer you to outdated resources, and these may eventually change, as well.

• Google’s URL inspection tool – This tool has several functions, the most basic of which is to tell you if a given page can be indexed by Google. You can also see a rendered version of your webpage so you can see exactly what the Google crawler sees.

• Google’s mobile-friendly testing tool – This simple tool lets you know if Google encounters problems in rendering your website for mobile devices.

• Google site search – We’re going to get a little fancy here. The above tools are important, but they basically show you what Google can see and can render, not necessarily what they will. One of the reasons JavaScript can cause problems for SEO is that it takes longer for the Googlebot (Google’s web crawler) to render pages that use JavaScript. Site search lets you see if Google has actually indexed a given page. Find an explanation of how to use this tool here.

3. Thou shall make sure thy URL isn’t blocked for Googlebot. There’s a tiny command — robots.txt — that prevents Googlebot from crawling certain pages. Sometimes critical JavaScript files can be blocked, which prevents a page from loading properly. Your URL inspection tool will give you this important information.

4. Thou shall not use JavaScript for static content. This may be a controversial point, because you can, in fact, use JavaScript for static content — that is, content that doesn’t change; content that typically includes much of the SEO-critical information on your site. But since JavaScript’s forte is delivering interactive, dynamic content and because JavaScript necessarily slows down Googlebot’s rendering of a page, using it for static content just doesn’t make sense.

5. Thou shall get your SEO expert and website developer on the same page. JavaScript doesn’t directly affect content; it affects the way users — both live and crawler bots — perceive and interact with that content. That’s why it’s important to ensure that your teams aren’t working at cross purposes.

It’s perfectly normal for most business owners to glaze over when there’s JavaScript talk and mentions of URLs. I get it. But if you’re actively seeking new customers via your website, it’s absolutely vital that you ensure your web developer and SEO expert are delivering the best results. Since JavaScript is a prime suspect for websites with lousy Google rankings, it makes sense to poke around a bit and follow the Five Commandments.

[“source=forbes”]