Google bot crawling on AngularJS site with HTML5 Mode routes

前端 未结 4 563
后悔当初
后悔当初 2020-11-28 13:04

We have an AngularJS site using HTML5 routes. I just did some test \"Fetch as Google\" runs. The results are a bit confusing:

  • On the fetching tab, I see ou
4条回答
  •  醉话见心
    2020-11-28 13:26

    GoogleBot for Search Engine uses _escaped_fragment_ but we can not be sure for other services

    Google recommend to serve an HTML snapshot of AJAX website by using hashbang (#!) and _escaped_fragment_ param.

    But as often for new Google feature all Google services do not support it from the begging.

    For now, by experience, we are sure GoogleBot for indexing webpage use HTML snapshot and _escaped_fragment_. You can check your Server Access Logs to be sure Google did it on your application.

    (For now and by experience, nothing official by Google) other services like PageSpeed Insight, Webmaster Tools parser, Richsnippet testing tools, etc.: hasbang (#!) is not supported. You have to use _escaped_fragment_.

    Should you use User Agent detection to serve HTML snapshot?

    No. Just don't. For different reasons :

    1. You just do not know which services/bots on the web would like to parse your content and you can not be exhaustive (for instance, think of all the social networks existing on the web using Bot to create a snippet of your content : you can not handle them one by one)
    2. This can be considered as cloacking : serving a different version depending on type of user on the same URL, which is basically wrong for SEO.

提交回复
热议问题