【发布时间】:2017-11-18 19:07:12
【问题描述】:
我的网站上有大约 100 个页面,我不想在 google 中被索引...有没有办法使用 robots.txt 阻止它..编辑每个页面会很烦人并添加 noindex 元标记....
我想阻止的所有网址都像...
www.example.com/index-01.html
www.example.com/index-02.html
www.example.com/index-03.html
www.example.com/index-04.html .
。 . .
www.example.com/index-100.html
不确定,但会添加类似以下的工作吗?
User-Agent: *
Disallow: /index-*.html
【问题讨论】:
-
通配符在
Disallow:行中不起作用,但您可以添加 100 个Disallow:行(每个 URL 一个)。这样做有什么问题? -
这个问题似乎离题了,因为它不在帮助中心所述的讨论范围内。
-
@smarx 您根据什么信息表明
Disallow不适用于通配符,您如何看待this article? -
@classstacker robotstxt.org/robotstxt.html:“还要注意,在 User-agent 或 Disallow 行中不支持通配符和正则表达式。”您链接到的页面仅讨论 Google 提供的非标准通配符支持。
标签: seo search-engine robots.txt googlebot