【发布时间】:2016-08-18 19:01:08
【问题描述】:
我正试图阻止我的网站被编入索引/列出:
我已经在 .htaccess 中设置了:
Header set X-Robots-Tag "noindex, nofollow"
还需要设置robots.txt吗?
User-agent: *
Disallow: /
添加robots.txt有什么坏处吗?
【问题讨论】:
标签: apache .htaccess nofollow noindex
我正试图阻止我的网站被编入索引/列出:
我已经在 .htaccess 中设置了:
Header set X-Robots-Tag "noindex, nofollow"
还需要设置robots.txt吗?
User-agent: *
Disallow: /
添加robots.txt有什么坏处吗?
【问题讨论】:
标签: apache .htaccess nofollow noindex
找到答案,如果设置了 X-Robots-Tag,我必须删除 robots.txt 中的所有禁止抓取:
Robots 元标记和 X-Robots-Tag HTTP 标头在以下情况下被发现 抓取网址。如果一个页面被禁止通过 robots.txt 文件,然后是有关索引或服务的任何信息 将找不到指令,因此将被忽略。如果 必须遵循索引或服务指令,网址包含 这些指令不能被禁止抓取。
【讨论】: