SEO with single page application

783 views Asked by At

I built a node.js social networking web site for noders but I get some serious problems to improve my SEO factors. How can I make it SEO friendly? And yes, given that it is a single page app, it is a little harder!

2

There are 2 answers

1
Chad On BEST ANSWER

I've toyed around with this before. A good place to start is…

http://backbonetutorials.com/seo-for-single-page-apps/

There are also services and libraries for node that will render your app server side in phantom (or the like) and serve it to the bots.

0
Andrey M On

There are two ways to make sure a single page application is SEO friendly: dynamic rendering and server-side rendering.

Dynamic rendering is the easiest way. In this case, requests coming from bots are forwarded via a service that can execute JavaScript and render your SPA into a plain HTML page readable by any search engine bot. This can be done using a headless browser. An example of such a service is Rendertron that uses headless Chrome. These days it's probably the best option, and you can easily install it on your server along with your web server (Apache, Nginx, or whatever you use).

Server-side rendering (SSR) may appear to be a bit more complicated. In this case, the pre-rendered SPA is also a plain HTML for search engines, but on the other hand, it's a fully functional application that can continue running once it's loaded into a browser. SSR probably brings no advantages for SEO compared to dynamic rendering. Still, a pre-rendered SPA may load faster for users, especially on a slow mobile device, because the device will not have to execute all JavaScript before the user sees the first page.

Here is an article with a bit more details https://trackabi.com/blog/single-page-application-seo