禁止搜索引擎收录的方法

新建robots.txt文件,放到网站根目录下面。

robots.txt文件的内容:

User-agent: * 
Disallow: / 

User-agent:*表示和所有搜索引擎协议适用;   Disallow:/表示禁止抓取收录全站。


 

参考:

http://bar.baidu.com/robots/

原文地址:https://www.cnblogs.com/wangyuman26/p/6225098.html