Search This Blog

Tuesday, April 19, 2016

Understanding AngularJS: It's a bad for SEO

If you want to use AngularJS for building a blog. That's a bad idea. Despite the fact that the AngularJS is backed by Google -the first search engine, or maybe the one and only search engine you want to optimize- but its SEO performance is bad.

The web crawler engine is reading the template not the rendered html template. Google will read:

<h1>{{siteName}}</h1> or <h1></h1>

instead of

<h1>SITE's NAME</h1>

which the last is the thing you expected.

It happens because AngularJS using ajax call method to send http request to remote server, it sent from our browser once the first GET is fully loaded and it will processing the response in our browser too. So there is no process in server except receive the request and sending its response. In short, Google has no any idea what the content is, since the rendering process happens in our browser.

Solution

  • We can use the static <meta> and <title> tag in your <head> to inform the Google what your site is about. But it will be applied in just one page rendered by the first GET, since your app/web is an SPA.
  • We can use some services provided by Brombone, Prerender, and SEO4Ajax. SEO4Ajax provides a free service (terms and conditions applied), beside it is the easiest to use. 
  • The best solution is: dont ever use AngularJS if the SEO includes in your concern.

No comments:

Post a Comment