Skip to content
ToolsFort home

Robots.txt Generator

Robots.txt generator: allow or block crawlers, add your sitemap, start from a WordPress preset and block AI bots, then copy or download the file.

Updated

Bing and some others obey it; Google ignores it.

Block AI crawlers

Well-behaved crawlers obey robots.txt. It does not stop scrapers that ignore it, and it does not remove content already collected.

Your robots.txt


    

Save the file as robots.txt in the root of your site, so it opens at https://yourdomain.com/robots.txt.

Create a robots.txt file in seconds with this robots.txt generator. Choose which paths crawlers may visit, point them to your sitemap, block AI crawlers if you want to, and get warnings about the mistakes that most often hurt rankings.

How to use the Robots.txt Generator

  1. 1 Pick whether crawlers are allowed or blocked, or start from a WordPress, WooCommerce or Laravel preset.
  2. 2 List the paths to disallow, any exceptions to allow, and your sitemap URL. Tick any AI crawlers you want to block.
  3. 3 Copy the result or download robots.txt and upload it to the root of your site.

Worked examples

Normal site with a sitemap

Input: Allow all, sitemap https://example.com/sitemap.xml

Result: User-agent: * Disallow: Sitemap: https://example.com/sitemap.xml

An empty Disallow line means nothing is blocked.

Block a folder

Input: Disallow /admin/

Result: User-agent: * Disallow: /admin/

Paths are case sensitive and start with a slash.

What robots.txt does

A robots.txt file is a plain text file at the root of your site (https://example.com/robots.txt). It tells well-behaved crawlers which parts of the site they may request. Search engines read it before they crawl.

It controls crawling, not indexing. A page blocked in robots.txt can still appear in search results if other sites link to it, usually with no description. To keep a page out of results, leave it crawlable and add a noindex tag instead.

The rules in plain words

  • User-agent names the crawler a group of rules applies to. * means all of them.
  • Disallow blocks a path. Disallow: /admin/ blocks everything under that folder. An empty Disallow: blocks nothing.
  • Allow makes an exception inside a blocked folder. When rules overlap, the most specific one wins.
  • Sitemap gives the full URL of your XML sitemap.
  • * matches any text and $ marks the end of a URL, for example Disallow: /*.pdf$.

Mistakes to avoid

  • Do not block CSS or JavaScript. Google needs them to render the page like a visitor sees it.
  • Do not use robots.txt for secrets. The file is public, and it lists exactly what you want hidden. Protect private pages with a login.
  • Check Disallow: /. On its own it blocks the whole site. It belongs on staging servers only.
  • Remember it is case sensitive. /Admin/ and /admin/ are different paths.

Blocking AI crawlers

You can list the user-agents of AI training and answer-engine crawlers and disallow them. Well-behaved crawlers respect the file, but scrapers that ignore robots.txt will not, and blocking does not remove content that has already been collected.

Frequently asked questions

Where do I put the robots.txt file?

In the top-level folder of your domain, so it opens at https://yourdomain.com/robots.txt. Each subdomain needs its own file. A robots.txt in a subfolder is ignored.

Does robots.txt remove a page from Google?

No. It stops crawling, but a blocked URL can still be listed if other pages link to it. Use a noindex tag, or remove the page, if you want it gone from results.

Should I block AI crawlers?

That is your decision. Blocking GPTBot, ClaudeBot and similar crawlers asks them not to use your content, but it can also reduce visibility in AI answers. It does not affect Google Search ranking.

Does Google obey Crawl-delay?

No. Google ignores Crawl-delay. Bing and some other crawlers respect it, and Google Search Console lets you limit its crawl rate.

How do I test my robots.txt?

Open yourdomain.com/robots.txt in a browser to check it is live, then use the robots.txt report in Google Search Console to see how Google reads it.

Esc