Robots.txt Generator and Tester

Build a robots.txt in a few clicks, then test any URL against it, or load your live robots.txt and test that.

1. Build a robots.txt

All crawlers
AI crawlers
Paths start with /. Use * for "anything" and $ for "ends here".
Full addresses starting with https://.
Your robots.txt

2. Test a URL

This tool runs in your browser. Only if you use "Load from my site" does our server fetch that public page for you. Privacy

What robots.txt does

robots.txt is a small text file at the root of your site (https://example.com/robots.txt). It tells crawlers which parts of the site they may visit. It is a request, not a lock: well-behaved crawlers follow it, others may not. It also does not remove pages from Google; for that, use noindex.

How the rules work

  • Groups start with one or more User-agent: lines, followed by Allow: and Disallow: rules.
  • A crawler follows only the group that names it. If none does, it follows User-agent: *. So rules under * do not apply to Googlebot if there is a User-agent: Googlebot group.
  • Inside the group, the longest matching rule wins. If an Allow and a Disallow are equally long, Allow wins.
  • * matches anything and $ means "ends here": Disallow: /*.pdf$ blocks all PDF files.
  • Disallow: with nothing after it means "nothing is blocked".

This tester follows the official rules (RFC 9309), the same way Google does.

A good default for WordPress

User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php

Sitemap: https://example.com/wp-sitemap.xml

Do not block /wp-content/ or /wp-includes/. Google needs the CSS and JavaScript files there to see your pages properly.

WordPress makes a virtual robots.txt when there is no real file. To use your own, upload a file called robots.txt to the folder that contains wp-config.php, or edit it in your SEO plugin.

FAQ

Does Disallow remove a page from Google?

No. It only stops crawling. A blocked page can still appear in results if other sites link to it. To keep a page out of Google, allow crawling and add a noindex tag.

Why did Google retire its own robots.txt tester?

Google replaced it with the robots.txt report in Search Console, which shows the file Google fetched but does not let you test any URL against your own draft. This tool does that.

Is my robots.txt sent anywhere?

Building and testing happen in your browser. Only "Load from my site" asks our server to fetch your public robots.txt.

Does Crawl-delay work?

Google ignores Crawl-delay. Bing and some other crawlers respect it.

More free tools

Need a Tool We Don’t Have?

Tell us what you check on your sites every week. The most-requested tools get built first.