Robots.txt Generator

A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call

Free robots.txt generator. Block private folders, allow the rest, add your sitemap and optionally block AI training crawlers, with mistakes flagged.

robots.txt

Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.

How to use the robots.txt generator

List the folders or pages you don't want search engines to crawl, one per line, in the first box: for example /admin/, /cart or /checkout. If something inside a blocked folder should still be crawled, list it in the second box. Add the address of your XML sitemap. The robots.txt generator writes the file as you type, ready to copy.

Two options cover common needs:

  • Block AI training crawlers. Adds rules that ask the crawlers used to collect AI training data (GPTBot, Google-Extended, ClaudeBot, CCBot, PerplexityBot, Applebot-Extended and Bytespider) to stay off the whole site.
  • Block the whole site. For staging and test sites only: it asks every crawler to stay away.

The tool also checks your input and warns you about the usual mistakes, such as paths without a leading slash or a sitemap line without the full address. It runs entirely in your browser.

When the file looks right, save it as robots.txt and upload it to the root of your site, so it's available at https://yourdomain.com/robots.txt.

What robots.txt does, and what it doesn't

A robots.txt file is a plain text file that tells crawlers, the automated programs search engines use to discover pages, which parts of a site they may request. It's part of the Robots Exclusion Protocol, which became an official internet standard in 2022 (RFC 9309).

It's important to understand its limits, because most robots.txt mistakes come from expecting it to do more than it does.

It controls crawling, not indexing

Robots.txt stops well-behaved crawlers from fetching a page. It doesn't stop a page from appearing in search results. If other sites link to a blocked page, Google can still list the address, usually without a description, because it knows the page exists but can't read it.

To keep a page out of search results, let crawlers fetch it and add a noindex robots meta tag instead (our meta tag generator can write one). Don't block that page in robots.txt at the same time, or Google will never see the noindex instruction.

It's a request, not a lock

Reputable crawlers such as Googlebot and Bingbot follow robots.txt. Others may ignore it. Never rely on robots.txt to protect private information: anyone can read your robots.txt file, and listing a secret folder in it actually advertises where it is. Protect private areas with a login.

It's public

Your robots.txt is visible to anyone at /robots.txt. Keep it to paths you're comfortable showing.

The rules the robots.txt generator uses

A robots.txt file is made of groups. Each group starts with one or more User-agent lines naming the crawler, followed by rules for that crawler:

User-agent: *
Allow: /admin/help
Disallow: /admin/
Disallow: /cart

Sitemap: https://example.com/sitemap.xml
  • User-agent: which crawler the group applies to. * means every crawler that doesn't have its own group.
  • Disallow: a path the crawler shouldn't request. Disallow: /admin/ blocks everything inside /admin/. An empty Disallow: blocks nothing.
  • Allow: an exception inside a blocked area. Google and Bing use the most specific matching rule, so Allow: /admin/help wins over Disallow: /admin/ for that page.
  • Sitemap: the full address of your XML sitemap. It applies to the whole file, not to one group, and can appear more than once.

