The Definitive Guide to JavaScript SEO (2021 Edition)

By PierceBrelinsky

Posted by PierceBrelinsky

The web is in a golden age of front-end development, and JavaScript and technical SEO are experiencing a renaissance. As a technical SEO specialist and web dev enthusiast at an award-winning digital marketing agency, I’d like to share my perspective on modern JavaScript SEO based on industry best practices and my own agency experience. In this article, you’ll learn how to optimize your JS-powered website for search in 2021.

What is JavaScript SEO?

JavaScript SEO is the discipline of technical SEO that’s focused on optimizing websites built with JavaScript for visibility by search engines. It’s primarily concerned with:

  • Optimizing content injected via JavaScript for crawling, rendering, and indexing by search engines.
  • Preventing, diagnosing, and troubleshooting ranking issues for websites and SPAs (Single Page Applications) built on JavaScript frameworks, such as React, Angular, and Vue.
  • Ensuring that web pages are discoverable by search engines through linking best practices.
  • Improving page load times for pages parsing and executing JS code for a streamlined User Experience (UX).

Is JavaScript good or bad for SEO?

It depends! JavaScript is essential to the modern web and makes building websites scalable and easier to maintain. However, certain implementations of JavaScript can be detrimental to search engine visibility.

How does JavaScript affect SEO?

JavaScript can affect the following on-page elements and ranking factors that are important for SEO:

  • Rendered content
  • Links
  • Lazy-loaded images
  • Page load times
  • Meta data

What are JavaScript-powered websites?

When we talk about sites that are built on JavaScript, we’re not referring to simply adding a layer of JS interactivity to HTML documents (for example, when adding JS animations to a static web page). In this case, JavaScript-powered websites refer to when the core or primary content is injected into the DOM via JavaScript.

App Shell Model.

This template is called an app shell and is the foundation for progressive web applications (PWAs). We’ll explore this next.

How to check if a site is built with JavaScript

You can quickly check if a website is built on a JavaScript framework by using a technology look-up tool such as BuiltWith or Wappalyzer. You can also “Inspect Element” or “View Source” in the browser to check for JS code. Popular JavaScript frameworks that you might find include:

JavaScript SEO for core content

Here’s an example: Modern web apps are being built on JavaScript frameworks, like Angular, React, and Vue. JavaScript frameworks allow developers to quickly build and scale interactive web applications. Let’s take a look at the default project template for Angular.js, a popular framework produced by Google.

When viewed in the browser, this looks like a typical web page. We can see text, images, and links. However, let’s dive deeper and take a peek under the hood at the code:

Now we can see that this HTML document is almost completely devoid of any content. There are only the app-root and a few script tags in the body of the page. This is because …read more

Source:: Moz Blog

      

Aaron
Author: Aaron

Related Articles