Robots.txt generator
This robots.txt generator builds the file from plain form fields, checks it for common mistakes and lets you test any address against the rules using Google's published matching logic. It is for site owners, developers and marketers who need a correct file without learning the syntax first. It runs in your browser.
Runs in your browser. Nothing you type is sent to us.Last checked 2 November 2026
What this tool does not do
- It cannot see your live site. It never fetches your robots.txt, so it cannot tell you what is published now or what Google has saved.
- A robots.txt file asks crawlers to stay away. It does not hide, secure or remove a page, and a blocked address can still be listed if other pages link to it.
- The tester applies Google's published rules to the text above. Other crawlers may read some lines differently, and the tester compares paths exactly as typed without normalising percent-encoded characters.
- It does not know which of your paths matter. The shop and WordPress starting points are examples, and only you can say whether a path is safe to block.
- A tidy file does not improve rankings. Its value is in not blocking pages you want crawled.
On this page
What is a robots.txt generator?
A robots.txt generator writes the plain text file that tells crawlers which parts of a site they may request. You enter crawler names, the paths to keep them out of and your sitemap addresses, and it produces correctly formatted lines. This one also checks the result for mistakes and tests any address against it.
Most generators stop at the output. This page keeps going, because the hard part of robots.txt is not typing the lines but predicting how they combine. It applies the longest-rule logic Google documents, so you can type a path such as /cart/checkout?step=2 and see which rule decides it. Allow and Disallow lines are not read from top to bottom, and people who assume they are write files that do the opposite of what they meant.
The longer background on what the file is for sits in the robots.txt guide, and the wider subject of how search engines reach your pages is covered in what technical SEO involves. Everything on this page is built with fixed rules in your browser. No model is involved and nothing you type is sent anywhere.
The point
The longer background on what the file is for sits in the robots.txt guide, and the wider subject of how search engines reach your pages is covered in what technical SEO involves.
How do I use the robots.txt generator?
Pick a starting point or edit the default, name the crawler each group is for, list the paths to keep it out of, add your sitemap address, read the checks, test a few real addresses and then copy or download the file. The steps below explain each stage and the one place where people usually go wrong.
- Choose a starting point, or edit the shop example that loads by default. The buttons only fill the boxes. Nothing is applied to your site until you upload a file yourself.
- Name the crawler. Type * for all crawlers. Add a separate group only when one crawler needs different rules, because a crawler with its own group ignores the * group entirely.
- List the paths to disallow, one per line, each starting with a slash. Use * for any run of characters, and a dollar sign at the very end of a rule to mean the address finishes there, so /*.pdf with a dollar sign added matches only addresses that end in .pdf.
- Add Allow lines only as exceptions inside a folder you have blocked, such as opening one script inside an otherwise blocked folder.
- Paste your sitemap address with https:// at the start. If you do not have a sitemap yet, the XML sitemap generator builds one from a list of addresses, and what a sitemap is and does explains why you would submit one.
- Read the checks, then test the pages that matter: the home page, a product or service page, a category page, a search results page and every path you meant to block.
- Copy or download the result. Save it as robots.txt in UTF-8 plain text and upload it to the root of the host so it opens at your domain followed by /robots.txt. A subdomain needs its own file.
How do I read the checks and the address test?
The tool reports three kinds of message and one test result. Fix this means part of your input was left out of the file. Check this means the file is valid but may not do what you intend. Note explains how a line will be read. The address test names the exact rule that decided the outcome.
| What you see | What it means | What to do |
|---|---|---|
| Fix this | Something was left out of the file, such as a sitemap line without https:// or a crawl delay that is not a whole number. | Correct the box the message names. The file is incomplete until you do. |
| Check this | The file is valid but may not do what you mean, for example Disallow: / for all crawlers, or a # that cut a path short. | Confirm it is deliberate. A whole-site block on a live site is almost always an error. |
| Note | A fact about how crawlers will read a line, such as a path with no trailing slash also matching longer addresses that start with it. | No action if it matches your intent. Add a trailing slash if it does not. |
| Allowed (address test) | Either an Allow rule was the longest match, or no rule matched, and unmatched addresses are allowed by default. | Fine if the page should be crawlable. If you expected a block, look for a missing or too-short rule. |
| Blocked (address test) | The longest matching rule is a Disallow. The rule and its group are shown. | Check the page is not one you want crawled. If it is, shorten or remove that rule, or add a longer Allow. |
| No problems found | None of the checks in this tool found a mistake. It does not mean Google has tested the file. | After uploading, open the robots.txt report in Search Console to see the files Google found and any lines it could not parse. |
How does Google decide which robots.txt rule applies?
Google compares every Allow and Disallow rule that matches an address and obeys the one with the longest path. If two matching rules are the same length, the less restrictive one wins, which means Allow. The order of lines in the file does not matter. These worked examples follow Google's documentation and are reproduced in this tool's own tests.
| Rules in the group | Address tested | Result | Why |
|---|---|---|---|
| Allow: /p and Disallow: / | /page | Allowed | Both rules match. /p is the longer rule, so the more specific Allow wins. |
| Allow: /folder and Disallow: /folder | /folder/page | Allowed | The rules are the same length, and Google uses the least restrictive rule. |
| Allow: /page and Disallow: /*.htm | /page.htm | Blocked | Both match. /*.htm is six characters and /page is five, so the Disallow is more specific. |
| Allow: / with a dollar sign added, and Disallow: / | / (the home page) | Allowed | The dollar sign anchors the end of the address, so the Allow matches the home page and nothing else. |
| Allow: / with a dollar sign added, and Disallow: / | /page.htm | Blocked | Only the Disallow matches, so everything except the home page is blocked. |
| Disallow: /fish | /fish.html or /fishheads | Blocked | Rules match from the start of the path, so anything beginning with /fish is caught. |
| Disallow: /fish | /Fish.asp | Allowed | Paths are case sensitive, so a capital F is a different path. |
Which crawlers follow which rules?
Google reads four fields: User-agent, Allow, Disallow and Sitemap. It ignores Crawl-delay, and it stopped supporting noindex inside robots.txt on 1 September 2019. Each crawler obeys one group, the most specific that names it. Crawlers outside Google may read the file differently or ignore it.
The grouping rule catches people out. If your * group blocks /private/ and you then add a Googlebot group that blocks /tmp/, Googlebot follows only its own group and will crawl /private/ unless you repeat that rule. The generator warns you when it sees this pattern. If the same crawler is named in two groups, Google merges them into one, which is easy to forget when a file has been edited by several people.
Crawl-delay is a separate case. Bing documented in 2009 that it takes a positive whole number, acts as a relative throttle and should not exceed 10. That is an old post, so check Bing Webmaster documentation before relying on it. The tool accepts only whole numbers, warns above 10 and reminds you that Google ignores the line.
The format is also an internet standard, RFC 9309, published in September 2022, which states that the rules are not a form of access authorisation. Google caches the file for up to 24 hours, so a change is not instant. If the file returns a 404 or another 4xx status other than 429, Google treats it as if no file exists and restricts nothing. A server error is different: Google pauses crawling the site for up to 12 hours while it retries.
AI companies publish their own crawler names, and those names change. The AI crawler robots.txt generator is built for those names, and you should check each vendor's own page before you rely on any of them.
The point
The AI crawler robots.txt generator is built for those names, and you should check each vendor's own page before you rely on any of them.
What are the common robots.txt mistakes?
A handful of mistakes account for most of the damage: a leftover staging block, a rule broader than intended, a file in the wrong place and the belief that blocking a page removes it from Google. The tool flags the first three. The fourth needs understanding, so it is explained here.
- Carrying the staging file to the live site. Disallow: / for * is correct on a staging copy and harmful after launch. Checking it is a standard line in any SEO migration checklist.
- Writing a rule that is too short. Disallow: /blog also blocks /blog-archive and /blogger, because rules match by prefix. Add the trailing slash to block only the folder.
- Putting the file in the wrong place. It must be named robots.txt and sit at the root of the host. It applies only to that protocol, host and port, a subdomain needs its own, and a file in a subdirectory is not checked.
- Expecting Disallow to remove a page from Google. Google says robots.txt is not a mechanism for keeping a web page out of Google, and a blocked address can still be indexed if it is linked from elsewhere. Use noindex or a password, and do not block a page you have marked noindex, because a crawler that may not fetch the page cannot read the tag. What robots.txt does and does not do goes through this, and why a page is missing from Google covers the opposite problem.
- Forgetting that a crawler with its own group ignores the * group. Repeat any shared rules in each named group.
- Pasting full addresses or comments into a rule. Rules take paths, not web addresses, and anything after a # is a comment. The tool converts a pasted address to its path and cuts a rule at the #, then tells you it did.
- Treating the file as security. Anyone can read it at /robots.txt, so listing a private folder advertises where it is. Protect private areas with a login.
When is a free robots.txt tool not enough?
A free generator is enough for a small site with a few folders to keep crawlers out of. It is not enough when a large catalogue has faceted navigation, when URLs are changing in a site move, or when you need to know why pages are not being indexed. Those problems need the live site examined, not a file written.
A robots.txt file is one input to crawling. Whether a crawler can reach, render and index your pages also depends on server responses, internal links, canonical tags and sitemaps. Examining those is the work of technical SEO, and an SEO audit checks them against your live site rather than a draft. If you would like a second pair of eyes on a file before it goes live, contact Prabhu Solutions. The company is registered in Oldbury in the West Midlands, works with businesses across the UK and delivers its work remotely.
The point
Examining those is the work of technical SEO, and an SEO audit checks them against your live site rather than a draft.
Sources
These are the sources behind the rules this tool applies. Where a source is older or from a vendor other than Google, the page says so.
- Google Search Central, How Google interprets the robots.txt specification: file location, 500 KiB limit, supported fields, wildcards, rule precedence, groups, caching and status codes, https://developers.google.com/crawling/docs/robots-txt/robots-txt-spec, checked 2 November 2026
- Google Search Central, Introduction to robots.txt: its purpose and its limits, including that it is not a way to keep a page out of Google, https://developers.google.com/search/docs/crawling-indexing/robots/intro, checked 2 November 2026
- Google Search Central blog, A note on unsupported rules in robots.txt: noindex and other unsupported rules retired on 1 September 2019, https://developers.google.com/search/blog/2019/07/a-note-on-unsupported-rules-in-robotstxt, checked 2 November 2026
- Google Search Console Help, robots.txt report: what the report shows and how to request a recrawl, https://support.google.com/webmasters/answer/6062598, checked 2 November 2026
- IETF, RFC 9309 Robots Exclusion Protocol, September 2022: longest-match rule, 500 KiB minimum parse limit and the statement that the rules are not access authorisation, https://www.rfc-editor.org/rfc/rfc9309, checked 2 November 2026
- Bing Webmaster Blog, Crawl-delay and the Bing crawler, MSNBot (2009): meaning and advised range of Crawl-delay values, https://blogs.bing.com/webmaster/2009/08/10/crawl-delay-and-the-bing-crawler-msnbot, checked 2 November 2026
Questions people ask about this tool
Is this robots.txt generator free, and does it send my data anywhere?
It is free, and nothing you type leaves your browser. The file is built and tested by fixed rules running on the page, with no server call and no stored data. The paths, crawler names and sitemap addresses you enter are not sent to Prabhu Solutions or anyone else.
Where do I put the robots.txt file?
Save it as robots.txt in UTF-8 plain text and upload it to the root of the host, so it opens at your domain followed by /robots.txt. Rules apply only to that protocol, host and port. A subdomain needs its own file, and a copy in a subfolder is not checked at all.
Does robots.txt stop a page appearing in Google?
No. Google says robots.txt is not a mechanism for keeping a web page out of Google, and a blocked address can still be indexed if other pages link to it. To keep a page out of results, use noindex or password protection, and leave the page crawlable so the noindex can be read.
Is robots.txt a ranking factor?
No. It is a crawling control, not a ranking tool. A correct file stops you blocking pages you want crawled, and a faulty one can cause real damage, but writing a tidy file does not lift any page up the results. Treat it as housekeeping that protects what you already have.
What does Disallow: / do?
It asks the crawlers named in that group to request nothing on the site. For the * group that means every compliant crawler. It is right for a staging copy and a serious mistake on a live site, which is why this tool raises a warning whenever it sees it.
Should I add a Crawl-delay line?
Usually not. Google ignores Crawl-delay, and Bing's 2009 guidance says most sites do not need it and advises against values above 10. If one crawler is overloading your server, a small whole number may help for crawlers that read it, but check that crawler's own documentation first.
Can I test a robots.txt file before I upload it?
Yes, with the address test on this page, which applies Google's published matching rules to the text you have built. After uploading, check the live file in the Search Console robots.txt report, which shows the files Google found, when it last fetched them and any lines it could not parse.
Do I need a robots.txt file at all?
Not every site does. With no file, a 404 is treated as no restrictions, so everything may be crawled. You need one to keep crawlers out of specific areas, to manage crawler load or to list sitemap addresses in a standard place that crawlers check.
More free tools
- XML sitemap generatorPaste a list of page addresses and get a valid sitemap.xml, split and indexed if it is long.
- AI crawler robots.txt generatorAllow or block eleven documented AI crawler tokens, with each vendor's own explanation beside it.
- llms.txt generatorBuild an llms.txt file in the llmstxt.org proposal format, or check one you already have.
Read next
Robots.txt Guide: What It Does, What It Does Not Do and the Mistakes That Block Pages
Robots.txt tells crawlers which URLs they may fetch. It does not remove pages from Google. Here is the syntax, noindex versus disallow, the mistakes that block pages, and how to test the file.
What Is a Sitemap? XML and HTML Sitemaps, What They Do and How to Submit One
A sitemap lists the pages you want search engines to find. Here is what an XML sitemap looks like, how it differs from an HTML sitemap, how to submit one in Search Console and what commonly goes wrong.
Why Isn't My Site Indexed by Google? How to Read the Page Indexing Report
Pages go unindexed for a handful of reasons: blocking, noindex, conflicting canonicals, redirects, errors, weak content, or Google not having reached them yet. Here is how to tell which, and what to do.
