Questions tagged «robots.txt»

4
如何鼓励Google阅读新的robots.txt文件?
我刚刚在新网站上更新了robots.txt文件;Google网站管理员工具报告说,它在我最后一次更新前10分钟读取了我的robots.txt。 有什么方法可以鼓励Google尽快重新阅读robots.txt? 更新:在站点配置下| 搜寻器存取| 测试robots.txt: 主页访问显示: Googlebot被阻止访问http://my.example.com/ 仅供参考:Google上次阅读的robots.txt如下所示: User-agent: * Allow: /<a page> Allow: /<a folder> Disallow: / 我是否已经用脚开枪,或者它最终会显示为:http:///robots.txt(就像上次阅读它一样)? 关于我需要做什么的任何想法?


4
如何在Nginx中为所有虚拟主机全局设置robots.txt
我正在尝试为robots.txtnginx http服务器下的所有虚拟主机设置。通过在main中添加以下内容,我能够在Apache中做到这一点httpd.conf: <Location "/robots.txt"> SetHandler None </Location> Alias /robots.txt /var/www/html/robots.txt 我尝试通过在nginx.conf和(b)中添加以下包含conf.d / robots.conf的行来与nginx做类似的事情 location ^~ /robots.txt { alias /var/www/html/robots.txt; } 我尝试过使用'=',甚至将其放在虚拟主机之一中进行测试。似乎没有任何作用。 我在这里想念什么?还有另一种方法可以实现这一目标吗?
13 nginx  robots.txt 

4
如何为Apache服务器上的所有域创建robots.txt文件
我们有一个带有虚拟主机的XAMPP Apache开发Web服务器设置,并希望阻止Serps爬行我们所有的站点。使用robots.txt文件可以轻松完成此操作。但是,我们宁可不要在每个虚拟主机中都包含一个禁止的robots.txt文件,而当我们在另一台服务器上使用该站点时,则必须将其删除。 apache配置文件是否可以将所有虚拟主机上对robots.txt的所有请求重写为单个robots.txt文件? 如果是这样,您能举个例子吗?我认为应该是这样的: RewriteEngine On RewriteRule .*robots\.txt$ C:\xampp\vhosts\override-robots.txt [L] 谢谢!
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.