Robots.txt 生成器
可视化生成网站的 robots.txt 文件,支持多 User-agent 规则组、Allow/Disallow 规则编辑、Crawl-delay 设置,实时预览并一键复制或下载
选择预设模板...
1
User-agent 规则组
* (所有爬虫)
Disallow
Disallow
Sitemap
可选填写 sitemap.xml 的完整 URL,帮助搜索引擎更快发现网站页面
robots.txt 预览5 行
1User-agent:*2Disallow:/admin/3Disallow:/api/45Sitemap:https://example.com/sitemap.xml
使用说明
- •User-agent:指定规则适用的搜索引擎爬虫,
*代表所有爬虫 - •Disallow:禁止爬虫抓取的路径,留空表示不禁止任何页面
- •Allow:明确允许爬虫抓取的路径,优先级高于 Disallow
- •Crawl-delay:爬虫连续请求之间的等待秒数,仅 Bing、Yandex 等部分搜索引擎支持
- •Sitemap:站点地图 URL,帮助搜索引擎发现和索引网站所有页面
- •使用预设模板可快速生成常见场景的 robots.txt,然后根据需要微调
- •生成后将 robots.txt 文件放置在网站根目录(如
https://example.com/robots.txt)