Create a perfectly formatted robots.txt file in seconds with our visual builder — or validate your existing one for mistakes that could be silently blocking Google from your site.
Used to auto-fill the Sitemap URL.
# Loading preview…
测试特定URL是否会被这些规则允许或阻止。
一个 robots.txt文件 是放置在网站根目录的纯文本文件(例如 https://yoursite.com/robots.txt). It instructs search engine crawlers — like Googlebot — which pages or sections of your site they should or should not crawl and index.
虽然robots.txt不保证隐私(被阻止的页面如果从其他网站链接到,仍然可能出现在搜索结果中),但它是管理的主要工具 抓取预算 — how much of your site Google explores per day. Used correctly, it helps Google focus its crawling on the pages that actually matter for your rankings.
For WordPress sites specifically, a well-configured robots.txt prevents Googlebot from wasting time on admin pages, login screens, and internal search results — directing that crawl budget toward your content instead.
# Allow all crawlers, block admin User-agent: * Disallow: /wp-admin/ Allow: /wp-admin/admin-ajax.php # Block bad bots entirely User-agent: AhrefsBot Disallow: / # Sitemap location Sitemap: https://yoursite.com/sitemap.xml
WordPress默认不创建robots.txt。以下是针对最佳SEO需要添加的内容。
选择上面的“WordPress”模板,输入你的网站URL,你的robots.txt将立即生成,并预填所有正确的规则。
下载生成的robots.txt文件,并使用FTP、cPanel文件管理器或主机的文件管理器将其上传到网站的根目录。
SkySEOManager has a built-in robots.txt editor and validator under its Tools section. Paste your generated content there directly.
专业提示:每次更改后进行验证
After uploading or editing your robots.txt, always run it through our validator above to check for mistakes. A single typo — like Disallow: / — can block your entire site from Google overnight.
These are the most common errors our validator catches — and the ones most likely to quietly kill your Google rankings.
一个 Disallow: / 下 User-agent: * blocks Googlebot from your entire site. This is the single most catastrophic robots.txt mistake — and it happens more often than you'd think during site builds.
禁止 /wp-content/ prevents Google from loading your stylesheets and scripts. Google renders pages like a browser — if it can't load CSS/JS, it can't properly evaluate your content for rankings.
不包括 Sitemap: 指令意味着谷歌只能通过Search Console提交来发现你的站点地图。将其添加到robots.txt中是一个轻松的胜利,有助于Googlebot更快地找到你所有页面。
在Linux服务器上,robots.txt路径区分大小写。 Disallow: /Admin/ 不会阻止 /admin/始终使用实际URL路径的确切大小写。
修复你整个网站的SEO
Once your robots.txt allows Google to crawl your site, make sure every page is optimised. SkySEOManager Pro bulk-generates titles, meta descriptions, and image alt text across your entire WordPress site — powered by Gemini AI.
Disallow: /wp-admin/ 可以防止爬虫将抓取预算浪费在没有 SEO 价值的后台页面上。但是,请确保添加 Allow: /wp-admin/admin-ajax.php 在下一行加上,以保持依赖 AJAX 的功能(如 WooCommerce 购物车更新)正常工作。永久免费。无需账号。你的 robots.txt 在 30 秒内准备就绪。