一、更新方式:
robots.txt更新方案一:
curl方案文件已成功更新。
robots.txt更新方案二:
file_get_contents方案文件已成功更新。
二、文件下载:
1、将文件下载后解压至网站根目录,即可拒绝常大多数无效蜘蛛访问导致服务器瘫痪;
2、下载地址:
下载robots.txt文件
三、常见robots.txt写法:
1、拒绝所有蜘蛛访问:
User-agent: *
Disallow: /
2、拒绝所有蜘蛛访问多个目录:
User-agent: *
Disallow: /admin/
Disallow: /mp3/
Disallow: /images/
3、允许所有蜘蛛访问所有目录:
User-agent: *
Disallow:
4、拒绝单个蜘蛛访问网站,如百度:
User-agent: Baiduspider
Disallow: /
5、拒绝除百度以外的所有蜘蛛
User-agent: Baiduspider
Disallow:
User-agent: *
Disallow: /
6、只禁止一个目录不被访问
User-agent: *
Disallow: /admin/
四、常见蜘蛛官方地址:
1、百度:http://www.baidu.com/search/spider.html 蜘蛛名称:Baiduspider-render、Baiduspider
2、谷歌:http://www.google.com/bot.html 蜘蛛名称:Googlebot、Googlebot-Image
亚马逊:https://developer.amazon.com/support/amazonbot 蜘蛛名称:Amazonbot
MJ12bot:http://mj12bot.com/ 蜘蛛名称:MJ12bot
AhrefsBot:http://ahrefs.com/robot/ 蜘蛛名称:AhrefsBot
DotBot:https://opensiteexplorer.org/dotbot 蜘蛛名称:DotBot
GPTBot:https://openai.com/gptbot 蜘蛛名称:GPTBot
Bytespider:https://zhanzhang.toutiao.com/ 蜘蛛名称:Bytespider
SurdotlyBot:http://sur.ly/bot.html 蜘蛛名称:SurdotlyBot
wpbot:https://forms.gle/ajBaxygz9jSR8p8G9 蜘蛛名称:wpbot
CCBot:https://commoncrawl.org/faq/ 蜘蛛名称:CCBot
SemrushBot:http://www.semrush.com/bot.html 蜘蛛名称:SemrushBot
facebookexternalhit:http://www.facebook.com/externalhit_uatext.php
meta-externalagent:https://developers.facebook.com/docs/sharing/webmasters/crawler
https://www.robotstxt.org/robotstxt.html
友情链接:
月饼
한국 검색엔진