Skip to main content
DevTools24

robots.txt 生成器

为您的网站创建 robots.txt 文件,以控制搜索引擎如何爬取您的页面。

Presets:

Rules

User-agent: *
Disallow: /admin/
Disallow: /private/

robots.txt - 技术详情

The robots.txt file tells web crawlers which URLs they can access on your site. It's placed at the root of your domain (e.g., example.com/robots.txt). While crawlers should respect these rules, they are not enforceable—use authentication for truly private content.

命令行替代方案

# Test your robots.txt\ncurl https://example.com/robots.txt\n\n# Check if a URL is blocked\n# Use Google Search Console's robots.txt Tester

参考

查看官方规范