Robots.txt Generator: Build Rules Without Breaking
Build a valid robots.txt with crawler groups, allow and disallow paths, crawl delay and a sitemap line. Copy the text; nothing is written to your server.
A robots.txt generator assembles a valid robots.txt file from crawler groups, allow and disallow paths, an optional crawl delay and a sitemap line. Choose the crawlers, list the paths, and copy the generated text into public/robots.txt. The tool never writes to your server, so it cannot break a live site while you experiment.
The most common robots.txt disaster is a single character: Disallow: / blocks everything, and a staging rule copied to production can remove a whole site from search. This tool flags the obvious versions of that mistake before you copy the file, but it cannot know your intent. Read the output before publishing it.
What goes into a robots.txt
A robots.txt file is a set of groups. Each group starts with one or more User-agent lines and is followed by rules for that crawler.
- User-agent — the crawler token the group applies to, or
*for all crawlers. - Disallow — paths the crawler should not request. Matching starts at the beginning of the path, so
/adminalso covers/administrator. - Allow — paths inside a blocked folder that should still be crawled. A more specific
Allowoverrides a matchingDisallowfor most crawlers. - Crawl-delay — seconds between requests. Bing and Yandex honour it; Google ignores it.
- Sitemap — an absolute URL to your sitemap. This line is outside the groups and can appear anywhere.
The generator offers groups for all crawlers, Googlebot, Googlebot-Image, Bingbot, YandexBot, DuckDuckBot and Baiduspider. Those tokens are written exactly as shown; a typo in a user-agent name means the group silently does nothing.
How to generate robots.txt
- Open the robots.txt generator.
- Tick the crawlers the rules should apply to.
*is selected by default. - Choose the access mode: block listed paths, allow everything, or emit no group for the selected crawlers.
- List paths to disallow, one per line. A missing leading slash is added for you.
- Add any
Allowexceptions. These are useful for a single public file inside a blocked directory. - Set a crawl delay only if you have a reason. Zero omits the line.
- Paste a full sitemap URL if you have one.
- Press Run, then copy the text to
public/robots.txt.
Paths are trimmed and de-duplicated. Blank lines are ignored. Wildcards such as * and the end anchor $ are passed through as text, because support varies between crawlers.
Which access mode to use
| Mode | Output | Use when |
|---|---|---|
| Block listed paths | A group per crawler with your Disallow and Allow lines |
Normal site with private areas to keep out of search |
| Allow everything | Allow: / for each selected crawler |
You have no paths to block and want an explicit file |
| Ignore these crawlers | No group for the selection, with a * fallback if nothing remains |
You want other groups to govern those crawlers |
The third mode is easy to misread. "Ignore" here means "do not write a group for this crawler", not "block this crawler". To block a crawler, select it and disallow /. To leave it governed by the wildcard group, select nothing that overrides it.
Common problems and fixes
The whole site disappeared from search. The file contains Disallow: /. That blocks every path. Remove it, request a recrawl, and check that the file is not still cached. The generator warns when it sees this line, but it will still build it if you asked for it.
A private page is still in the index. Disallow prevents crawling, not indexing. If other sites link to the URL, or it was indexed before the rule, it can remain in results without a snippet. To keep a page out of the index, use a noindex robots meta tag or an X-Robots-Tag header, and allow crawling so the crawler can see the instruction.
The sitemap line was dropped. The sitemap must be an absolute http or https URL with a host. A bare path such as /sitemap.xml is not valid and is left out with a note. Enter https://example.com/sitemap.xml.
A crawler ignores the rule. User-agent names are case-insensitive in the spec but must match the crawler's token. Googlebot-News is not Googlebot. Check the exact token and remember that some crawlers ignore groups they do not recognise.
The rule blocks more than intended. Path matching is prefix-based. /admin blocks /admin, /administrator and /admin-tools. Use a trailing slash (/admin/) or a more specific path if you meant only one directory. Wildcards behave differently across crawlers, so test with the crawler's own checker.
Crawl-delay did nothing. Google ignores Crawl-delay. Use Search Console's crawl rate settings for Google, and treat the line as guidance for Bing and Yandex.
The file returns a 404 or HTML. robots.txt must be served as plain text at the site root. A soft 404 or an HTML error page is treated as no robots.txt at all. Check the response code and content type after uploading.
A staging file reached production. Keep the production file separate from staging. A staging file that blocks everything is correct on staging and catastrophic live.
Rules worth remembering
- robots.txt is a hint, not access control. Anything disallowed can still be fetched by a human or a bot that chooses to ignore the file. Protect private data with authentication, not a text file.
- Do not block CSS or JavaScript. Google renders pages and needs those files to understand the layout. Blocking them can make a page look broken to the crawler.
- Do not block a page you want indexed. Crawling has to happen before indexing.
Disallowandnoindextogether are contradictory: the crawler cannot see thenoindexif it cannot fetch the page. - Keep the file small and simple. A short list of real paths is easier to audit than a hundred rules accumulated over years.
- Use one group per crawler. Do not repeat the same user-agent in several groups and expect the rules to merge; behaviour differs.
- Test after upload. Fetch
https://yourdomain.com/robots.txtin a browser and confirm it is the file you expected.
Robots.txt, sitemaps and canonical tags
These three files solve different problems, and they are often confused:
- robots.txt says which paths crawlers may request.
- A sitemap lists the URLs you want indexed, with optional last-modified dates. Build one with the XML sitemap generator, then add its URL to the
Sitemap:line here. - A canonical tag chooses one URL when several serve the same content. The canonical tag builder lists the variants you need to cover.
Before publishing a page, the meta tag analyzer checks the title, description, robots meta, viewport and social tags from pasted source. It complements robots.txt: one controls crawling, the other tells the crawler how to treat the page once it arrives.
Frequently asked questions
Is the robots.txt generator free?
Yes. There is no account or payment, and the tool runs in your browser.
Does it upload or publish the file?
No. It generates plain text for you to copy. It does not connect to your server, upload anything or change a live site.
Does Disallow remove a page from Google?
No. It stops crawling, not indexing. A disallowed URL can still appear in results if it is linked or was already indexed. Use a noindex meta tag or header if removal from the index is the goal.
Should I use Allow or Disallow for a public folder inside a blocked one?
Use Allow for the specific path. A more specific allow rule overrides a broader disallow for common crawlers. List the exact path, such as /admin/public, rather than the whole folder.
Is crawl-delay respected by Google?
No. Google ignores Crawl-delay. Bing and Yandex honour it. For Google, use the crawl rate controls in Search Console.
Where do I put the generated file?
At the root of the domain, as public/robots.txt in a Laravel project or the web root on a static host. It must be reachable at https://yourdomain.com/robots.txt and served as plain text.
Bottom line
A robots.txt file is short, easy to get wrong and slow to notice. Generate it deliberately: choose the crawlers, list only the paths you mean to block, add the sitemap line, and read the output before copying it. Start with the robots.txt generator, use the sitemap generator for the file it points at, and check each page's tags with the meta tag analyzer.
Related posts
View allCanonical Tag Builder: Fix Duplicate URLs
Build a rel=canonical tag, see every URL variant that reaches the same page, and catch http, www, trailing-slash and tracking-parameter conflicts.
Keyword Density Checker: What the Numbers Mean
Check keyword and phrase density in any text, see over-use warnings, and tune stop words and phrase length. Runs in your browser, nothing uploaded.
Turn Pasted Text into Markdown Tables and FAQ Schema
Paste tab-separated rows or Q:/A: pairs and get a clean Markdown table plus valid FAQPage JSON-LD. Escapes pipes, pads cells and explains limits.
Comments (0)
Be the first to share feedback on this post.