Skip to content
Prime SEO Tools

Crawling & indexing

Robots.txt Builder & Tester

Create a robots.txt file with per-crawler rules, then test whether a URL is allowed or blocked using Google's matching logic.

Runs locally. Nothing you enter is sent to a server.

Builder

Comma separate several crawlers. Use * for all.

One absolute URL per line

robots.txt
1User-agent: *
2Disallow: /wp-admin/
3Allow: /wp-admin/admin-ajax.php
4Disallow: /?s=
5Disallow: /search/
6
7Sitemap: https://example.com/wp-sitemap.xml
8
Tester
Blocked

The longest matching rule is "Disallow: /wp-admin/" (line 2).

Group used: User-agent: *

How this tester decides

The tester follows RFC 9309 and Google's documented behaviour:

  • The crawler uses the group with the most specific matching User-agent, falling back to *.
  • Within that group, the longest matching path wins. On a tie, Allow beats Disallow.
  • * matches any sequence of characters and $ anchors the end of the URL.
  • An empty Disallow: line allows everything.

Common patterns

  • Disallow: /*? blocks every URL with a query string.
  • Disallow: /*.pdf$ blocks URLs ending in .pdf.
  • Allow: /wp-admin/admin-ajax.php re-opens one file inside a blocked folder.

Frequently asked questions

Does Disallow remove a page from Google?

No. Disallow stops crawling, not indexing. A blocked URL can still appear in results if other pages link to it. To keep a page out of the index, allow crawling and use a noindex meta tag or header.

Which rule wins when Allow and Disallow both match?

Google uses the most specific rule, meaning the one with the longest matching path. If an Allow and a Disallow rule are the same length, Allow wins. This tester follows the same logic.

Does Google support Crawl-delay?

No. Googlebot ignores Crawl-delay. Bing, Yandex and some other crawlers respect it.

Where does robots.txt go?

At the root of each host, for example https://example.com/robots.txt. Subdomains and different protocols each need their own file.