Get online today — Domain + Hosting at discounted prices View Combo Offers ›

robots.txt Generator

Build a robots.txt file, including rules for AI training crawlers.

One per line. Leave empty to use only the preset's rules.

Build a robots.txt file. Pick a preset for your platform, add your sitemap, and choose whether to block SEO crawlers or the AI training bots that have appeared in the last few years.

The output is ready to save as robots.txt in your site root — it must be at the root, since crawlers look nowhere else.

How it works

robots.txt tells crawlers which parts of a site they may request. It is a voluntary convention, not an access control: well-behaved crawlers honour it, and anything malicious ignores it entirely. Never use it to protect anything sensitive — you are publishing a list of the paths you would rather people did not visit.

The single most misunderstood point: Disallow does not remove a page from search results. It stops the page being crawled, not indexed. Google can still list a URL it has never fetched — showing the bare URL with no description — if other sites link to it. Worse, because it cannot crawl the page, it will never see a noindex tag there. To keep something out of the index, allow crawling and use noindex; to keep crawlers off a heavy path, use Disallow.

Other things worth knowing:

  • It must live at the domain root — /robots.txt. A file at /blog/robots.txt is ignored.
  • Rules are per host and protocol. https://example.com and https://www.example.com need their own files.
  • A crawler follows the single most specific matching User-agent block, and ignores the rest — so a named block must repeat any rules from * that should still apply to it.
  • Blocking CSS and JavaScript breaks Google's ability to render your pages and can materially hurt rankings. This was common advice years ago; it is now actively harmful.

On AI crawlers: GPTBot, ClaudeBot, Google-Extended and others honour robots.txt for training data collection. Blocking them is a policy decision, not a technical one — and note that blocking Google-Extended affects AI training only, not your normal Google Search ranking.

Frequently asked questions

Does Disallow remove a page from Google?

No. It prevents crawling, not indexing. Google can still list a blocked URL — usually as a bare link with no description — if other sites link to it. And because it cannot fetch the page, it will never see a noindex tag on it. Use noindex to remove a page, and allow crawling so it can be read.

Where does the file go?

At the domain root: https://example.com/robots.txt. Nowhere else is checked. Each hostname and protocol needs its own file, so www and non-www are separate.

Should I block AI crawlers?

That is a business decision. Blocking GPTBot, ClaudeBot and Google-Extended prevents your content being used for model training, but also removes you from AI-generated answers that might have cited you. Note Google-Extended affects training only — it has no effect on Search ranking.

Is robots.txt a security measure?

The opposite. It is public, and it enumerates the paths you would rather were not visited — which makes it a useful reconnaissance file for an attacker. Protect anything sensitive with authentication.

Should I block CSS and JavaScript?

No. Google renders pages to understand them, and blocking assets means it sees a broken layout. This was common advice a decade ago and is now actively damaging.

Why is my rule being ignored?

A crawler obeys only the single most specific User-agent block matching it. If you have a Googlebot block, Googlebot ignores the * block entirely — including rules you assumed still applied. Repeat anything that should apply to both.

Related tools

Need hosting that just works?

Free SSL, daily backups and 24×7 support on every Loudhost plan.

View Hosting Plans