A robots.txt file is one of the smallest files on a website, and one of the easiest to get wrong. It is a plain text file that sits at the root of your domain and tells search engine crawlers which parts of your site they may fetch and which parts they should leave alone. A single typo can hide your whole site from Google, and a single missing line can let crawlers waste your crawl budget on admin pages, internal search results, and endless filtered URLs that no visitor will ever see.
Writing that file by hand is where most of the mistakes happen. You have to remember the exact directive names, group rules under the right user-agent, keep the syntax in line with the RFC 9309 standard, and add your sitemap line in the right place. A free robots.txt generator does that assembly for you: you pick your platform, choose which crawlers get in, add the paths you want blocked, and it hands you a clean, standards-compliant file ready to upload. This guide walks through the whole process using the free generator on SEO Free, step by step, so the file you publish does exactly what you intend.
What a robots.txt generator actually does
A robots.txt generator is a form that turns your choices into a finished file. You never type a directive yourself. Instead, you answer a short series of questions — what platform your site runs on, whether crawlers are allowed in by default, which AI crawlers you want to keep out, where your sitemap lives, and which paths should stay uncrawled — and the tool writes the User-agent groups, Allow and Disallow lines, and Sitemap line for you, in the order and grouping that crawlers expect.
The generator on SEO Free follows the RFC 9309 standard, the IETF specification that defines how robots.txt works. That matters because crawlers from Google, Bing, and the AI platforms all read the same standard, and a file that follows it behaves the same way everywhere. The tool also keeps the output small — generated files stay well under 5 KiB, far below the 500 KiB limit Googlebot parses — so there is no risk of a bloated file being cut off halfway through your rules.
Just as importantly, the generator shows you a live preview that updates as you change settings. Every time you switch a preset, toggle an AI crawler, or add a disallow path, the preview changes immediately, so you can see the exact file you are about to publish before you copy or download anything. That preview is your first safety check, and it is what separates a generator from a blind template: you are not pasting someone else's file and hoping it fits, you are watching your own file take shape.
How the free generator on SEO Free works
The tool is organised as five short sections, followed by the generated file. Understanding each section before you start means you will not have to redo the file later.
1. Select CMS Preset. The first choice is your platform: Standard Clean, WordPress, Shopify, or Next.js / React. Each preset loads a sensible starting set of rules for that platform. The WordPress preset, for example, automatically disallows /wp-admin/ while explicitly allowing /wp-admin/admin-ajax.php, because WordPress needs that file for front-end AJAX rendering. The Shopify preset is built around the fact that Shopify serves its own robots.txt and lets you customise it through a robots.txt.liquid template, so the generated file is the rule set to reproduce there rather than a file to upload directly.
2. Default Crawler Access. The second choice sets the file's overall posture: Allow All (Standard) or Disallow All (Private/Staging). Allow All is the normal choice for a live site — crawlers may fetch everything except the paths you list. Disallow All is the right choice for a staging site, a development copy, or a private site that should not be crawled at all. Picking this first means every rule you add afterwards works inside the correct default.
3. AI Crawlers & Scrapers. The third section holds dedicated toggles for the AI crawlers: Block OpenAI GPTBot (model training), Block Anthropic ClaudeBot (Claude training), Block Google Google-Extended (Gemini training), and Block Perplexity PerplexityBot. These toggles create separate user-agent groups for each bot, so blocking a training crawler does not block ordinary search crawling. That distinction is the whole point: GPTBot collects pages to train models, while Googlebot collects pages to show in search results, and you may want one in and the other out.
4. XML Sitemap URL. The fourth field is where you enter your sitemap's full URL, such as https://yourdomain.com/sitemap.xml. The generator adds it as a Sitemap line at the end of the file, which helps crawlers discover your content the moment they read the file. You can list more than one sitemap if your site has separate sitemaps for products, articles, and images — the Sitemap directive can be repeated, one per line, and it is not tied to any user-agent group.
5. Custom Disallow Paths. The last section is a box for the paths you want crawlers to skip. It comes pre-filled with common ones — /admin/, /install/, and /api/ — and you can add your own. Wildcard and end-anchor patterns work here, so /*?*sort= blocks sorting parameters and /calendar/ blocks date archives. Keep these patterns narrow: a broad wildcard can swallow legitimate pages that share the same parameter.
Below the form sits the Generated Robots.txt panel, with Copy and Download buttons. Copy puts the file text on your clipboard; Download saves it as a robots.txt file you can upload. The preview updates live as you change any setting, so the text you copy is always the file for the settings you see on screen.
How to generate a robots.txt file, step by step
- Open the generator. Go to the free robots.txt generator on SEO Free. There is no sign-up, no account, and no download limit — the tool runs entirely in your browser.
- Select your CMS preset. Pick the preset that matches your platform: WordPress, Shopify, Next.js / React, or Standard Clean for anything else. The preset loads the platform's sensible defaults into the preview. If your site is a plain HTML site or a custom build, Standard Clean is the right start — it gives you an empty, standards-compliant base to build on.
- Choose default crawl access. For a live site, leave this on Allow All (Standard). Switch to Disallow All (Private/Staging) only if the site is a staging copy, a development site, or a private site that no crawler should touch. Remember that Disallow All under User-agent: * tells every crawler to skip every page — it is the single most powerful setting in the tool, so double-check it before you generate.
- Configure crawler-specific rules. Decide which AI crawlers you want to keep out. Toggle on Block OpenAI GPTBot if you do not want your pages used for model training, Block Anthropic ClaudeBot for Claude training, Block Google Google-Extended for Gemini training, and Block Perplexity PerplexityBot for Perplexity. Leave a toggle off if you are happy for that crawler to fetch your pages — and remember that blocking a training bot does not block the same company's search bot, so your pages can still appear in search results and AI answers.
- Enter your XML sitemap URL. Type your sitemap's full URL, including https://, into the Sitemap URL field. If you do not have a sitemap yet, generate one first with a free XML sitemap generator and come back with its URL. A placeholder domain in the Sitemap line is one of the most common mistakes the tool's own guidance warns about — the line is only useful if it points at a real, live sitemap.
- Add your custom disallow paths. In the Custom Disallow Paths box, add the paths crawlers should skip, one per line. Keep the pre-filled /admin/, /install/, and /api/ unless you have a reason to remove them, and add your own: a test folder, an internal search results path, a faceted filter parameter such as /*?*sort=, or a calendar archive such as /calendar/. Check the live preview after each addition to confirm the rule landed in the correct user-agent group.
- Generate, copy, and download. Review the live preview one final time, top to bottom: the user-agent groups, the Allow and Disallow lines, and the Sitemap line. Then click Copy to put the text on your clipboard, or Download to save the file. Keep both — the clipboard copy is for pasting into a tester, and the downloaded file is the one you will upload.
- Test the file before you publish it. Paste the generated text into a free robots.txt tester — the tool's own guidance suggests switching the tester to Paste Mode — and check your most important URLs against it: your homepage, your top category pages, and every path you deliberately blocked. The tester should agree with you on all of them. Our guide to testing robots.txt rules before publishing walks through exactly what to check.
- Deploy the file to your domain root. Upload the downloaded robots.txt to the root directory of your website, so it is served at https://yourdomain.com/robots.txt. It cannot live in a subfolder — crawlers only look at the root. On Shopify, paste the rules into your theme's robots.txt.liquid template instead, and leave Shopify's built-in checkout protections untouched. On WordPress, upload through your hosting file manager or a file manager plugin, in the same folder as wp-config.php.
- Confirm it is live and watch Search Console. Open yourdomain.com/robots.txt in a browser and confirm the live file matches the one you generated. Then watch Search Console's crawl stats over the following week. An unexpected drop in crawled pages is the first sign a rule is broader than intended, and the fix is much easier while the change is fresh.
Example files the generator produces
Seeing the output for real situations makes the tool's choices concrete. These are the kinds of files the generator builds from its presets and toggles.
A WordPress blog. Start from the WordPress preset, keep Allow All, leave the AI toggles off, and add your sitemap URL. The file disallows /wp-admin/ while explicitly allowing /wp-admin/admin-ajax.php, so your site's AJAX features keep working while the admin area stays out of the crawl. The Sitemap line points crawlers at your sitemap the moment they read the file.
A Next.js storefront. Start from the Next.js / React preset, then add /api/, /account/, and /*?*sort= to the Disallow paths box and enter your sitemap URL. The live preview shows the wildcard parameter rule grouped under User-agent: * alongside the preset's defaults, and the downloaded file is uploaded to the project's public folder so it is served at the domain root on the next deployment. This is the generator's own worked example, and it shows the pattern to copy: preset first, then your own paths, then deploy.
A staging site. Choose Standard Clean, switch Default Crawler Access to Disallow All, and generate. The file tells every crawler to skip every page, which is exactly what a staging copy needs. When the site goes live, generate a fresh file with Allow All instead of editing the staging file by hand — regenerating from scratch is the cleanest way to make sure no staging rule survives into production.
A site that blocks AI training but stays in search. Keep Allow All, toggle on GPTBot, ClaudeBot, and Google-Extended, and leave the search crawlers alone. The file gets a separate user-agent group for each training bot with Disallow: /, while User-agent: * still allows Googlebot and Bingbot. Your pages stay findable in search results and AI answers, but they are not fetched for model training.
Tips for a file that works the first time
- Start from a preset, not a blank page. The presets encode platform knowledge — the WordPress admin-ajax.php exception is the classic example — that is easy to forget when you write a file from scratch. Pick the closest preset and adjust it, rather than starting empty.
- Read the live preview before you copy. The preview is the file. If a rule is in the wrong user-agent group, or a path is missing, you will see it there. A thirty-second read of the preview catches the mistakes that take a week to notice in Search Console.
- Keep the file short. The generator produces clean files under 5 KiB, and that is a good size to stay at. A handful of clear rules is easier to review, easier to test, and less likely to contain a typo than a wall of directives. If your rule list keeps growing, the problem is usually your site structure, not your robots.txt.
- Remember paths are case-sensitive. /Private/ and /private/ are different paths to a crawler, while the user-agent token itself is case-insensitive. Copy folder names exactly as they appear on your server, including capital letters.
- Never use the file to hide private content. Robots.txt is publicly visible to anyone who opens yourdomain.com/robots.txt, and it does not stop a determined visitor from requesting a URL. Confidential areas need server-side authentication — passwords or tokens — not a Disallow line.
- Do not block your CSS and JavaScript. Google needs your CSS and JS to render pages the way visitors see them. A rule that blocks those files can hurt how your pages are understood and ranked, even though the pages themselves are allowed.
- Save the settings, not just the file. Keep a note of which preset and toggles you chose, so the next time you regenerate the file you start from the same base instead of rebuilding it from scratch and losing earlier fixes.
- One sitemap line per sitemap. If your site has separate sitemaps for products, articles, and images, list each one on its own Sitemap line. Crawlers read all of them, and there is no penalty for listing several.
- Regenerate, don't patch, after big changes. When your platform changes, your sitemap moves, or your AI crawler policy changes, run the generator again with the new settings. Editing a deployed file by hand is how old rules survive past their usefulness.
Common problems and how to fix them
The live file does not match what you generated. First, hard-refresh yourdomain.com/robots.txt — browsers and CDNs cache the file aggressively. Then check that you uploaded to the domain root, not a subfolder, and that you uploaded the downloaded file rather than an older copy. On Shopify, confirm you edited the robots.txt.liquid template and published the theme change.
Google says a page is blocked, but you meant to allow it. Open the live file and find the Disallow line that matches the page's path. A wildcard such as /*? blocks far more than one parameter, and a missing trailing slash can turn a rule for one folder into a rule for every URL starting with those letters. Narrow the rule, regenerate, re-upload, and test the URL in a robots.txt tester before requesting a recrawl in Search Console.
Your sitemap line points at a placeholder or a dead URL. This happens when the file is generated before the sitemap exists, or when the domain changes and the file is not regenerated. Open the live file, check the Sitemap line, and regenerate with the correct URL. A sitemap that returns a 404 wastes the hint entirely.
AI bots are still crawling after you blocked them. Robots.txt is voluntary, and some crawlers fetch the file infrequently or are slow to honour changes. Give it a week, confirm the live file actually contains the Disallow lines for GPTBot, ClaudeBot, or Google-Extended, and check your server logs for the bot's user-agent. If a bot ignores robots.txt entirely, blocking it is a hosting-level job, not a robots.txt job.
WordPress admin-ajax.php is blocked and features break. This is the mistake the WordPress preset exists to prevent: disallowing /wp-admin/ without an explicit Allow for /wp-admin/admin-ajax.php breaks front-end AJAX features. Regenerate from the WordPress preset, which includes the exception, and re-upload.
The file is huge and Google stops reading it. Googlebot parses up to 500 KiB of robots.txt. If your file is anywhere near that size, it is not a robots.txt problem — it is a site-structure problem, usually thousands of generated URLs that should be handled with canonical tags or noindex instead. The generator's output stays under 5 KiB; if your file is far larger, regenerate from a preset and add only the rules you can justify one by one.
You blocked search engines when you only meant to block AI crawlers. This happens when a training-bot rule is placed in the User-agent: * group instead of its own group. Check the live preview: GPTBot, ClaudeBot, and Google-Extended each need their own User-agent group with Disallow: /, while the * group stays allowed. Regenerate with the toggles and confirm the groups in the preview before you publish.
Frequently asked questions
Is a generated robots.txt file as good as a hand-written one?
Yes — usually better. The generator follows RFC 9309, groups rules correctly, and keeps the file small and consistent. Hand-written files are where most syntax mistakes come from: a missing slash, a rule in the wrong group, or a typo in a user-agent token. The generator removes those errors, and its live preview lets you verify the result before it goes live.
Do I need a robots.txt file at all?
Most sites benefit from one, even a minimal file. Without it, crawlers fetch everything, including admin pages, internal search results, and filtered URLs that burn crawl budget. A file that simply allows everything and lists your sitemap is already useful — and it costs nothing to generate.
Can the generator block AI crawlers without blocking Google?
Yes. The AI toggles create separate user-agent groups for GPTBot, ClaudeBot, Google-Extended, and PerplexityBot, each with its own Disallow rule. Googlebot and Bingbot keep their own groups and stay allowed, so your pages remain in search results while training crawlers are kept out.
Where do I put the file after I generate it?
Upload it to the root directory of your website, so it is served at https://yourdomain.com/robots.txt. It cannot live in a subfolder. On Shopify, reproduce the rules in your theme's robots.txt.liquid template instead of uploading a file, and on WordPress upload it through your hosting file manager into the same folder as wp-config.php.
How do I know the generated file actually works?
Test it before and after publishing. Paste the generated text into a robots.txt tester and check your homepage, your key pages, and your blocked paths. After uploading, open yourdomain.com/robots.txt in a browser to confirm the live file matches, then watch Search Console's crawl stats for a few days for any unexpected change in crawled pages.
Bottom line
Generating a robots.txt file takes five minutes when a tool does the assembly: pick your CMS preset, set your default access, toggle the AI crawlers you want out, add your sitemap URL and your disallow paths, and read the live preview before you copy or download. Then test the file in a robots.txt tester, upload it to your domain root, confirm it is live in a browser, and keep an eye on Search Console for a week. That is the whole job — and the difference between a file that quietly protects your crawl budget and one that quietly hides your site is usually a single line you never checked. Generate it, preview it, test it, and then publish it.


