2017-06-16 42 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建立索引,非常感謝您的幫助。 –