我需要禁止http://example.com/startup?page=2搜索頁面被索引。如何禁止從robots.txt搜索頁面
我想要http://example.com/startup被索引但不是http://example.com/startup?page=2和page3等等。
另外,啓動可以是隨機的,例如,http://example.com/XXXXX?page
我需要禁止http://example.com/startup?page=2搜索頁面被索引。如何禁止從robots.txt搜索頁面
我想要http://example.com/startup被索引但不是http://example.com/startup?page=2和page3等等。
另外,啓動可以是隨機的,例如,http://example.com/XXXXX?page
像這樣的作品,通過谷歌網站管理員工具 「測試robots.txt」 功能確認:
User-Agent: *
Disallow: /startup?page=
禁止的價值此字段 指定不訪問 的部分網址。這可以是完整路徑, 或部分路徑;任何使用此值開始 的URL都不會被檢索到。
然而,如果URL的第一部分將改變,你必須使用通配符:
User-Agent: *
Disallow: /startup?page=
Disallow: *page=
Disallow: *?page=
你可以把這個你不希望索引的網頁:
<META NAME="ROBOTS" CONTENT="NONE">
這告訴機器人不要索引頁面。
在搜索頁面,也可能是更有趣的使用方法:
<META NAME="ROBOTS" CONTENT="NOINDEX,FOLLOW">
這指示機器人不索引當前頁面,但還是按照此頁面上的鏈接,使他們能夠獲取到頁面在搜索中找到。
樣品:
###############################
#My robots.txt file
#
User-agent: *
#
#list directories robots are not allowed to index
#
Disallow: /testing/
Disallow: /staging/
Disallow: /admin/
Disallow: /assets/
Disallow: /images/
#
#
#list specific files robots are not allowed to index
#
Disallow: /startup?page=2
Disallow: /startup?page=3
Disallow: /startup?page=3
#
#
#End of robots.txt file
#
###############################
下面是谷歌的實際鏈接
感謝您的回答對谷歌網站管理員的幫助主題一些有用的信息,我忘了這裏增加其他詳情啓動可隨機/ XXXXX? – pmarreddy 2009-10-04 22:48:39
頁面使用這種方法你必須要手動添加所有?page =(number),您可以根據規範保留該部分。 – 2009-10-04 22:53:57