Robots.txt Generator
A robots.txt file tells search engine crawlers which parts of your site they may request. It sits at the root of your domain, at yoursite.com/robots.txt, and it is the first file most crawlers look for before they fetch anything else. This tool generates a valid file for the most common case: allow every crawler, and point them at your sitemap so they can find your pages efficiently. That is genuinely what the majority of sites need. What robots.txt does not do is the single most misunderstood thing about it, and getting it wrong can remove pages from search or, worse, trap pages in search that you wanted gone. It controls crawling, not indexing, and the difference is the whole subject of the sections below. The file generates in your browser and nothing is sent anywhere.
How to Use the Robots.txt Generator - Step by Step
- Choose "Default Access". "Allow All Robots" is selected by default and is the right choice for almost every site. It produces a file that lets crawlers request any page, which is what you want when your goal is to be found. Only choose "Disallow All Robots" for a site that should not appear in search at all, such as a private staging environment, and understand that this blocks crawling rather than guaranteeing removal from search.
- Enter a "Crawl Delay" only if you have a specific reason. This asks crawlers to wait the given number of seconds between requests, which can reduce server load on a small host during heavy crawling. Leave it blank unless your host is struggling, because it slows how quickly your new pages are discovered. Note the important limitation covered below: Google ignores this directive entirely.
- Enter your "Sitemap URL". This is the most valuable field. Point it at your full sitemap, for example https://yoursite.com/sitemap.xml, so crawlers can find every page you want indexed rather than relying on discovering them through links. Use the absolute URL including https, not a relative path.
- Click "Generate Robots.txt". The tool assembles the directives and displays the file in a text box.
- Read the output before using it. For the allow-all case it will show "User-agent: *" followed by "Disallow:" with nothing after the colon. That empty Disallow is correct and deliberate: it means disallow nothing, which is to say allow everything. It is not a mistake or an unfinished line.
- Copy the file and save it as robots.txt, all lowercase. The filename must be exactly that.
- Upload it to the root of your domain so it resolves at yoursite.com/robots.txt. It will not work in a subfolder. On most hosts this is the public root directory, the same place your homepage lives.
- Verify it is live by visiting yoursite.com/robots.txt in a browser. Then check it in Google Search Console under the robots.txt report, which shows how Google reads it and flags any errors.
The Directives, and What Each One Means
Names which crawler the following rules apply to. An asterisk means all crawlers. You can name specific ones, such as Googlebot or Bingbot, though this tool applies rules to all crawlers only.
A path that crawlers should not request. Empty means nothing is blocked. A single slash means the entire site is blocked. This tool offers those two options; blocking specific folders requires editing the file by hand.
The absolute URL of your sitemap, which helps crawlers find every page you want indexed. This is independent of the Disallow rules and can appear alongside either.
The most important thing to understand about robots.txt is what it is not. It is a crawling directive, which means it tells cooperating crawlers which URLs they may request. It is not an indexing directive, and it does not control whether a page appears in search results. These sound like the same thing and are not. A page blocked in robots.txt can still appear in Google search results if other sites link to it, because Google can list a URL it has never crawled, showing the link with no description. Worse, and this is the trap that catches people, blocking a page in robots.txt prevents Google from removing it. If you have a page you want gone from search, the correct method is a noindex meta tag or an X-Robots-Tag header on the page. But Google can only see that noindex tag if it is allowed to crawl the page and read it. Block the page in robots.txt and Google never fetches it, never sees the noindex, and the page can linger in results indefinitely. The rule is counterintuitive but critical: to remove a page from search, allow crawling and add noindex. To keep something genuinely private, use authentication, because robots.txt is a public file that anyone can read and that malicious bots ignore completely. One more limitation to internalise. robots.txt is a set of requests, not enforcement. Googlebot, Bingbot, and other reputable crawlers honour it. Scrapers, spam bots, and anything malicious read it, sometimes specifically to find the folders you tried to hide, and then request them anyway.
Robots.txt Generator - Worked Examples
Example 1 - A Normal Site That Wants to Be Found
This is the case for almost everyone. You want every page crawlable and you want to hand crawlers your sitemap so nothing is missed. Choose Allow All, leave crawl delay blank, and enter your sitemap URL. The output is three meaningful lines: the user-agent, an empty Disallow meaning nothing is blocked, and the sitemap location. This is a complete, correct robots.txt for a standard site, and it is genuinely all most sites ever need.
Default Access: Allow All Robots - Crawl Delay: blank - Sitemap: https://yoursite.com/sitemap.xml
User-agent: * / Disallow: / Sitemap: https://yoursite.com/sitemap.xml
Example 2 - A Staging Site That Should Not Appear in Search
A development or staging copy of a site should stay out of search results. Choosing Disallow All produces "User-agent: *" and "Disallow: /", which asks every crawler to request nothing. Understand the limit, though: this stops well-behaved crawlers from fetching your pages, but it does not guarantee removal from search, and if a staging URL is already indexed or linked externally it can persist. For genuine privacy use HTTP authentication, which actually prevents access, rather than relying on robots.txt.
Default Access: Disallow All Robots
User-agent: * / Disallow: /
Example 3 - A Small Host Under Crawl Pressure
If a site on modest shared hosting is being crawled aggressively enough to affect performance, a crawl delay can space out requests. Setting it to 10 asks crawlers to wait ten seconds between requests. This helps with Bing and some other crawlers, but it does nothing for Google, which ignores the directive and instead adjusts its own crawl rate automatically, adjustable in Search Console. Treat crawl delay as a Bing and Yandex tool, not a Google one.
Default Access: Allow All Robots - Crawl Delay: 10 - Sitemap: https://yoursite.com/sitemap.xml
Adds Crawl-delay: 10 to the allow-all file
Who Uses the Robots.txt Generator?
New Site Owners
Creating a first robots.txt for a freshly launched site, where the correct file is almost always the simple allow-all plus sitemap that this tool produces by default, and where the main value is knowing the file exists and points crawlers at the sitemap.
People Who Just Launched and Cannot Get Indexed
Checking whether an accidental Disallow is blocking their site, which is a common cause of a new site not appearing in search. A robots.txt left over from development containing Disallow: / will keep an entire site out of Google until it is corrected.
Owners of Staging or Development Sites
Generating a disallow-all file to discourage crawlers from a non-production environment, while understanding that this is a request rather than a guarantee and that real privacy requires authentication.
Small Site Owners on Shared Hosting
Adding a crawl delay to reduce server load during heavy crawling, with the correct expectation that it affects Bing and similar crawlers but not Google, which manages its own crawl rate.
Common Robots.txt Mistakes to Avoid
This is the most damaging mistake and it does the opposite of what people intend. Blocking a page in robots.txt does not remove it from search, and it actively prevents removal, because Google can no longer crawl the page to see a noindex tag. If you want a page gone from search, do the reverse: allow crawling and add a noindex meta tag or X-Robots-Tag header. Google fetches the page, reads the noindex, and drops it. Then, if you like, block it in robots.txt afterwards.
During development many sites carry a robots.txt containing Disallow: / to keep the unfinished site out of search. If that file survives the launch, the live site is invisible to Google and stays that way until someone notices, which can be weeks of lost traffic. The first thing to check when a new site will not index is whether robots.txt is accidentally blocking everything. This tool set to Allow All produces the correct launch file.
The file only works at the root of the domain, at yoursite.com/robots.txt. Placed in a subfolder such as yoursite.com/blog/robots.txt it is ignored entirely, and crawlers behave as if no file exists. The filename must also be exactly robots.txt in lowercase. Robots.TXT or robot.txt will not be found. After uploading, confirm it by loading yoursite.com/robots.txt in a browser.
robots.txt is a public file. Anyone can read yoursite.com/robots.txt, and listing a private folder there advertises its existence to exactly the people you want to keep out. Malicious bots ignore the directives and may treat your Disallow list as a map of interesting targets. Never rely on robots.txt for security. Protect sensitive areas with authentication or by keeping them off the public web entirely.
Robots.txt vs Noindex vs Authentication
These three are constantly confused, and choosing the wrong one is why pages get stuck in or fall out of search. Each does a different job. This table is the quickest way to pick the right one for what you actually want.
| You want to | Use | Why | This tool |
|---|---|---|---|
| Let crawlers see everything | robots.txt allow all | Standard, helps discovery via sitemap | Yes |
| Keep a whole staging site out | robots.txt disallow all | Discourages crawling, not guaranteed | Yes |
| Remove one page from search | noindex tag on the page | robots.txt cannot do this and blocks the fix | No, edit the page |
| Reduce crawl load (Bing) | Crawl-delay | Spaces out requests; ignored by Google | Yes |
| Reduce crawl load (Google) | Search Console crawl rate | Google ignores Crawl-delay | No, use GSC |
| Genuinely restrict access | HTTP authentication | robots.txt is public and advisory only | No, server config |
The key relationships, verified against Google and Bing documentation. An empty Disallow directive means allow everything; Disallow: / means block everything. Google publicly documents that it does not support the Crawl-delay directive and manages crawl rate itself, while Bing and Yandex do honour it. A URL blocked by robots.txt can still be indexed if linked externally, and blocking a URL prevents Google from reading a noindex tag on it, which is why removal requires allowing the crawl. robots.txt must resolve at the domain root to have any effect.
Frequently Asked Questions
Why Use the Robots.txt Generator on GlobalUtilityHub?
The Robots.txt Generator is part of our collection of 68 free online utilities designed to make your life easier. We understand that in today's fast-paced digital world, you need tools that are not only accurate but also respect your time and privacy. That's why our robots.txt generator runs entirely on the client side, meaning your data is processed instantly in your browser and never sent to any server.
Our commitment to a premium user experience means you won't find intrusive pop-ups or mandatory registration requirements here. Whether you are using this seo tool for professional work, academic research, or personal planning, you can count on a clean, ad-light interface that works perfectly on any device - from high-resolution desktops to small smartphone screens.
Every tool on our platform, including the Robots.txt Generator, is regularly updated to ensure compliance with modern standards and mathematical accuracy. By choosing GlobalUtilityHub, you are joining a community of millions of users who trust us for their daily calculation, conversion, and generation needs. Explore our other SEO Tools or check out our blog for deep-dive guides on how to optimize your productivity.