Calculators Converters Generators Developer Tools Finance Tools Writing Tools SEO Tools
Blog About Contact

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

  1. 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.
  2. 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.
  3. 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.
  4. Click "Generate Robots.txt". The tool assembles the directives and displays the file in a text box.
  5. 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.
  6. Copy the file and save it as robots.txt, all lowercase. The filename must be exactly that.
  7. 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.
  8. 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

User-agent: * which crawler the rules apply to (* means all) Disallow: (empty) allow everything Disallow: / block everything Crawl-delay: N seconds between requests (ignored by Google) Sitemap: <url> absolute URL of your sitemap
User-agent
Crawler Target

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.

Disallow
Blocked Path

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.

Sitemap
Sitemap Location

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.

Inputs

Default Access: Allow All Robots - Crawl Delay: blank - Sitemap: https://yoursite.com/sitemap.xml

Result

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.

Inputs

Default Access: Disallow All Robots

Result

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.

Inputs

Default Access: Allow All Robots - Crawl Delay: 10 - Sitemap: https://yoursite.com/sitemap.xml

Result

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

⚠️Using Robots.txt to Remove a Page from Google

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.

⚠️Leaving a Development Disallow in Place at Launch

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.

⚠️Putting Robots.txt in the Wrong Location

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.

⚠️Trusting Robots.txt to Hide Sensitive Content

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 toUseWhyThis tool
Let crawlers see everythingrobots.txt allow allStandard, helps discovery via sitemapYes
Keep a whole staging site outrobots.txt disallow allDiscourages crawling, not guaranteedYes
Remove one page from searchnoindex tag on the pagerobots.txt cannot do this and blocks the fixNo, edit the page
Reduce crawl load (Bing)Crawl-delaySpaces out requests; ignored by GoogleYes
Reduce crawl load (Google)Search Console crawl rateGoogle ignores Crawl-delayNo, use GSC
Genuinely restrict accessHTTP authenticationrobots.txt is public and advisory onlyNo, 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

It is a plain text file at the root of your domain that tells search engine crawlers which URLs they may request. It sits at yoursite.com/robots.txt and is the first thing most crawlers check. Its main legitimate uses are allowing full access while pointing crawlers at your sitemap, or discouraging crawling of a non-production site. It controls crawling, not indexing, which is the most important thing to understand about it.
No, and this surprises people. A page blocked in robots.txt can still appear in search results if other sites link to it, shown as a bare URL with no description because Google was not allowed to read the page. To actually remove a page from search you need a noindex tag, and for Google to see that tag the page must be crawlable. Blocking it in robots.txt prevents the removal you wanted.
That is correct and intentional. "Disallow:" with nothing after it means disallow nothing, which is to say allow everything. It is the standard way to write an allow-all robots.txt. An empty Disallow allows the whole site; "Disallow: /" with a slash blocks the whole site. The empty line is not unfinished, it is the directive doing its job.
At the root of your domain, so it loads at yoursite.com/robots.txt. It does not work anywhere else. Placed in a subfolder it is ignored completely. The filename must be exactly robots.txt in lowercase. On most hosting this means the public root directory, the same folder that contains your homepage. After uploading, load the URL in a browser to confirm it is live.
No. Google publicly documents that it ignores Crawl-delay and instead manages its own crawl rate, which you can influence in Search Console. Bing and Yandex do honour the directive. So Crawl-delay is worth setting if aggressive Bing crawling is straining your server, but it will have no effect on Googlebot. This tool includes the field because it is valid for the crawlers that use it.
Not directly. This generator handles the common cases of allow all or disallow all, plus crawl delay and sitemap. To block specific paths you add lines by hand, for example "Disallow: /admin/" to block an admin folder. The syntax is simple: one Disallow line per path, each starting from the root with a leading slash. Generate the base file here, then add path rules manually if you need them.
It is not strictly required. If you have no file, crawlers assume they may crawl everything, which is often fine. But having one is good practice for two reasons: it lets you point crawlers at your sitemap for better discovery, and it gives you a place to add crawl rules later. A simple allow-all file with a sitemap line is worth having even if you block nothing.
No, and treating it as one is dangerous. The file is public, so anyone can read yours and see exactly which folders you listed. Listing a sensitive folder there tells attackers where to look. Malicious bots ignore the directives entirely. For anything that must stay private, use authentication or keep it off the public web. robots.txt is advisory guidance for cooperative crawlers, nothing more.
The asterisk is a wildcard meaning all crawlers. Rules under "User-agent: *" apply to every crawler that reads the file. You can write rules for specific crawlers by naming them, such as "User-agent: Googlebot", which is how sites give different instructions to different crawlers. This tool applies its rules to all crawlers, which is the right choice for the vast majority of sites.
First load yoursite.com/robots.txt in a browser to confirm the file is live and shows what you expect. Then use the robots.txt report in Google Search Console, which shows how Google reads your file, when it was last fetched, and whether it contains errors. If a page is not being crawled as expected, the URL Inspection tool in Search Console tells you whether robots.txt is the cause.

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.