行業(yè)動態(tài)
禁止收錄指定網(wǎng)頁,指定網(wǎng)頁不被收錄
發(fā)布日期:2010-03-23 閱讀次數(shù):3197 字體大小:
Disallow:該項的值用于描述不希望被訪問的一組URL。

這個值可以是一條完整的路徑,也可以是路徑的非空前綴,以Disallow項的值開頭的URL不會被robot訪問。例如"Disallow:/help"禁止robot訪問/help.html、/helpabc.html、/help/index.html,而"Disallow:/help/"則允許robot訪問/help.html、/helpabc.html,不能訪問/help/index.html。

"Disallow:"說明允許robot訪問該網(wǎng)站的所有url,在"/robots.txt"文件中,至少要有一條Disallow記錄。如果"/robots.txt"不存在或者為空文件,則對于所有的搜索引擎robot,該網(wǎng)站都是開放的。

• 要攔截整個網(wǎng)站,請使用正斜扛。
Disallow:/

• 要攔截目錄及其中的所有內(nèi)容,請在目錄名后添加正斜扛。
Disallow:/private_directory/

• 要攔截網(wǎng)頁,請列出該網(wǎng)頁。
Disallow:/private_file.html

網(wǎng)址區(qū)分大小寫。例如:Disallow:/private_file.html
會攔截 private_file.html,
但不會攔截 Private_File.html。