Swelıty
Tools for everyone

Free Online Robots.txt Generator

Create a robots.txt file with templates, AI crawler blocking and a built-in tester to check any URL.

Start from a template

Let all crawlers visit the whole site.

Rule group 1

Use * for all crawlers.

Your robots.txt

Updates as you change the rules

User-agent: *
Disallow:

Where it goes

Save it as robots.txt in the root of your site, so it loads at https://yoursite.com/robots.txt.

It asks well-behaved crawlers to stay away. It does not hide pages from people, so never use it to protect private content.

How to use

  1. Pick a template, or edit the rule groups. Add the crawlers, the paths to block (Disallow) and any exceptions (Allow).

  2. Add your sitemap address so crawlers can find all your pages.

  3. In Test URLs, check several pages at once for a crawler of your choice, and open Checks to fix any warnings.

  4. Download robots.txt and upload it to the root of your website.

Why use this tool

  • Templates

    Allow everything, block everything, WordPress, online shop and block AI crawlers.

  • Built-in URL tester

    Check several URLs at once for Googlebot, Bingbot, GPTBot, ClaudeBot and more, see which rule matched, and compare crawlers side by side.

  • Block AI crawlers

    A switch for each AI crawler, grouped by training, AI search and visits a person asks for, with what blocking each group costs you.

  • Checks

    Catches missing slashes, accidental full-site blocks, blocked CSS or JavaScript and invalid or missing sitemaps, with a link to the field.

  • Test your own file

    Paste an existing robots.txt and test URLs against it.

About this tool

The Robots.txt Tester & Generator checks and builds the robots.txt file that tells search engines and other crawlers which parts of your site to visit. Paste an existing robots.txt, or start from a template such as WordPress, an online shop or blocking AI crawlers, then test URLs against it to see whether they are allowed or blocked.

The tester follows the matching rules of the robots.txt standard, including the * and $ symbols, and shows which rule decided each result. Check several URLs at once for crawlers such as Googlebot, Bingbot, GPTBot or ClaudeBot, and compare crawlers side by side. The Checks panel warns about common mistakes: a missing slash, an accidental block of the whole site, blocked CSS or JavaScript, and a missing or invalid sitemap.

You can also choose AI crawlers one by one, grouped by whether they collect training data, power AI search or visit because a person asked. When the file is ready, download it and upload it to the root of your site. Add your sitemap line, which you can create with the Sitemap Generator, and check your page titles and descriptions with the Meta Tag Generator.

Frequently asked questions

It is a plain text file at the root of your site that asks crawlers which pages they may visit. Well-behaved crawlers such as Google follow it. It is a request, not a lock, so it does not stop people or badly behaved bots.

Not reliably. A blocked page can still appear in results if other sites link to it. To keep a page out of search results, use a noindex meta tag and leave the page crawlable. Never rely on robots.txt to protect private information.

Open the AI crawlers tab and switch on the ones to block, or use the Block AI crawlers template to switch on all of them. Only crawlers that respect robots.txt will obey, and companies add and retire names, so review the list occasionally.

Often, yes. OpenAI and Anthropic use separate names for training (GPTBot, ClaudeBot) and for search (OAI-SearchBot, Claude-SearchBot). Block training only switches on the training group and leaves the search crawlers allowed. OpenAI and Perplexity say that visits a person asks for may not follow robots.txt.

An asterisk matches any sequence of characters, so /*.pdf blocks any URL containing .pdf. A dollar sign anchors the end of the URL, so /*.pdf$ blocks only URLs that end in .pdf. When several rules match, the longest one wins, and Allow wins a tie.

In the top-level folder of your site, so it loads at https://yoursite.com/robots.txt. Each subdomain needs its own file.

Paste your robots.txt into the tester, add the URLs you want to check and choose a crawler such as Googlebot. Each URL shows as allowed or blocked, with the rule that matched.

Yes. The Checks panel looks for common problems such as a missing slash, an accidental full-site block, blocked CSS or JavaScript, and an invalid sitemap line, and links you to the field to fix.

Choose Googlebot as the crawler and test the page address against your robots.txt. If the result is blocked, the matching Disallow rule is shown.