Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can we do SEO for an AngularJS site with angular-translate?

we have a website that is serving both chinese and english version using angular-translate. The frontend determines the language settings. It is fine from client side but when google bot crawls our content for SEO purposes, they cannot crawl the content. Instead, they crawled the syntax before translation

{{'CONTENT_1' | translate }}

Also as attached in photo below!

Google Bot search result

We are currently using ajaxsnapshots to serve snapshot to google bot. Wondering if anyone knows how to serve internationalised content correctly with AngularJS and angular-translate!

like image 234
Chris Yeung Avatar asked Mar 25 '14 15:03

Chris Yeung


People also ask

Is AngularJS SEO friendly?

Similar to any other JavaScript framework, Angular requires using special tools to optimize SPAs for search engines. Those tools allow you to implement SSR (server-side rendering) and meet all technical SEO requirements for correct page indexation and good ranking.

Can Google crawl angular?

Server-side rendering with Angular Universal Another method to make angularjs SEO friendly can use Angular Universal Extension to create static versions of web pages that can be rendered on the server-side. Google's bots can easily reach and crawl them and provide indexes to your pages.


1 Answers

The current issue does not relate to angular-translate, but the inability for crawlers to execute javascript before indexing the page. Some improvements have been made, but services like prerender.io will render the page and serve HTML only snapshot to crawlers instead.

Angular-translate SEO issues are discussed here: http://fadeit.dk/post/angularjs-seo-for-angular-translate

like image 191
ozooner Avatar answered Sep 28 '22 14:09

ozooner