【发布时间】:2015-05-18 10:44:24
【问题描述】:
我有几个页面和网址不想被 Google 抓取工具抓取。
我知道这可以通过 robots.txt 完成。我在 Google 上搜索,发现这种方式需要将 robots.txt 中的所有内容安排为禁止爬虫,但我不确定这样做是否正确。
User-Agent: *
Disallow: /music?
Disallow: /widgets/radio?
Disallow: /affiliate/
Disallow: /affiliate_redirect.php
Disallow: /affiliate_sendto.php
Disallow: /affiliatelink.php
Disallow: /campaignlink.php
Disallow: /delivery.php
Disallow: /music/+noredirect/
Disallow: /user/*/library/music/
Disallow: /*/+news/*/visit
Disallow: /*/+wiki/diff
# AJAX content
Disallow: /search/autocomplete
Disallow: /template
Disallow: /ajax
Disallow: /user/*/tasteomatic
我可以这样提供网址吗?我的意思是,我可以将完整的 URL 指定为不允许吗?
Disallow: http://www.bba-reman.com/admin/feedback.htm
编辑
我当前的 robots.txt 条目如下所示
User-Agent: *
Disallow: /CheckLogin
Disallow: /DTC.pdf
Disallow: /catalogue/bmw.htm
Disallow: /auto-mine/bmw/index.htm
Disallow: /forums/parent.Jmp('i100')
Disallow: /forums/parent.Jmp('i040')
Disallow: /forums/CodeDescriptions.html
Disallow: /forums/parent.Jmp('i050')
Disallow: /forums/parent.Scl('000','24601')
Disallow: /forums/parent.Jmp('i030')
Disallow: /catalogue/peugeot.htm
可以吗.....告诉我。谢谢
【问题讨论】:
-
你可以在google web master tools试试你的robots.txt,也许这也能帮到你,support.google.com/webmasters/answer/6062608?hl=en
-
请注意empty lines are not allowed inside a record(并且在记录之间是必需的)。记录总是以
User-agent开头,因此您应该删除记录中的空行(或使用#对其进行注释)。
标签: url robots.txt googlebot