asp.net – 允许搜索机器人在没有会话ID的情况下抓取您的网站

前端之家收集整理的这篇文章主要介绍了asp.net – 允许搜索机器人在没有会话ID的情况下抓取您的网站前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
谷歌的 Webmaster guidelines

Allow search bots to crawl your sites without session IDs or arguments that track their path through the site. These techniques are useful for tracking individual user behavior,but the access pattern of bots is entirely different. Using these techniques may result in incomplete indexing of your site,as bots may not be able to eliminate URLs that look different but actually point to the same page.

我的ASP.NET 1.1站点使用自定义身份验证/授权,并且非常依赖会话guids(类似于this approach).我担心允许非会话跟踪流量会破坏我现有的代码或引入安全漏洞.

允许非会话跟踪机器人抓取正常会话跟踪站点的最佳做法是什么?除了检查用户代理之外,还有什么方法可以检测搜索机器人(我不希望人们欺骗自己作为googlebot来绕过我的会话跟踪)?

解决方法

检测机器人的正确方法是通过主机条目(Dns.GetHostEntry).一些蹩脚的机器人要求您通过IP地址进行跟踪,但流行的机器人通常不会. Googlebot请求来自* .googlebot.com.获得主机条目后,您应该检查IPHostEntry.AddressList以确保它包含原始IP地址.

在验证机器人时,甚至不要查看用户代理.

另见http://googlewebmastercentral.blogspot.com/2006/09/how-to-verify-googlebot.html

原文链接:https://www.f2er.com/aspnet/247296.html

猜你在找的asp.Net相关文章