2017-06-16 46 views
-1

我在我的网站上有大约100页的内容,我不想在google中被索引...有什么方法可以用robots.txt来阻止它。 .It'd很烦人编辑每个页面,添加noindex元标记....使用robots.txt阻止搜索引擎的url 100s

所有这一切我想阻止是这样的URL ...

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 
+0

通配符不会在'不允许工作:'行,但您可以添加100'禁止:'线(每个URL)。这样做有什么问题? – smarx

+4

此问题似乎无关紧要,因为它不在讨论范围内,如帮助中心所述。 – Will

+0

@smarx您在哪些信息基础上声明“Disallow”不适用于通配符,以及您如何看待[本文](https://geoffkenyon.com/how-to-use-wildcards-robots-文本/)? –

回答

0
Yes it will work using wildcard 

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

根据我的发现,Google支持这些内容,但它们不是标准的,不一定受其他抓取工具的支持。 – smarx

+0

使用一些在线工具,您可以验证您的robots.txt规则是否受Googlebot支持,请尝试一下https://technicalseo.com/seo-tools/robots-txt/ – Mamallan

+0

我只想阻止Google建立索引,非常感谢您的帮助。 –