新建robots.txt文件,放到网站根目录下面。
robots.txt文件的内容:
User-agent: * Disallow: /
User-agent:*表示和所有搜索引擎协议适用; Disallow:/表示禁止抓取收录全站。
参考:
http://bar.baidu.com/robots/