How to use it
- Choose whether search engines may crawl the whole site. Almost every site should allow it.
- Add your sitemap URL, usually
https://yourdomain.com/sitemap.xmlorsitemap_index.xml. - Tick any presets that apply.
- Add other folders to block, one per line.
- Copy or download the file and upload it to your site’s root folder.
The presets
- WordPress blocks
/wp-admin/but keepsadmin-ajax.phpopen, 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