全部放行:
User-agent: *
Allow: /
Sitemap: https://你的域名/sitemap.xml
只屏蔽训练类、保留搜索类(例子):
User-agent: GPTBot
Disallow: /
User-agent: CCBot
Disallow: /
User-agent: *
Allow: /
写完用浏览器打开 你的域名/robots.txt 确认能访问。另外检查 CDN 和防火墙有没有按 User-Agent 拦截,robots.txt 放行了、防火墙拦了,爬虫一样进不来。