谁能指导我如何为以下URL或目录创建robots.TXT文件:
我想在搜索引擎中索引的原始URL:
book2park.com/
book2park.com/locations.php但我在Google数据库中找到的以下URL(几乎所有页面),我想从所有搜索引擎中永久禁止使用:
lawnchair.book2park.com/
lawnchair.book2park.com/locations.php基本上,在每个URL的开头都会出现“Lawn椅子”。
发布于 2014-09-20 05:51:01
给定的robots.txt文件仅适用于从中加载该文件的确切子域。也就是说,下面的robots.txt文件:
http://sub1.example.com/robots.txt只能控制以下内容的爬网:
http://sub1.example.com/...它不能控制以下内容的爬行:
http://example.com/...
http://sub2.example.com/...
http://sub.sub1.example.com/...解决方案是为每个子域添加一个单独的robots.txt文件。所以,在http://lawnchair.book2park.com/robots.txt上,你可以屏蔽所有东西:
User-agent: *
Disallow: /在http://book2park.com/robots.txt上,你可以允许任何东西:
User-agent: *
Disallow:(或者你可以在主域上没有robots.txt文件)
https://stackoverflow.com/questions/25911505
复制相似问题