网站优化中robots实际上是一个引导蜘蛛的东西,写法也是很重要的,北京网站优化网解释哦按一下seo中正确的Robots.txt文件如何写:
特别是对于google来讲,如果确实robots文件很可能会引起黑客检索到网站后台从而用不断尝试的方法来破解掉网站后台密码。
所以这就显得robots文件的正确书写方法很重要。
下面是我一个网站的robots.txt文件源码:
# Robots.txt file from http://www.seo-king.com.cn
# All robots will spider the domain
User-agent: *
Disallow:admin
其中“# Robots.txt file from http://www.seo-king.com.cn”是说该robots.txt文件隶书于网站“www.seo-king.com.cn”“# All robots will spider the domain”是说,允许所有搜索引擎的搜索引擎蜘蛛访问该域名“User-agent: *”表示,允许搜索引擎蜘蛛访问所有页面“Disallow:admin
Disallow:login.asp”表示,禁止访问“admin”“login.asp”文件夹下的文件。“admin”和“login”是两个文件夹,可以根据自己的网站程序来设定你要禁止的内容这就是简单的robots.txt文件书写方法了除特殊的网站外都可以用上边的代码替换用