如何使用 AJAX 测试 Google 的抓取能力?
我已经创建了我的网站,因此
site.com/#!/page/var1/ans1/var2/ans2
使用 Javascript映射到
site.com/pages/page.php?var1=ans1&var2=ans2
。我也做了这样的
site.com?_escaped_fragment_=/page/var1/ans1/var2/ans2
映射到
site.com/pages/page.php?var1=ans1&var2=ans2
使用 PHP 所以我的网站显然是可爬行的与谷歌。我已经用 Google Fetch 测试过它,它似乎有效。然而,我尝试测试我的网站的所有其他非 Google 蜘蛛都无法使用使用 _escaped_fragment_ 的 Google 技术。我想确保当 Google 蜘蛛访问 site.com 时,它会看到 x,进入 site.com?_escaped_fragment_=/page 并正确抓取它。有什么方法可以确保它抓取我网站上的所有链接并抓取它们?我测试过的测试蜘蛛网站仅列出其中包含域的完整路径的链接 - 但这是否意味着对于我网站上的所有链接,我必须将整个域放在它们之前?那会毁掉我的ajax。
I've created my website so
site.com/#!/page/var1/ans1/var2/ans2
maps onto
site.com/pages/page.php?var1=ans1&var2=ans2
Using Javascript. I have also made it so
site.com?_escaped_fragment_=/page/var1/ans1/var2/ans2
maps onto
site.com/pages/page.php?var1=ans1&var2=ans2
Using PHP so my website will be apparently crawlable with Google. I have tested it with Google Fetch and it seems to work. However all the other non Google spiders I have tried to test my website don't work with the google techniques of using _escaped_fragment_. I want to make sure when the Google spider goes to site.com, it will see x, go to site.com?_escaped_fragment_=/page and grab it properly. Are there any ways I can make sure it's grabbing all the links on my website and crawling them? The test spider sites I've tested only list the links with the full path of the domain in them - but does that mean for ALL the links on my website I have to put the entire domain before them? That will ruin my ajax.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于“非谷歌蜘蛛”;在 Bing 网站管理员工具中,“爬网”选项卡 - 子选项卡“爬网设置” - 页面底部有一个复选框,询问“站点支持 AJAX CRAWLABLE URL” - 包含 #! 的 URL 。如果您还没有检查它,请尝试设置它,看看 Bing 是否会抓取您的漂亮网址。这可能也会帮助 Slurp 抓取网站(??)
至于“我可以确保它抓取我网站上的所有链接并抓取它们的任何方法”,只需 google site:nameOfYoursite.com 和您网站的 Google 索引中的所有 URL 都会出现在 SERP 上。
For the 'non google spiders'; In Bing Webmaster Tools, on the Crawl tab - sub tab Crawl Settings - on the bottom of the page is a checkbox asking 'SITE SUPPORTS AJAX CRAWLABLE URLs' - URL's that include the #! . If you haven't checked it, try setting it and see if Bing will crawl your pretty URLs. This will probably help Slurp crawl the site as well(??)
As for 'any ways I can make sure it's grabbing all the links on my website and crawling them' just google site:nameOfYoursite.com and all of the URLs in the Google index for your site will come up on the SERP.