除了一个用户代理之外,所有用户代理都禁止所有吗? [英] Disallow all for all user agents except one user agent?

查看:42
本文介绍了除了一个用户代理之外,所有用户代理都禁止所有吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何禁止除一个用户代理之外的所有用户代理?例如,禁止所有用户代理全部使用,但只允许 Googlebot 使用?

How to disallow all for all user agents except one user agent? For example disallow all for all user agent, but allow for Googlebot only?

推荐答案

User-agent: *
Disallow: /

User-agent: google
Allow: /

这个示例 robots.txt 告诉爬虫,如果他们不使用 google.那么最好不要抓取您的网站.虽然谷歌已经获得了在网站上抓取任何内容的绿色通行证.

This sample robots.txt tells crawlers that if they are not with google. then it is preferred they don't crawl your site. While google has been given the greenpass to crawl anything on the site.

此文件应存储在 www.example.com/robots.txt.

This file should be stored at www.example.com/robots.txt.

请阅读 robots.txt

这篇关于除了一个用户代理之外,所有用户代理都禁止所有吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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