2009-10-04 64 views

回答

8

像這樣的作品,通過谷歌網站管理員工具 「測試robots.txt」 功能確認:

User-Agent: * 
Disallow: /startup?page= 

禁止的價值此字段 指定不訪問 的部分網址。這可以是完整路徑, 或部分路徑;任何使用此值開始 的URL都不會被檢索到。

然而,如果URL的第一部分將改變,你必須使用通配符:

User-Agent: * 
Disallow: /startup?page= 
Disallow: *page= 
Disallow: *?page= 
3

你可以把這個你不希望索引的網頁:

<META NAME="ROBOTS" CONTENT="NONE"> 

這告訴機器人不要索引頁面。

在搜索頁面,也可能是更有趣的使用方法:

<META NAME="ROBOTS" CONTENT="NOINDEX,FOLLOW"> 

這指示機器人不索引當前頁面,但還是按照此頁面上的鏈接,使他們能夠獲取到頁面在搜索中找到。

2
  1. 創建一個文本文件,並將其命名爲:的robots.txt
  2. 添加用戶代理,並禁止部分(見下面的示例)
  3. ,將文件放在您的網站的根

樣品:

############################### 
#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 
# 
############################### 

下面是谷歌的實際鏈接

你可以在blocking or removing pages using a robots.txt file

+0

感謝您的回答對谷歌網站管理員的幫助主題一些有用的信息,我忘了這裏增加其他詳情啓動可隨機/ XXXXX? – pmarreddy 2009-10-04 22:48:39

+0

頁面使用這種方法你必須要手動添加所有?page =(number),您可以根據規範保留該部分。 – 2009-10-04 22:53:57