문제

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!

도움이 되었습니까?

해결책

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

다른 팁

For example, you can try to determine a language from the URL. This way you'll be able to give a bot a static version of the page. Another question is how to get this static version of the page. But, I'm not sure if it can help somehow.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top