Home › SEO & Website Tools › Robots.txt Generator

Robots.txt Generator

Build a correct robots.txt in a minute, block the bots you don't want, and test URLs against your rules.

Rules for specific bots

robots.txt


    

Test a URL

How to use Robots.txt Generator

  1. Choose whether search engines may crawl the whole site, and list folders to block.
  2. Pick rules for individual bots, e.g. block AI crawlers, and add your sitemap URL.
  3. Download robots.txt, upload it to your site's root, and test URLs here.

What robots.txt does

robots.txt is a small text file at the root of your site (https://example.com/robots.txt) that tells crawlers which pages they may visit. Search engines like Google and Bing follow it. It is a request, not a lock: badly behaved bots can ignore it, and it doesn't hide private data.

Blocking AI crawlers

Choose Block AI crawlers to add rules for GPTBot, ChatGPT-User, Google-Extended, ClaudeBot, CCBot, PerplexityBot and Bytespider. This asks AI companies not to use your pages for training or answers, while normal Google and Bing search keep working.

How rules are matched

Google uses the group for the most specific bot name. Inside it, the longest matching rule wins, and Allow wins a tie. * matches anything and $ marks the end of the URL, so /*.pdf$ blocks all PDF files. The tester on this page follows the same rules.

Frequently asked questions

Will blocking a page remove it from Google?

No. A blocked page can still appear in results if other sites link to it. To remove a page, let Google crawl it and add a noindex meta tag.

Where do I put the file?

In the top folder of your domain, so it opens at yoursite.com/robots.txt. Subdomains need their own file.

Does Google follow Crawl-delay?

No; Google ignores it. Bing and Yandex use it.

Should I block /wp-admin/?

Most WordPress sites block /wp-admin/ but allow /wp-admin/admin-ajax.php, which the preset does.

Related tools

More SEO & Website Tools