如何设置网站的robots.txt文件?
1、在电脑桌面新建一个文本文档,命名为robots.txt
2、robots.txt的写法
User-agent: * (允许所有蜘蛛抓取)
Disallow: /so_artic*(屏蔽搜索结果页面)
Disallow: /404*(屏蔽404页面)
Disallow: /*?*(屏蔽动态链接)
Sitemap: https://www.steelpipepro.com/sitemap_index.xml(添加网站地图)
3、登录网站FTP,把我们写好的robots.txt文件直接上传到网站的根目录下即可。(我这里是打开FTP就是根目录,直接上传)
4、最后通过你的域名/robots.txt 可以访问到就可以。
案例如:https://steelpipepro.com/robots.txt