在做网站SEO优化中robots的编写方法

robots.txt是搜索引擎中的一个协议,当你的网站有一些内容不想给蜘蛛爬取,那可以利用robots.txt来告诉蜘蛛不要去爬取这些页面,不爬取这些页面当然就不收录了。robots.txt是搜索引擎中访问网站的时候要查看的第一个文件。当一


Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 263

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 264

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 290

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 291

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 263

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 264

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 290

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 291

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 263

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 264

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 290

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 291

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 263

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 264

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 290

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 291

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 263

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 264

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 290

Warning: Illegal offset type in isset or empty in /www/wwwroot/www.moyuseo.com/wp-content/themes/justnews/themer/core/wpcom.php on line 291

robots.txt这是搜索引擎中的协议。当你的网站有一些内容不想爬蜘蛛时,你可以使用它robots.txt告诉蜘蛛不要爬这些页面,当然不要爬这些页面。

robots.txt这是搜索引擎访问网站时需要查看的第一个文件。当搜索蜘蛛访问一个网站时,它会首先检查网站的根目录是否存在robots.txt,如果存在,搜索机器人将根据文件中的内容确定访问范围;如果文件不存在,所有搜索蜘蛛都可以访问网站上所有没有密码保护的页面。

robots.txt规则怎么写

新建一个txt文本,命名为robots.txt,比如你不想给蜘蛛爬你网站后台的文件夹,那就这样写吧。文件放在网站根目录中

User-agent: *

Disallow: /admin/

解释:

User-agent: * 这意味着所有的搜索引擎

Disallow: /admin禁止爬行admin这个文件夹

Disallow: 代表根目录

Allow: / 代表允许 的例子webdesgn文件夹 ,但你想让他收录webdesign下的wangzhanjianshe 写法Allow: /webdesign/wangzhanjianshe/*.html 收录webdesign下的wangzhanjianshe下的所有html

假如你只想对百度有效,那就这样写吧。User-agent: Baiduspider 只对百度有效,其他搜索引擎不受限制。

搜索引擎蜘蛛的名字:Baiduspider 百度蜘蛛,Googlebot 谷歌蜘蛛,Bingbot 必须是蜘蛛,360Spider 360蜘蛛、Sogouspider 搜狗蜘蛛

原创文章,作者:墨羽SEO,如若转载,请注明出处:https://www.moyuseo.com/tutorials/wzyh/16948.html

(0)
墨羽SEO的头像墨羽SEO
上一篇 2022年3月25日
下一篇 2022年3月25日

相关推荐

分享本页
返回顶部
欢迎来到互联网运营人学习交流技术网站!