【问题标题】:Block 100s of url from search engine using robots.txt [closed]使用 robots.txt 阻止来自搜索引擎的 100 个网址 [关闭]
【发布时间】: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


【解决方案1】:
Yes it will work using wildcard

Ref : "https://geoffkenyon.com/how-to-use-wildcards-robots-txt"  

【讨论】:

  • 据我所知,谷歌支持这些,但它们是非标准的,其他爬虫不一定支持。
  • 使用一些在线工具,您可以验证您的 robots.txt 规则是否被 Googlebot 支持,试一试technicalseo.com/seo-tools/robots-txt
  • 我只是想阻止 google 索引,非常感谢您的帮助。
  • robots.txt 不会阻止索引,因此无法实现您想要的。 Robots.txt 阻止爬行。阅读此>developers.google.com/webmasters/control-crawl-index
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-02-24
  • 2018-02-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多