Robots.txt Generator
Build a robots.txt file from platform presets, block AI crawlers, and test every rule the way Google reads it.
AI crawlers
Tick a bot to block it from the whole site. Unticked bots follow your rules for all robots.
Sitemaps and extras
Test a URL
Check what this file allows before you upload it. It follows Google’s matching rules.
Import an existing robots.txt
Paste the file to edit it here. Open yoursite.com/robots.txt in a browser to see your current one.
How to use the robots.txt generator
Pick a preset that matches your site, then adjust the rules. The robots.txt file on the right updates as you type, and the checks under it flag common mistakes.
- Choose a preset, such as WordPress, Shopify or a staging site that should stay hidden.
- Edit the rule groups. Each group names one or more crawlers and lists the paths they may or may not visit.
- Tick the AI crawlers you want to block, or press Block AI training only.
- Add the full address of your XML sitemap.
- Test a few URLs in the tester to confirm the rules do what you expect.
- Copy or download the file and upload it to the root of your site.
Already have a file? Paste it into Import. The robots.txt builder reads it into editable groups, so you can fix it rather than start again.
What is a robots.txt file?
A robots.txt file is a plain text file that tells crawlers which parts of a site they may visit. It sits at the root of the domain, for example example.com/robots.txt. Well-behaved crawlers read it before they fetch anything else.
The rules follow the Robots Exclusion Protocol, published as RFC 9309 in 2022. Google, Bing and most large crawlers follow it. Bad bots ignore it, so robots.txt is a set of requests, not a lock.
That is why a robots.txt maker cannot protect private pages. Use a password or a login for anything secret. Listing a secret folder in robots.txt only tells the world where to look.
The rules, line by line
| Line | What it does |
|---|---|
User-agent: * | Starts a group for every crawler. Name a crawler, such as Googlebot, to write rules just for it. |
Disallow: /cart/ | Asks crawlers not to fetch any URL that starts with /cart/. |
Allow: /wp-admin/admin-ajax.php | Makes an exception inside a blocked folder. |
Disallow: /*?sort= | The star matches any characters. This blocks sorted versions of every listing page. |
Disallow: /*.pdf$ | The dollar sign marks the end of the URL. This blocks PDF files only. |
Sitemap: https://…/sitemap.xml | Points crawlers to your sitemap. Use the full address. |
# note | A comment. Crawlers ignore everything after the hash. |
An empty Disallow line blocks nothing. A single slash blocks the whole site. That one character is the most common way sites vanish from search by accident.
How Google reads your rules
Google picks one group for each crawler: the one that names it most specifically. If no group names Googlebot, it follows the star group. Rules from different groups are not combined.
Inside that group, the longest matching rule wins. When an Allow and a Disallow rule match with the same length, Google chooses Allow. Paths are case-sensitive, so /Shop/ and /shop/ are different folders.
Google caches the file for up to a day. Changes you upload can take that long to take effect.
If robots.txt returns a 404, Google treats the whole site as open. If it returns a server error, Google pauses crawling. It may fall back on an older copy for up to 30 days.
The tester in this tool follows the same logic. Type a path and pick a crawler to see which rule decides the result.
Robots.txt for WordPress, Shopify and other platforms
Each platform has its own folders to keep out of search. The presets give you a safe starting point for each one.
- WordPress: block /wp-admin/ but allow admin-ajax.php, which many themes need. WordPress serves a virtual robots.txt until you upload your own. This WordPress robots.txt generator works for either route.
- WooCommerce: also block the cart, checkout and account pages, plus add-to-cart links.
- Shopify: Shopify writes the file for you. To change it, edit the robots.txt.liquid template in your theme.
- Magento, Drupal and Joomla: block system folders, search results and filtered URLs.
- Staging sites: block everything, but protect the site with a password too.
A robots txt generator for WordPress should never block /wp-content/. Themes and plugins load their CSS and JavaScript from there. Google needs those files to see the page the way a visitor does.
Blocking AI crawlers
Many AI companies now run their own crawlers. Some collect pages to train models. Others fetch pages to answer a question in an AI search tool.
| Company | Training | Search and answers |
|---|---|---|
| OpenAI | GPTBot | OAI-SearchBot, ChatGPT-User |
| Anthropic | ClaudeBot | Claude-SearchBot, Claude-User |
| Google-Extended (a control token, not a crawler) | Googlebot | |
| Apple | Applebot-Extended (a control token) | Applebot |
| Perplexity | None listed | PerplexityBot, Perplexity-User |
| Others | CCBot, Meta-ExternalAgent, Bytespider, Amazonbot | Varies |
Block AI training only keeps your pages out of model training while staying visible in AI search. Blocking Google-Extended does not affect Google Search. It only controls use in Gemini models.
Some fetchers act for a person who asked a question. OpenAI and Perplexity say robots.txt may not apply to those visits. Treat the AI section as a clear statement of your wishes, not a guarantee.
Mistakes that hurt rankings
- Blocking to hide a page. Robots.txt stops crawling, not indexing. A blocked page can still appear in results if other sites link to it. Use a noindex tag instead, and leave the page crawlable so Google can see it.
- Blocking CSS and JavaScript. Google renders pages like a browser. Without those files, a page can look broken to it.
- Using crawl-delay for Google. Google ignores it. Bing reads it, so keep it only if Bing crawls too hard.
- Wrong place or name. The file must be called robots.txt, in lower case, at the root of each host. A file in a subfolder does nothing.
- Forgetting subdomains. shop.example.com needs its own file. So does each protocol, http and https.
Keep the file under 500 KiB, which is the most Google will read. Save it as plain UTF-8 text.
Creating a robots.txt file without a plugin
Creating a robots.txt takes a few minutes. Build it here, download it, and upload it to your site’s root folder by FTP or your host’s file manager.
Then open yourdomain.com/robots.txt in a browser to confirm it loads. In Google Search Console, the robots.txt report shows the version Google last fetched. That report replaced the old robots.txt Tester, which Google retired in 2023.
Want to check a live file? Our Robots.txt Tester is built for that job. Paste the file there and test as many URLs as you like.
Why this robots.txt generator is different
Most free robots.txt generator tools stop at a few drop-downs. This one adds the parts they leave out.
- Presets for nine platforms, each with notes on why a rule is there.
- An up-to-date AI crawler list that separates training from search.
- A built-in tester that follows Google’s matching rules.
- Checks for the mistakes above, before you upload anything.
- Import, so you can repair an existing file.
Some people search for a generator, robot.txt or robots.txt, and some for a custom robot.txt generator. Whatever you call it, this online robots.txt generator writes the same standard file. There is no account, no limit and no watermark.
Private by design
The robots.txt file generator runs in your browser. Nothing you type or paste is sent to a server, and there is no sign-up.
Your last settings are saved on this device only. The tool is ready when you come back.
Frequently asked questions
What is a robots.txt generator?
A robots.txt generator writes the rules file that tells crawlers which pages they may visit. You pick options, and it produces correct syntax. This one also tests the rules and checks for mistakes.
Is this robots.txt generator free?
Yes. It is a free robots.txt generator with no account and no limit. It runs in your browser, so nothing you type leaves your device.
Where do I put the robots.txt file?
Upload it to the root of your domain, so it loads at yourdomain.com/robots.txt. Each subdomain needs its own file. A robots.txt file in a subfolder is ignored.
Does robots.txt stop a page appearing in Google?
Not reliably. It stops crawling, but Google can still list a blocked URL if other pages link to it. Use a noindex tag to keep a page out of results, and leave it crawlable.
Is there a Google robots.txt generator?
Google does not offer one. This tool follows Google’s published rules, so it works as a Google robots.txt generator. The tester picks the same rule Google would.
Should I block AI crawlers?
That is your choice. Blocking training bots such as GPTBot and ClaudeBot keeps pages out of model training. Leaving search bots open keeps you visible in AI answers.
How do I create robots.txt without coding?
Pick a preset, adjust the rules and download the file. This robots file generator writes the syntax for you. Upload the file to your site’s root folder.
Does Google support crawl-delay?
No. Google ignores the crawl-delay line. Bing reads it, so keep it only if Bing crawls your server too hard.
What is the best robots.txt for WordPress?
Block /wp-admin/ and allow /wp-admin/admin-ajax.php. Add your sitemap. Leave /wp-content/ open, because it holds the CSS and JavaScript Google needs.
Last reviewed 2026-11-30 · How we build and check our tools