WordPress Robots.txt Generator & Tester

A misconfigured robots.txt file is one of the most damaging technical SEO mistakes a website can make, and one of the easiest to introduce accidentally. When we audit WordPress sites for clients, we see two recurring errors: sites blocking their own CSS and JavaScript (which prevents Google from rendering pages), and staging configurations that accidentally carry over to live sites. This tool generates safe WordPress-specific defaults and lets you test any path before going live.

Includes safe defaults for :contentReference[oaicite:1]{index=1}.

How to Use

Generator

WordPress-specific options

Extra rules (one per line)

Sitemap URL(s) (one per line)

robots.txt output

WordPress users: place this file at the root of your domain (https://example.com/robots.txt). Most hosting panels have a File Manager or you can use an SEO plugin such as Yoast SEO or RankMath, which each have a built-in robots.txt editor under Tools → File Editor.

Rules Tester (Google-like: longest match wins)

User-agent

URL path to test

Result

What does robots.txt actually do?

The robots.txt file sits at the root of your domain (yourdomain.com/robots.txt) and instructs web crawlers which paths they’re allowed to request. It’s the first thing Googlebot checks when it visits a site for the first time.

Critical distinction: robots.txt controls crawling, not indexing. A page that’s blocked in robots.txt can still appear in Google search results — Google may have seen it referenced in a link from another site, and it will index the URL even without reading the content. To prevent indexing, you need a noindex meta tag on the page itself. These two tools serve different purposes.

What should a WordPress robots.txt block by default?

Block these:

What should you never block in robots.txt?

When is it safe to block all crawlers?

Use Disallow: / only on staging or development environments that should not appear in search results at all. Never deploy this rule to a live production site. A safer approach for staging is to use password protection (Basic Auth) combined with a noindex header rather than relying on robots.txt alone, password protection is absolute, robots.txt is advisory.

Note for Yoast Plugin

If you’re using :contentReference[oaicite:2]{index=2}, your sitemap is typically available at /sitemap_index.xml.

Confirm it on your site before adding it to robots.txt.

FAQs

Technical SEO issues, like misconfigured crawl rules, indexation problems, Core Web Vitals failures, are included in every SEO audit we run for clients. We fix them, not just report them.