Robots.txt Generator
Free robots.txt generator: build Allow/Disallow rules for Googlebot and AI crawlers, add CMS starter paths and your sitemap, then copy a clean file — no signup.
Free robots.txt generator — no signup. Output is crawl rules only; it does not authenticate users or hide secrets.
# Generated by serpvi robots.txt generator — review before publishing. # robots.txt manages crawl access; it is not authentication or secrecy control. User-agent: * Allow: / Disallow: /admin/ Disallow: /drafts/ Sitemap: https://example.com/sitemap.xml
Next step after running this check
Runs locally in your browser with zero pasted content sent to SerpVI servers.
Generate a robots.txt file
A robots.txt generator turns path policy into a root file crawlers fetch before they request URLs. Google's robots.txt introduction is explicit: the file manages crawl access. It is not a reliable way to keep a URL out of search results, and it is not authentication. Use the builder above for live preview, then publish at https://{host}/robots.txt on the host users actually hit.
AI crawler presets (GPTBot, ClaudeBot, and peers)
One-click AI packs insert named User-agent groups for GPTBot, ChatGPT-User, OAI-SearchBot, ClaudeBot, Google-Extended, Bytespider, and PerplexityBot. That matches what serious free generators ship in 2026 — without a suite signup wall. Tokens change; confirm the current name in each vendor's docs before you ship a block. Matching is by the published string; serpvi does not IP-validate crawler identity on this free tool (first-party bot scoring elsewhere is also UA-based).
| Token | Typical intent | Common pattern | Keep separate from |
|---|---|---|---|
GPTBot | OpenAI crawl / training-related fetch | Disallow: / to opt out sitewide | ChatGPT-User / OAI-SearchBot |
ClaudeBot | Anthropic crawler | Named Allow/Disallow group | * / Googlebot |
Google-Extended | Google AI / Gemini training control | Block Extended; leave Googlebot open | Googlebot |
Bytespider / PerplexityBot | ByteDance / Perplexity crawlers | Named Disallow if you opt out | Search crawlers you still want |
Worked clinic — block training-style AI crawls, keep user/search OpenAI fetches, leave Googlebot on *:
User-agent: *
Disallow: /admin/
Allow: /
User-agent: GPTBot
Disallow: /
User-agent: ChatGPT-User
Allow: /
User-agent: OAI-SearchBot
Allow: /
User-agent: ClaudeBot
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: Bytespider
Disallow: /
User-agent: PerplexityBot
Disallow: /
Sitemap: https://example.com/sitemap.xmlCMS starter templates
WordPress and Shopify-ish templates prefill the soft-URL paths most sites should keep out of the crawl queue (admin, cart, noisy query strings) while leaving the public catalog open. Treat them as drafts: remove anything your theme already handles, and never paste a staging Disallow: / into production.
| Template | Typical Disallows | Sitemap hint | Review before ship |
|---|---|---|---|
| WordPress | /wp-admin/ (with ajax Allow), /wp-includes/, search query, /wp-json/ | /wp-sitemap.xml | Plugin SEO packs may already emit robots — avoid conflicting files |
| Shopify-ish | /admin, /cart, /checkout, preview query junk | /sitemap.xml | Confirm theme/app routes you still need crawled |
User-agent: *
Allow: /
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Disallow: /wp-includes/
Disallow: /?*s=
Disallow: /wp-json/
User-agent: GPTBot
Disallow: /
User-agent: Google-Extended
Disallow: /
Sitemap: https://example.com/wp-sitemap.xmlHow to generate a robots.txt file (step-by-step)
- Decide which paths should not burn crawl budget (admin, drafts, faceted junk) vs which must stay open.
- Build rows per User-agent — or load a CMS template — then apply an AI pack if you have a training-crawl policy.
- Add an absolute
Sitemap:URL (protocol + host). Relative sitemap lines are a common silent miss. - Copy or download the same text the preview shows; deploy to the site root on the canonical host.
- Validate with the live robots.txt checker and spot-check money URLs under Googlebot.
Robots.txt syntax basics (Allow vs Disallow, Sitemap)
Per How Google interprets robots.txt and RFC 9309: paths are case-sensitive and should start with /; longer matching paths beat shorter ones; on a length tie, Allow wins over Disallow; empty Disallow: is treated as allow-all for that line; Sitemap takes a fully qualified URL and is not tied to a single User-agent. Google documents only User-agent, Allow, Disallow, and Sitemap as supported fields — Crawl-delay is ignored by Googlebot.
| Situation | What to write | What Googlebot does |
|---|---|---|
| Block a folder, keep a public subpath | Disallow: /admin/ + Allow: /admin/public/ | Longer /admin/public/ wins for that URL |
| Opt out one AI crawler only | Named User-agent: GPTBot + Disallow: / | Googlebot still follows * (if open) |
| Point crawlers at XML sitemaps | Sitemap: https://example.com/sitemap.xml | Discovery hint — still verify the sitemap file itself |
| Need the URL out of results | Do not rely on Disallow alone | Use noindex (crawlable) or auth — see Google's block indexing guidance |
Pre-launch diagnostic checklist
- Staging lock left on:
Disallow: /under*still live in production. - Wrong host: apex and www serve different robots.txt bodies.
- AI vs search mix-up: Google-Extended blocked in a group that also names Googlebot.
- Relative Sitemap: missing
https://so the line is ignored. - False security: Disallow used instead of login on private apps — scrapers ignore robots.txt.
- Indexation confusion: Disallow used when the real goal was noindex — fix with meta / X-Robots instead.
Where this fits next to search traffic
Crawl rules and click quality are related but not the same signal. Generate the file here, validate with the robots.txt checker, confirm sitemap URLs in the sitemap checker, and use how serpvi works plus connected data sources when you want Search Console coverage next to session drops on sites you connect. Browse other free SEO tools, including the SERP preview and UTM builder. For LLM-oriented summary files (not crawl rules), see the llms.txt generator.
Related tools
- Robots.txt Checker — Free robots.txt checker: fetch or paste a file, validate syntax, and test URLs against Googlebot and AI crawlers like GPTBot — no signup.
- AI crawler checker — Enter a public URL or paste robots.txt to see allow/disallow/unknown for GPTBot, ChatGPT-User, OAI-SearchBot, PerplexityBot and ClaudeBot, with evidence.
- llms.txt Generator — Create an llms.txt draft from your site name, summary, and key links. Spec-shaped Markdown in your browser — no crawl, no signup.
- Sitemap Checker — Free sitemap checker: find sitemap.xml, validate urlset or sitemap index, count URLs, and flag missing lastmod or malformed XML — no signup.
Questions
- How to generate a robots.txt file?
- Add User-agent groups with Allow/Disallow paths in the generator above (or start from a WordPress / Shopify-ish template), optionally set AI crawler packs, add an absolute Sitemap URL, then copy or download the file. Publish it at https://your-host/robots.txt — the same host users and crawlers hit — and re-check with a robots.txt checker after deploy.
- Is robots.txt legal?
- The Robots Exclusion Protocol is a voluntary convention (now also RFC 9309), not a statute that forces every client to obey. Reputable crawlers honor it; scrapers may ignore it. Disallow is not a substitute for authentication, paywalls, or access control.
- Is robots.txt still used?
- Yes. Google still fetches and caches robots.txt and documents User-agent, Allow, Disallow, and Sitemap. Named AI crawlers that publish a token (GPTBot, ClaudeBot, Google-Extended, and others) also read it. Treat it as crawl management, not as a way to keep URLs out of search results.
- Is bypassing robots.txt illegal?
- Whether ignoring robots.txt is unlawful depends on jurisdiction, contract terms, and what the scraper does with the data — robots.txt itself is not a criminal statute. Practically: never rely on Disallow to protect private apps; use login and server-side authorization.
- How do I add robots.txt to my site root?
- Serve a UTF-8 text file at the site root path /robots.txt on the exact host in the URL bar (www vs apex often differ). Static hosts: drop the file in the public root. CMS: use the theme/plugin robots setting or map the route. Confirm with a browser GET and Search Console’s robots tester when available.
- Does Disallow hide a page from Google Search?
- No. Google may still index a disallowed URL if other sites link to it, usually without a snippet. To keep a URL out of results, use noindex (and allow crawl so Google can see the tag) or require authentication. Pair this generator with a noindex checker when indexation — not crawl — is the goal.
- Should I block GPTBot and Googlebot the same way?
- Usually not. Googlebot controls Search crawl; GPTBot / Google-Extended / ClaudeBot are separate tokens for AI-related crawling. Use named User-agent groups so you can Disallow training crawlers while leaving Googlebot on your * rules.