JavaScript Applications, WordPress, and SEO

An image of various JS Framework logos and the word "SEO?"
The WP Crowd

Roy Sivan

senior contributor
BIO
Published: August 17, 2016

When I first started giving talks at WordCamps about Angular and Single Page Applications (SPA) back in 2014, one of the most common questions I got was “What about SEO?”, and I never really had a great answer. There have always been some kind of workaround for SEO with AJAX or SPA’s, whether it was using a service like prerender.io or fine tuning your sitemap so Google could see the pages that would load.

I realized I needed to shift my thought process, and what I was teaching and talking about, from a whole website built with WordPress as a SPA, to only parts of the site using AngularJS to create high functionality UI blocks, that is where the power of JavaScript frameworks really are.

I’m going to be pretty blunt here. I’ve heard some very knowledgable SEO professionals suggest that 1 particular JavaScript framework is better than another for SEO reasons. While this may be true, these SEO professionals are missing the point of JavaScript Applications entirely, ESPECIALLY when it comes to using them in a WordPress ecosystem. While this may all change in the near future, as things and technology do, for the moment, I don’t think JavaScript Applications and SEO need to go hand in hand anywhere.

WordPress and SEO

WordPress has always been a great way to get a website up and running quickly. SEO has always played a large role in why people even started using WordPress to begin with. For me, WordPress used to be the blog platform I’d attach to a site just to help with the overall site SEO, and by blogging and writing articles, the sites I’d be helping work on would rank higher. WordPress has always been about creating content, and content is they key element for having good SEO, so why shift away from that?

With all the great plugins available nowadays to only help improve SEO on your WordPress website, mainly Yoast SEO, I don’t see a point in not utilizing WordPress to its highest potential. Yes, a JavaScript AJAX powered blog website could add some new ways to do cool UI / UX, however today it would take more work to make that site SEO friendly than just leaving it as default WordPress.

There are other factors involved here like the technology of the stack itself, which I do not want to get into. In a nutshell, if you want to use WordPress to create a site with good SEO with minimal effort to get there, you shouldn’t make your whole website a Single Page Application

Javascript Frameworks and SEO

As I said before, I’ve never had an easy answer for the question about SEO and JavaScript SPA’s, there has always been workarounds, and no matter how well a JavaScript framework may be able to play with the solutions, as of today, there is never going to be as good a solution as just using WordPress by itself. So my answer to the question has kind of evolved.

You’re missing the point

Once I realized that I should be talking about how JavaScript applications should only power parts of a site (even if it is a substantial part), and a whole site built in a JavaScript framework is not necessary, the SEO question becomes moot.

When I was building what was CodeCavalry I knew that only part of the site, or the app itself, needed to be highly functional. So I created a single page that housed the AngularJS application which powered 90% of the site. It communicated with WordPress so user login would transition, and it could be incorporated well. Think of the app as a standalone website, built into my larger WordPress website. The rest of the site which included the home, about, contact, etc. pages were all just regular WordPress pages. Each of these had a small AngularJS application built into the header just to synchronize the user, but that was about it. When I wanted to add a blog, I just added a blog and it was also just regular WordPress with the Yoast SEO plugin to help out with some of the SEO settings.

Separating Marketing from Business Logic

Not everyone has the needs I had with CodeCavalry, but it does come up once in a while. Someone wants to build some web-app with WordPress (which is a great idea), and want to use the latest tech for the application. In a lot of these cases the business or what their customers are paying for, is the app. Whatever their application does, that is what they are going to sell.

With CodeCavalry it was the ability to get quick help using video conferencing and chat, for an affordable price. Great, so now that they have their business model and MVP idea in place, they want to take over all of WordPress to power it. Which is not a great idea.

Separating out the application into its own part of the site is much more flexible way to work. It can be anything from a separate sub-directory, not even WordPress, powered by the WordPress REST API. It can also be in the theme itself, utilizing a page template to mark the app page. This is a win win for the marketing & SEO side, and the development. It is a modular way to setup your website and application. It allows for the application to be developed or worked on irrelevant of any work that is needed to the rest of the site.

Marketing engineers can develop new pages, or utilize plugins without worrying about affecting the application, which is the business’s bread and butter. The pages that are outside of the application are also just regular server-side rendered WordPress, so you get all the easy SEO.

JavaScript Applications powering widgets / blocks

If you are using JavaScript to only power some small piece of functionality, you shoudn’t need to worry about SEO. At WPCampus 2016 I gave a workshop on how to build an AngularJS application that utilized Firebase to create a live notification. This notification would appear or disappear live to everyone currently on the site simultanously. The AngularJS part wasn’t even a multi-view application, it didn’t need routing. It was just a quick AngularJS directive which looked at the Firebase data and updated whenever Firebase updated.

You can see the video of my workshop, and check out the code on GitHub

TL;DR

If you want to build a Single Page Application powered by JavaScript on top of WordPress, ask yourself if you really care about SEO. If you don’t, go for it. If you do, then stop asking me how to make it SEO friendly, you are missing the point. Use WordPress as anyone normally would for every page BUT the JavaScript Application. Use either a subdirectory, subdomain, or page-template to separate out the JavaScript application so you can work on it in tandem to the rest of the site. This gives the “marketing” pages (home, about, blog/articles) the benefits of WordPress & easier SEO without affecting the JavaScript application.

So which JS Framework has the best SEO?

You’ve clearly missed the whole point of this article. JavaScript Frameworks shouldn’t be fundamentally gauged on SEO since JavaScript Applications shouldn’t be used to build sites that need great SEO to begin with. You have WordPress for SEO, and JavaScript Application where and when you need it.

Get the latest from The WP Crowd

1
Leave a Reply

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Wordpress Development Service India Recent comment authors

This site uses Akismet to reduce spam. Learn how your comment data is processed.

newest oldest
Wordpress Development Service India
Guest

Thanks for the article. SEO is the main key point, why people choosing WordPress for their cms development rather than the other.