Documentation Blog Free tools [email protected]Log in

robots.txt generator

Build a valid robots.txt without remembering the syntax. Pick what search engines may crawl, decide which AI crawlers may train on your content, add your sitemap, and copy the result. Every choice is explained, and the file is generated in your browser.

Free, no sign-up, nothing leaves this page.

Start from
Search crawlers
AI crawlers to block

Blocking these does not affect search ranking. Each one is a separate bot with a separate job.

Your robots.txt

        

Save it as robots.txt at the root of your domain, then test it with the robots.txt tester.

What each choice actually does

A robots.txt file is a set of groups. Each group names one or more crawlers and lists what they may and may not fetch. The generator writes valid groups for you, but the decisions are yours, and they are not interchangeable:

Allowing search crawlers

Almost every public site should let search engines crawl everything except pages that waste crawl budget: internal search results, cart and checkout, faceted filters that multiply URLs, admin paths. Blocking those is about efficiency, not secrecy — anything genuinely private needs authentication, because robots.txt is a public file that anyone can read.

Blocking AI training crawlers

This is a business decision, not a technical one. Blocking GPTBot, ClaudeBot, CCBot or Google-Extended keeps your content out of future training runs, and changes nothing about how you rank. The trade-off runs the other way too: assistants that cite sources send traffic, and a site blocked from the index behind an assistant cannot be cited by it. Blocking training while allowing search and live-fetch bots is the middle path the second preset writes for you.

Crawl-delay

Leave it empty unless a crawler is measurably loading your server. Google ignores it entirely; Bing and Yandex honour it. A crawl-delay on a large site can mean pages go months without being recrawled.

Mistakes this generator avoids

  • Blocking your CSS and JavaScript. Search engines render pages. A Disallow: /assets/ can make your site look broken to the crawler and cost you rankings.
  • Using robots.txt to hide a page. A disallowed page can still be indexed from external links, because the crawler never fetches it and never sees your noindex.
  • Forgetting the sitemap line. It is the cheapest discovery signal there is, and it belongs in robots.txt so any crawler finds it without being told.
  • One file for every subdomain. Each host needs its own robots.txt; the file at example.com says nothing about shop.example.com.

Questions about writing robots.txt

How do I block ChatGPT from using my website?

Add a group for GPTBot with Disallow: / — that is OpenAI’s training crawler. ChatGPT-User and OAI-SearchBot are separate: the first fetches a page when a user asks about it, the second indexes for search inside ChatGPT. Decide on each one; the generator writes all three.

Will blocking AI crawlers hurt my SEO?

No. Search crawlers and AI training crawlers are different user-agents. Blocking Google-Extended stops Gemini training and leaves Googlebot, and therefore your ranking, untouched.

Where do I put the robots.txt file?

At the root of each host: https://example.com/robots.txt. It must be served as plain text with a 200 status. Subdomains and other protocols need their own file.

Do I need a robots.txt at all?

Not strictly — a site with no robots.txt is fully crawlable, which is often what you want. It becomes useful when you have paths worth keeping out of the crawl, a sitemap to declare, or a position on AI training.

What is Crawl-delay and should I set it?

It asks a crawler to wait N seconds between requests. Google ignores it; Bing and Yandex honour it. Leave it empty unless crawling is measurably loading your server, because it slows down how fast new pages are discovered.

Can I block one folder but allow one file inside it?

Yes. Put both lines in the same group: the longer rule wins, so Allow: /private/report.pdf beats Disallow: /private/ for that file. You can verify it with the tester.

On the other side of robots.txt

We build the crawling infrastructure this file talks to. If you need to fetch the web rather than govern it, the APIs return any page as clean Markdown or JSON.

Get my free API key

Free key, $2 of usage credit every month, no credit card.

Get my free API key