Free tool / Indexing, robots.txt and sitemaps
Robots.txt Generator: Create a Robots.txt File Free
Build a correct robots.txt file in seconds. Block admin and cart pages, keep AI crawlers out, add your sitemap, then copy or download the file.
Upload the file to the root of your site, so it opens at yourdomain.com/robots.txt. Robots.txt controls crawling, not indexing: to keep a page out of Google, use a noindex tag instead.
How to use the robots.txt generator
Build the file, check the warnings, then upload it to your site.
Pick a starting point
Start blank, or load the usual rules for WordPress or WooCommerce and change what you need.
Choose what to block
Add private paths, tick any AI crawlers you want to keep out and add your sitemap URL.
Download and upload
Download robots.txt and upload it to the root folder of your site, next to your homepage.
Robots.txt rules explained
The file is plain text with a few simple rules. These are the ones this generator writes.
| Rule | What it does | Example |
|---|---|---|
| User-agent | Names the bot the rules below it apply to. An asterisk means every bot. | User-agent: * |
| Disallow | Asks bots not to crawl a path. An empty Disallow allows everything. | Disallow: /cart/ |
| Allow | Lets bots crawl one path inside a blocked folder. | Allow: /wp-admin/admin-ajax.php |
| Sitemap | Tells bots where your XML sitemap is. Must be a full URL. | Sitemap: https://www.example.com/sitemap.xml |
| Crawl-delay | Asks a bot to wait between requests. Bing and Yandex use it, Google ignores it. | Crawl-delay: 5 |
| * and $ | Wildcards: * matches any characters, $ marks the end of a URL. | Disallow: /*.pdf$ |
What is a robots.txt file?
Robots.txt is a small text file at the root of your site that tells search engine bots which parts of it they can crawl. A well-behaved bot reads this file before visiting your pages, and it follows the rules it finds there.
It's helpful for keeping bots away from pages that have no value in search, like admin pages, shopping carts, account pages and internal search results. That way, search engines focus their efforts on the pages you want them to see.
What to block and what not to block
- Block: login and admin pages, checkout and cart, account pages, internal search result pages and endless filter URLs.
- Don't block: your CSS, JavaScript and image files. Google needs them to see your pages as visitors do.
- Don't block pages you want removed from Google. Put a noindex tag on them instead.
- Don't block your entire site by accident. A single "Disallow: /" under "User-agent: *" stops all search engines.
Robots.txt vs noindex
These two are frequently confused. Robots.txt is a request not to crawl a page, but if other pages link to it, it may still turn up in search results. A noindex tag allows bots to crawl the page but tells them not to show it in results.
If you want to keep a page out of Google, add a noindex tag and make sure the page stays crawlable, so Google can read the tag. Once the page is no longer in the results, you can also block it in robots.txt if you want to save crawl time.
Blocking AI crawlers
Several AI companies run their own crawlers to collect web pages for training their AI models. Each one has its own user-agent name, for example GPTBot for OpenAI, ClaudeBot for Anthropic and CCBot for Common Crawl. Google uses a separate token, Google-Extended, which controls whether your content is used for Gemini, without affecting Google Search.
Blocking these crawlers in robots.txt works for the companies that respect it. It's a request and not a lock, which means bots that skip robots.txt can still visit your site.
Check your pages after changing robots.txt
A wrong rule can quietly hide important pages from search engines. After any change, open the robots.txt report in Google Search Console to confirm Google can read your file, and use URL Inspection on your most important pages to check they aren't blocked.
Robots.txt generator: questions
Short answers about how this tool works. Something missing? Ask us.
Where do I put the robots.txt file?
In the root folder of your website, so it opens at yourdomain.com/robots.txt. Each subdomain needs its own file. On WordPress, an SEO plugin such as Yoast or Rank Math can also edit it for you.
Does robots.txt stop a page from appearing in Google?
No. It stops crawling, not indexing. A blocked page can still show in search results if other sites link to it. Use a noindex tag to keep a page out of Google, and don't block that page in robots.txt, or Google can't see the tag.
Should I block AI crawlers?
It's your choice. Blocking them keeps your content out of future AI training by the companies that respect robots.txt. It doesn't affect your Google rankings. Google-Extended only controls Gemini training, not Google Search.
Do I need a robots.txt file at all?
No, a site works without one and search engines will crawl everything they can find. It's still worth having one to point to your sitemap and to keep bots out of admin, cart and search pages.
How do I test my robots.txt?
After uploading it, open yourdomain.com/robots.txt to check it's live, then look at the robots.txt report in Google Search Console, which shows whether Google could read it.
Is anything I enter sent to you?
No. The file is built in your browser. Your last settings are kept in your own browser so they're still there if you come back.
Related free tools
All free tools →Noindex checker
Find out whether a page can be indexed, and why not.Checks a live URLRobots.txt checker
Read a robots.txt file and test any URL against it.Checks a live URLXML sitemap checker
Validate an XML sitemap and check the URLs in it.Checks a live URLSitemap finder
Find a site's sitemaps in robots.txt and common places.Checks a live URLCheck your site is still crawlable
Crawlfree audits every page in one crawl. Free for Windows, no sign-up, unlimited URLs.