我的网站是单页应用程序,并使用了大量的JavaScript。我已经设置了服务器以生成用户使用javascript看到的网站,因此Google会看到相同的内容。 Google通过fragment
元标记了解此信息,并将链接与shebang转换为escaped_fragment
以获取该呈现的网站。由于我希望Google了解我网站上不再有来自主页的链接的最新文章,我添加了一个站点地图。
问题是我是否应该添加 或没有 shebang的网址或将其转换为escaped_fragment。
http://www.example.com/#!veryAwsomeDynamicPage
或
http://www.example.com/?_escaped_fragment=veryAwsomeDynamicPage
我的目标:我希望Google通过escaped_fragment获取我的内容,但希望Google在其搜索结果中显示的链接与shebang(以便用户不会被重定向)
答案 0 :(得分:1)
在“{搜索引擎抓取工具的角色”下的google's specification中所述
The search engine agrees to display in the search results the corresponding pretty URLs:
因此,当谷歌抓取http://www.example.com/#!veryAwsomeDynamicPage上的内容时,搜索结果会显示http://www.example.com/?_escaped_fragment=veryAwsomeDynamicPage
所以http://www.example.com/#!veryAwsomeDynamicPage应该在sitemap.xml中