提取为Google网站管理员工具 [英] Fetch as Google Webmaster tools

查看:99
本文介绍了提取为Google网站管理员工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个AngularJS SPA网站,我想使用网站管理员工具中的Google以Google身份获取"功能进行测试.我对结果有些困惑. Googlebot的屏幕截图看起来是正确的,但是响应中不包含"ui-view"(ui-router)中的任何内容...有人可以解释这里发生了什么吗?由于屏幕截图正确,Google是否可以正确索引网站?还是Google无法正确执行JS进行索引编制?

I have an AngularJS SPA site which I wanted to test using google's "Fetch as Google" feature in webmaster tools. I am a little confused about the results. The screenshot from Googlebot looks correct however the response doesn't include any of the contents inside the "ui-view" (ui-router)... can someone explain what is happening here? Is google indexing the site properly since the screenshot is correct? Or is google not able to execute the JS properly for indexing?

推荐答案

这是一个混合包.从一些测试中,我已经看到GoogleBot在某些情况下能够索引一些AJAX提取的内容.一个让所有搜索引擎满意的安全选择是使用 prerender.io 或下载其开源内容(使用PhantomJS)使您的网站易于索引.基本上,此操作是在完成给定URL的异步操作后保存网站的版本,然后在服务器上设置重定向,以将搜索引擎的所有可能的漫游器都指向预处理页面.这听起来很复杂,但是按照网站上的说明进行设置并不难,如果您不想为将页面的缓存副本提供给搜索引擎而使用prerender.io付费,则也可以自己运行服务器组件.

This is a mixed bag. From some tests I've seen the GoogleBot is able to index some of the AJAX fetched content in some cases. A safe bet though to make all the search engines happy is to use prerender.io or download their open source stuff (uses PhantomJS) to have your site be easily indexable. Basically what this does is saves the version of your site after async operations have completed for a given URL and then you setup a redirect on your server that points any of the potential bots for search engines over to the preprocessed page. It sounds pretty complicated but following the instructions on the site it's not too hard to setup, and if you don't want to pay for prerender.io to serve cached copies of your pages to search engines you can run the server component yourself too.

这篇关于提取为Google网站管理员工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