robots.txt文件的格式
robots.txt文件的格式為: User-agent: [user-agent-name] Disallow: [URL path] 其中,[user-agent-name]指代搜索引擎爬蟲的名稱,[URL path]指代禁止訪問的URL路徑。在文件中可以定義多條User-agent和Disallow規(guī)則,每一條規(guī)則占一行,每一對規(guī)則之間要有一個空行。示例: User-agent: * Disallow: /private/ Disallow: /secret/ User-agent: Baiduspider Disallow: /admin/ User-agent: Googlebot Disallow: /tmp/