Robots.txt Generator
Create a robots.txt file with crawl rules, sitemap links and AI crawler blocking, and test any URL against it.
* matches any characters; $ marks the end of the URL, e.g. /*.pdf$
Ignored by Google.
User-agent: * Disallow: /wp-admin/ Disallow: /?s= Disallow: /search/ Allow: /wp-admin/admin-ajax.php Sitemap: https://www.example.com/sitemap.xml
Test a URL
✗ Blockedby "Disallow: /wp-admin/" in the group for *
Uses Google’s rules: the most specific user-agent group applies, the longest matching path wins, and Allow wins a tie.
About this tool
robots.txt is a plain-text file at the root of your site (https://example.com/robots.txt) that tells crawlers which parts of the site they may fetch. Search engines use it to avoid wasting time on admin pages, internal search results and endless filter combinations, and since 2023 it is also the standard way to opt out of AI training crawlers such as GPTBot, ClaudeBot or Google-Extended.
This generator builds a valid file from templates for common setups, lets you block AI crawlers individually, adds your sitemap locations, and includes a tester that applies Google's matching rules, so you can check whether a specific URL is allowed before you upload the file.
How to use Robots.txt Generator
- Start from a template: allow everything, block everything, WordPress or an online shop.
- Adjust the Disallow paths (one per line) and add Allow exceptions for sub-paths that should stay crawlable.
- Tick the AI crawlers you want to block and add your sitemap URL.
- Test a few URLs with different user agents, then download robots.txt and upload it to the root of your domain.
Examples
Longest match wins
Disallow: /admin/ · Allow: /admin/public/ · test /admin/public/logo.png
Allowed (the Allow rule is longer and more specific)
End-of-URL anchor
Disallow: /*.pdf$
/files/a.pdf blocked · /files/a.pdf?x=1 allowed
$ means the URL must end there, so a query string escapes the rule.
Specific groups replace the * group
User-agent: * (Disallow: /admin/) and User-agent: GPTBot (Disallow: /)
GPTBot is blocked everywhere; Googlebot only from /admin/
A crawler follows only the most specific group that names it, not both.
What robots.txt can and cannot do
- It controls crawling, not indexing. A blocked URL can still appear in results (without a snippet) if other sites link to it. To keep a page out of Google, allow crawling and use a noindex meta tag, or protect it with a password.
- It is public and voluntary. Anyone can read it, and malicious bots ignore it, so never list secret paths there.
- Paths are case-sensitive and match from the start of the URL path. * matches any sequence of characters and $ anchors the end.
- Google ignores Crawl-delay; Bing and Yandex respect it. Google reads only the first 500 KiB of the file.
- Each host needs its own file: https://shop.example.com/robots.txt does not apply to www.example.com.
Blocking AI crawlers
AI companies publish the user-agent tokens of their crawlers. Training crawlers (GPTBot, ClaudeBot, CCBot, Google-Extended, Applebot-Extended, Meta-ExternalAgent) collect data for model training, while others (OAI-SearchBot, Claude-SearchBot, PerplexityBot) fetch pages to cite them in AI answers. Blocking the second group can remove your site from those answers.
Google-Extended and Applebot-Extended are not separate crawlers: they only control whether content fetched by Googlebot or Applebot may be used for AI. Blocking them does not affect your normal search rankings.
Frequently asked questions
Everything you need to know about this tool and data security.
Where do I put robots.txt?
In the root of each host, so it is served at https://yourdomain.com/robots.txt. A file in a subfolder is ignored. Most CMSs and hosts let you upload it or edit it in their settings.
What does an empty Disallow mean?
"Disallow:" with nothing after it allows everything. "Disallow: /" blocks the whole site. Mixing them up is one of the most common and costly SEO mistakes.
Should I block CSS and JavaScript?
No. Google renders pages like a browser and needs CSS and JS files to understand layout and content. Blocking them can hurt rankings.
How quickly do changes take effect?
Google usually caches robots.txt for up to 24 hours. You can request a refresh in the robots.txt report in Google Search Console.
Is my data safe when using this tool?
Yes, 100% safe. This tool operates entirely inside your web browser using client-side JavaScript and WebAssembly. Your data never touches any external server.
Related Tools
Turn a list of URLs into a valid sitemap.xml with optional lastmod, changefreq and priority, ready to submit to search engines.
Generate SEO meta tags, Open Graph and Twitter card tags for your page, with length checks and a social preview.
Percent-encode or decode URLs and query strings, and inspect every part of a URL.
Featured Projects tech-fun.net
Explore more AI & productivity tools
Nihongo GameBox
Master Japanese typing, Kana, and JLPT N5–N1 vocabulary through interactive retro arcade games.
ResumeGPT
Tailors CVs and cover letters to every job opportunity with a multi-agent LLM pipeline, job tracking, and scheduled discovery.
CollectMind
Turns your bookmarks into a searchable AI knowledge base — entirely on-device, powered by Chrome's built-in Gemini Nano.