โœฆ SEO Tool ยท Interactive
โ† Back to seo

Robots.txt Generator

Build a valid robots.txt file with Disallow, Allow and Sitemap lines, plus rules for AI crawlers. Learn why blocking a page does not keep it out of Google.

โŒ• SEO Toolโšก Instant result
#
โŒ• 01 ยท OPTIMIZE

Telling search bots which paths to skip

Crawlers happily wander into /wp-admin/, filtered search pages and cart URLs that add nothing to search results. A robots.txt file at the root of your domain tells bots which paths to leave alone. Search engines check it before crawling anything else. A robots.txt generator builds the file with correct syntax. That matters, because one misplaced slash can block a whole site.

The file must open at https://yourdomain.com/robots.txt, in plain UTF-8 text. Each subdomain needs its own copy. Google reads only the first 500 KiB and ignores anything beyond that.

Robots.txt directives and how Google treats them

DirectivePurposeGoogle support
User-agentNames the crawler a group of rules applies to; * means allSupported
DisallowBlocks crawling of a pathSupported
AllowReopens a more specific path inside a blocked oneSupported
SitemapPoints to your XML sitemap by full URLSupported
Crawl-delayAsks bots to pause between requestsIgnored by Google, honoured by Bing
NoindexAn old unofficial ruleNot supported since 2019

Paths are case-sensitive, so Disallow: /Blog/ will not block /blog/. The * wildcard matches any run of characters. A $ marks the end of a URL, as in Disallow: /*.pdf$.

A sample robots.txt for a WordPress site

  • User-agent: *
  • Disallow: /wp-admin/
  • Allow: /wp-admin/admin-ajax.php
  • Disallow: /?s=
  • Disallow: /cart/
  • Sitemap: https://example.com/sitemap_index.xml

This keeps bots out of the admin area, internal search results and the cart. It leaves the AJAX endpoint open, since some themes call it to render content. Never block your CSS or JavaScript folders. Google needs those files to see pages the way visitors do.

Rules for AI crawlers

Many publishers now add groups for AI bots. GPTBot is OpenAI's training crawler, while OAI-SearchBot powers its search features. Google-Extended controls Gemini training use without touching Google Search. CCBot belongs to Common Crawl. Compliance is voluntary, so treat these lines as a request, not a lock.

Blocked is not hidden: robots.txt vs noindex

This is the most misunderstood point about the file. Disallow stops crawling, not indexing. If other sites link to a blocked URL, Google can still list it, usually without a description. Search Console reports these as "Indexed, though blocked by robots.txt".

To keep a page out of results, leave it crawlable and add a noindex robots meta tag or X-Robots-Tag header. Google has to crawl the page to see that instruction. Blocking the same URL in robots.txt hides the noindex and defeats the purpose.

The file is also public, and anyone can read it. Never list secret folders there, and protect private areas with a password. Whatever the ToolsMate robots.txt generator gives you, check the live file in the robots.txt report in Google Search Console.

# 02 ยท UNDERSTAND

How this SEO tool works

01

Enter the required information

Use the fields in the tool above and keep units and formats consistent.

02

Run the tool

Review the result shown in the output area.

03

Check the assumptions

Confirm that the result matches your situation before using it for a decision.

# 03 ยท FORMULA / LOGIC

Which formula or logic is used?

#A standard crawler rule set and sitemap line are generated.

This describes the core logic used by the tool. Check any assumptions that may affect your result.

โœฆ 04 ยท IMPORTANT

Things to know before using Robots.txt Generator

01

Use accurate inputs and keep units consistent.

02

Review the assumptions before using the result for a decision.

03

Compare important results with an independent or official source.

? 05 ยท FAQ

Frequently Asked Questions

Does robots.txt stop a page from appearing in Google?+

Not reliably. It stops Googlebot from crawling the page, but the URL can still be indexed if other pages link to it. To remove a page from results, use a noindex tag and keep the page crawlable.

Where do I upload the robots.txt file?+

Place it in the root directory so it loads at yourdomain.com/robots.txt. A copy inside a subfolder is ignored. On WordPress, SEO plugins such as Yoast and Rank Math let you edit robots.txt from the dashboard without FTP access.

What does Disallow: / mean in robots.txt?+

It blocks compliant crawlers from every page on the site. That is useful on a staging server but disastrous on a live one. Plenty of traffic drops after a relaunch trace back to this single line carried over from development.

Should I block GPTBot and other AI crawlers?+

It depends on your goals. Blocking training crawlers keeps content out of future model training, if the bot complies. OpenAI uses GPTBot for training and OAI-SearchBot for search features, so you can block one and allow the other.

Is an empty robots.txt file a problem?+

No. An empty file, or a Disallow line left blank, allows everything. A missing file returning a 404 is treated the same way. Trouble starts only when the server returns a 5xx error, which can make Google pause crawling.

How long does Google take to notice robots.txt changes?+

Google generally caches robots.txt for up to 24 hours, so most changes apply within a day. After a serious mistake, request a recrawl from the robots.txt report in Google Search Console.

Can I set different rules for Googlebot and Bingbot?+

Yes. Create a separate User-agent group for each crawler with its own Allow and Disallow lines. A crawler obeys only the most specific group matching its name. It ignores the general asterisk group once a named group applies.

โ—Ž 08 ยท CATEGORY HUBS

Explore TheToolsMate