Paths are case-sensitive and match from the start: Disallow: /cart also blocks /cart/ and /cartoon, because they start with /cart. To block only the folder, use /cart/. Google and Bing also support two wildcards: * matches any characters, and $ marks the end of an address, so Disallow: /*.pdf$ blocks all PDF files.

What to block, and what not to

Usually worth blocking

  • Admin and login areas: /admin/, /wp-admin/ (WordPress also allows /wp-admin/admin-ajax.php, which some themes need).
  • Basket, checkout and account pages: /cart, /checkout, /my-account. They have no value in search.
  • Internal search results: /search or /?s=. These can create endless low-value pages.
  • Filtered and sorted duplicates on large shops, such as ?sort= or ?color= parameters, if they create thousands of near-identical pages.

Don't block

  • CSS and JavaScript files. Google renders pages like a browser. If it can't load your styles and scripts, it may misjudge your pages.
  • Images you want in image search.
  • Pages you want removed from Google. Use noindex instead, as explained above.
  • Your whole site by accident. Disallow: / under User-agent: * blocks everything. It's the single most damaging robots.txt mistake, often left over from a staging site. The generator warns you whenever it's on.

Blocking AI training crawlers

Many site owners now choose whether their content can be used to train AI models. Several companies publish crawler names you can block in robots.txt:

User-agent Run by Used for
GPTBot OpenAI Collecting data to train its models
Google-Extended Google A control token for using your content to train Google's AI models (including Vertex AI); it doesn't affect Google Search
ClaudeBot Anthropic Collecting training data
CCBot Common Crawl A public web archive widely used for AI training
PerplexityBot Perplexity Indexing for its answer engine
Applebot-Extended Apple A control for using content in Apple's AI training; it doesn't affect Applebot for Siri and Spotlight
Bytespider ByteDance Crawling, including for AI

Blocking these doesn't affect your Google or Bing search rankings, because Googlebot and Bingbot are separate. Keep in mind that it only works for crawlers that respect robots.txt, that new crawler names appear over time, and that blocking a crawler doesn't remove content already collected. Check each company's documentation for its latest crawler names.

Ready-made setups

These are good starting points. Type the paths into the robots.txt generator and adjust them to your site:

  • A simple business website: block nothing, just add your sitemap. Most small sites don't need to block anything at all.
  • WordPress: block /wp-admin/ and allow /wp-admin/admin-ajax.php, then add your sitemap (often /wp-sitemap.xml or the one your SEO plugin creates).
  • An online shop: block /cart, /checkout, /account and internal search such as /search, and add the shop's sitemap.
  • A staging copy of your site: tick "Block the whole site", and also protect it with a password, since robots.txt alone doesn't keep it private.

Whichever you choose, the robots.txt generator keeps the syntax correct, so the only decisions left are about which areas of your site should be crawled.

Testing your robots.txt

After uploading the file:

  1. Open https://yourdomain.com/robots.txt in a browser and check it shows exactly what you wrote.
  2. In Google Search Console, open Settings, then the robots.txt report, to see the version Google last fetched and any errors.
  3. Use the URL Inspection tool on an important page to confirm it isn't blocked.
  4. After big changes, check the Pages report over the following weeks for "Blocked by robots.txt" on pages you didn't mean to block.

Google caches robots.txt for up to about a day, so changes aren't instant.

Common mistakes the generator helps you avoid

  • Paths without a leading slash. Disallow: admin isn't valid; it must be /admin. The tool flags these.
  • Full addresses in Disallow lines. Use paths (/private/), not https://example.com/private/.
  • A relative sitemap address. The Sitemap line needs the full address, starting with https://.
  • Blocking resources pages need, such as /wp-content/ or /assets/.
  • Using robots.txt for noindex. Google stopped supporting noindex inside robots.txt in 2019.
  • Crawl-delay for Google. Google ignores Crawl-delay. Bing respects it, but for most small sites it isn't needed.

Robots.txt and the rest of technical SEO

Robots.txt is one small part of helping search engines understand your site:

Search ads for the searches that matter now

Good markup helps your pages rank over time. Google Ads puts the same pages in front of buyers today. That is the whole job of DeepRit: a PPC-only agency that sets up and runs Google Ads accounts so every click is accounted for. You keep full ownership of your account, get a written report every week, and can stop at any time. See our pricing or ask for a free audit.

Frequently asked questions

Where do I put my robots.txt file?

In the root of your domain, so it loads at https://yourdomain.com/robots.txt. A robots.txt in a subfolder is ignored. Each subdomain (such as shop.yourdomain.com) needs its own.

Does robots.txt stop a page appearing in Google?

Not reliably. It stops crawling, but a blocked page can still be listed if other pages link to it. Use a noindex meta tag, and don't block that page in robots.txt, to keep it out of search results.

Do I need a robots.txt file?

It isn't required. Without one, crawlers may crawl everything. A simple file with your sitemap address and a few blocked areas is still good practice for most sites.

Will blocking AI crawlers hurt my SEO?

No. GPTBot, ClaudeBot, CCBot and the others aren't the crawlers Google and Bing use for search. Google-Extended is only a control for AI training and doesn't affect Google Search.

What does Disallow: / mean?

It asks the named crawler not to crawl anything on the site. Under User-agent: * it blocks every crawler from everything, which is only right for staging or test sites.

Is the robots.txt generator free?

Yes. It's free, needs no sign-up and runs in your browser, so nothing you enter is uploaded.

Free PPC audit

See where your ad budget leaks.

We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.

Book a free audit call 30-minute call · Free · The audit is yours to keep