Googlebot crawl and Index problem using "trustAsHtml" with Angular version - 1.5.x

0 replies
  • SEO
  • |
Angular version - 1.5.x

1. HTML content is rendered using "ng-bind-html" on the page. This rendered HTML content is explicitly trusted on client side using "$sce.trustAsHtml". When we use trustAsHtml, somehow the Googlebot is not able to crawl and index this page.
2. On the other hand, when we just sanitize the HTML content on client side or just inject "ngSanitize" in the controller, and DO NOT use"$sce.trustAsHtml", Googlebot is able to crawl and index the content. We can see the content in the Google search results.

Any idea what should be going on here?

1. There are few links on the page that dynamically fetches additional content from server once clicked into and renders the content on the page.
2. Based on this article, Google wont be able to click into the links and crawl the content automatically.
3. For performance reasons, we cannot bring all the content on the first page load. Hence we want the users to click into the link, then fetch the content from the server and show it on the page.
4. We currently do not have AMP pages, and do not plan to support it immediately.

Any suggestion how can we tackle this issue w/o pre-render html or AMP option?

Really appreciate any help!

#15x #angular #crawl #googlebot #index #problem #trustashtml #version
Avatar of Unregistered

Trending Topics