开发者可以使用
Robots.txt 生成器
创建包含 user-agent、allow、disallow、crawl-delay 和 sitemap 规则的 robots.txt 文件,然后在本地下载。
交互式工具区
无需注册账号robots.txt generator
Core processing uses browser APIs and locally loaded libraries, not an upload endpoint. Optional analytics and device or clipboard access are separate privacy considerations. Use synthetic data; browser processing is not a guarantee of confidentiality.
Per-crawler rules
Advanced: edit raw robots.txt
Live robots.txt preview
User-agent: * Allow: / Disallow: /private/
Directive guide and common mistakes
User-agent selects a crawler. Disallow blocks crawling a matching path; Allow permits a more specific path. Crawl-delay requests a wait between requests; Google does not support it. Sitemap lists an absolute sitemap URL.
- Check that you did not accidentally set
Disallow: /for every bot. - Do not block CSS or JavaScript needed to render pages.
- robots.txt controls crawling; it does not remove a URL from search results or replace noindex.
- Path matching is case-sensitive, and trailing slashes change the path scope.