大家做seo都是在千方百計(jì)的讓搜索引擎抓取和收錄,但是其實(shí)很多情況下我們還需要禁止搜索引擎抓取和收錄
比如,公司內(nèi)部測(cè)試的網(wǎng)站,或者內(nèi)部網(wǎng),或者后臺(tái)登錄的頁面,肯定不希望被外面的人搜索到,所以要禁止搜索引擎抓取。
禁止搜索引擎抓取方法:
創(chuàng)建robots.txt文件到WEB根目錄下,其內(nèi)容為:
User-agent: Baiduspider
Disallow: /
User-agent: Sosospider
Disallow: /
User-agent: sogou spider
Disallow:
User-agent: YodaoBot
Disallow:
User-agent: Googlebot
Disallow: /
User-agent: Bingbot
Disallow: /
User-agent: Slurp
Disallow: /
User-agent: Teoma
Disallow: /
User-agent: ia_archiver
Disallow: /
User-agent: twiceler
Disallow: /
User-agent: MSNBot
Disallow: /
User-agent: Scrubby
Disallow: /
User-agent: Robozilla
Disallow: /
User-agent: googlebot-image
Disallow: /
User-agent: googlebot-mobile
Disallow: /
User-agent: yahoo-mmcrawler
Disallow: /
User-agent: yahoo-blogs/v3.9
Disallow: /
User-agent: psbot
Disallow: /
|
給大家發(fā)一張禁止搜索引擎抓取網(wǎng)站的搜索結(jié)果截圖:
百度官方對(duì)robots.txt的解釋是這樣的:
Robots是站點(diǎn)與spider溝通的重要渠道,站點(diǎn)通過robots文件聲明本網(wǎng)站中不想被搜索引擎收錄的部分或者指定搜索引擎只收錄特定的部分。
9月11日,百度搜索robots全新升級(jí)。升級(jí)后robots將優(yōu)化對(duì)網(wǎng)站視頻URL收錄抓取情況。僅當(dāng)您的網(wǎng)站包含不希望被視頻搜索引擎收錄的內(nèi)容時(shí),才需要使用robots.txt文件。如果您希望搜索引擎收錄網(wǎng)站上所有內(nèi)容,請(qǐng)勿建立robots.txt文件。
如您的網(wǎng)站未設(shè)置robots協(xié)議,百度搜索對(duì)網(wǎng)站視頻URL的收錄將包含視頻播放頁URL,及頁面中的視頻文件、視頻周邊文本等信息,搜索對(duì)已收錄的短視頻資源將對(duì)用戶呈現(xiàn)為視頻極速體驗(yàn)頁。此外,綜藝影視類長(zhǎng)視頻,搜索引擎僅收錄頁面URL。