Robots.txt generator

Build a correct robots.txt file in seconds. Add your sitemap, block private folders, use ready-made WordPress and WooCommerce rules, and choose whether AI crawlers can use your content.

Quick presets

Your robots.txt

Upload it to the root of your site so it opens at yourdomain.com/robots.txt.

How to use it

  1. Choose whether search engines may crawl the whole site. Almost every site should allow it.
  2. Add your sitemap URL, usually https://yourdomain.com/sitemap.xml or sitemap_index.xml.
  3. Tick any presets that apply.
  4. Add other folders to block, one per line.
  5. Copy or download the file and upload it to your site’s root folder.

The presets

  • WordPress blocks /wp-admin/ but keeps admin-ajax.php open, because some themes and plugins need it to work for visitors.
  • WooCommerce blocks cart, checkout and account pages, plus “add to cart” links. These pages are personal and have no value in search results.
  • Internal search blocks your site’s own search result pages, which can create thousands of thin, duplicate pages.
  • AI training crawlers blocks bots that collect content to train AI models, including GPTBot (OpenAI), ClaudeBot (Anthropic), Google-Extended, CCBot (Common Crawl) and others.

Robots.txt basics

Line Meaning
User-agent: * The rules below apply to all crawlers
Disallow: /private/ Don’t crawl anything in /private/
Disallow: (empty) Nothing is blocked
Allow: /wp-admin/admin-ajax.php Exception to a blocked folder
Sitemap: https://… Where your sitemap is

Tips

  • Never block CSS and JavaScript files. Google needs them to see your pages properly.
  • Keep it simple. Most small sites need only a few lines.
  • Test it. After uploading, check the robots.txt report in Google Search Console.

Last updated 4 December 2026

Frequently asked questions

Where do I put robots.txt?

In the root folder of your website, so it opens at yourdomain.com/robots.txt. It doesn't work inside a subfolder.

Does robots.txt hide pages from Google?

Not reliably. It asks crawlers not to visit a page, but a blocked page can still appear in search results if other sites link to it. To keep a page out of Google, use a noindex tag and don't block it in robots.txt, so Google can see the tag.

Should I block AI crawlers?

It's your choice. Blocking them asks AI companies not to use your content for training. It doesn't affect your normal Google search rankings; Google-Extended only controls use in Google's AI models, not Search.

Will a mistake in robots.txt hurt my site?

It can. “Disallow: /” under “User-agent: *” blocks your whole site from search engines. Double-check before uploading, and test the live file in Google Search Console.