Free Robots.txt Generator
Use this free robots.txt generator to create a robots.txt file in under a minute. Decide which search engines, AI crawlers and SEO bots can reach your site, block private folders, add your sitemap, then copy or download a file that is ready to upload. No signup.
Rules for specific crawlers
Leave a crawler on βSame as defaultβ unless you want it treated differently.
Search engines
AI crawlers
SEO tool crawlers
Restricted directories
Folders or pages no crawler should request. Start each path with a slash, for example /admin/.
Custom rules
Fine-tune access for any user agent. Wildcards work: * matches any characters and $ marks the end of a URL.
Everything runs in your browser and nothing you enter is sent anywhere. Review the file before you publish it: one wrong line can hide a whole site from search.
Results appear here.
Your robots.txt file
You edited the file by hand. Copy and Download use your edited version.
Upload the file to the root of your domain so it opens at https://yourdomain.com/robots.txt. You use the generated file at your own discretion.
Keep every page crawlable, every week
PilotDeck audits your whole site on a schedule, flags crawl blocks and indexing problems as they appear, and tracks whether AI assistants mention your brand.
Try our other free SEO tools
Work through the next item on your list without making an account. Each tool opens on its own page and runs straight away.
Technical SEO
- Robots.txt checkerTest any URL against your rules and see which crawlers are blocked
- Robots.txt generatorYou are hereWrite crawl rules and choose which AI bots get in
- Sitemap checkerLocate a siteβs XML sitemaps and flag broken entries
- Sitemap XML generatorPaste your URLs and get a sitemap.xml ready to upload
SERP and rankings
- Google SERP checkerLook up a pageβs position for any keyword on Google
- Bing SERP checkerSee how a URL ranks for a search term on Bing
- SEO title checkerMeasure title length and pixel width before publishing
- Meta description checkerPreview where a snippet gets trimmed in results
AI search and GEO
- AI crawlability checkerConfirm GPTBot, ClaudeBot and others can fetch your pages
- GEO content checkerJudge whether your copy is easy for AI to quote
- LLMs.txt generatorDraft a plain-text site summary written for language models
- AI visibility checkerFind out whether AI assistants name your brand
Keyword research
- AI keyword toolGet keyword ideas sorted by what searchers want
- LSI keywords generatorSurface related terms and semantic variations
- Keyword density checkerSpot overused phrases and measure repetition
- Semantic validatorTest how completely a page covers its topic
Content and writing
- Meta title generatorGet SEO title options drafted from your topic
- Meta description generatorDraft description options from your page copy
- Content outline generatorBuild a heading outline informed by live results
- Word counterCount words and estimate reading time
Social and YouTube
- YouTube title generatorWrite video titles that match your topic and keyword
- YouTube SEO tags generatorPick tags based on what viewers actually search
- Reddit threads finderSpot threads that rank and get cited in AI answers
- LinkedIn post optimizerTighten a post so it reads well and reaches further
What is a robots.txt generator?
A robots.txt generator turns a handful of plain choices into the text file that tells crawlers where they may go on your site. Instead of typing User-agent and Disallow lines by hand and hoping the syntax holds up, you pick options from a form and get a file in the format that Google, Bing and AI crawlers expect.
This robots.txt file generator covers more than the classic allow-or-refuse list. It names over 30 crawlers across search, AI and SEO tools, accepts custom rules for any user agent, and ships with templates for popular platforms. It also keeps your rules consistent: when one bot gets a group of its own, the folders you restricted for everyone are repeated inside that group, because a crawler that finds its own section stops reading the general one.
What is a robots.txt file?
It is a plain text file at the root of your domain that well-behaved bots read before they request anything else. The format belongs to the Robots Exclusion Protocol, which became an official internet standard, RFC 9309, in 2022. Each group in the file names one or more crawlers and then lists the paths they may or may not fetch.
What the file can and cannot do
It can
- Keep crawlers away from admin areas, carts and internal search pages.
- Stop bots wasting crawl budget on filter and sort URLs.
- Point every crawler to your XML sitemap.
- Allow or refuse individual AI crawlers.
It cannot
- Remove a page that is already in search results.
- Protect private files, since anyone can read the file.
- Stop scrapers that choose to ignore it.
- Rescue a site from a stray
Disallow: /.
Who uses a robots.txt generator
- SEO specialists and agencies set up crawl rules at launch and rebuild them after a site migration.
- Founders and site owners create a first robots.txt without learning the syntax.
- Developers keep a locked-down file for staging and a separate open file for production.
- Content and brand teams decide which AI tools may read and quote their pages.
How to create a robots.txt file with this generator
Most people finish in under a minute. Here is how to create robots.txt online with the tool above.
- Pick a starting point. Choose a blank file, Allow everything, Block everything, or a template for WordPress, WooCommerce, Blogger, Joomla, Drupal or Magento.
- Set the default rule. Allow all is right for almost every live website. Block all suits staging servers and private projects.
- Adjust individual crawlers. Set any search engine, AI crawler or SEO tool bot to Allowed or Refused. The AI shortcuts let you block model training while keeping AI search open in one click.
- List restricted directories. Add each folder or page that no crawler should request, starting with a slash.
- Add custom rules if you need them. Mix Allow and Disallow for any user agent, including wildcard patterns such as
/*.pdf$. - Add your sitemap and an optional crawl delay. Use the full sitemap address, including https://.
- Generate, review and save. Press Generate robots.txt, read the checks under the file, then copy it or download it. Upload it to your site's root folder and confirm it with the robots.txt checker.
Robots.txt syntax at a glance
A robots.txt file is a list of groups. Each group opens with one or more User-agent lines, followed by the rules for those crawlers. One directive goes on each line, and lines starting with # are comments.
| Directive | What it does | Example |
|---|---|---|
User-agent | Names the crawler the group applies to. An asterisk means every crawler. | User-agent: Googlebot |
Disallow | A path the crawler should not request. Left empty, it blocks nothing. | Disallow: /checkout/ |
Allow | Opens a path inside a blocked folder. | Allow: /media/logo.png |
Sitemap | The full URL of an XML sitemap. It sits outside groups and applies to all crawlers. | Sitemap: https://example.com/sitemap.xml |
Crawl-delay | Seconds to wait between requests. Bing and Yandex read it; Google does not. | Crawl-delay: 10 |
# | A comment for humans. Crawlers skip it. | # Staging rules |
Wildcards and matching
Paths are matched from the start of the URL and are case-sensitive, so /Blog/ and /blog/ are different rules. An asterisk stands for any run of characters and a dollar sign marks the end of the URL: Disallow: /*?sessionid= catches every URL carrying that parameter, and Disallow: /*.pdf$ catches every PDF. When an Allow and a Disallow rule both match, Google follows the longer, more specific one, and picks Allow if the two are equally long.
How groups decide which rules apply
A crawler obeys only the most specific group that names it. If Googlebot has its own group, it ignores everything under User-agent: *. This catches out many hand-written files, where a site blocks /admin/ for everyone, adds a Googlebot group for something else, and leaves the admin area open to Google. The generator avoids that by repeating your restricted directories in every named group that is allowed to crawl.
Robots.txt examples and templates
Each robots.txt example below is a complete file you can adapt. Swap in your own paths and sitemap address, or load the matching template in the generator to edit it there.
Allow all crawlers
The simplest valid file. Every crawler may fetch every URL.
User-agent: * Allow: / Sitemap: https://www.example.com/sitemap.xml
Disallow all crawlers
For staging sites and private projects only. Left on a live site, it hides every page from search.
User-agent: * Disallow: /
Block one folder for everyone
User-agent: * Disallow: /internal/ Disallow: /*?sort=
Refuse a single crawler
Everyone else keeps full access; only the named bot is turned away.
User-agent: * Allow: / User-agent: MJ12bot Disallow: /
WordPress robots.txt
A robots.txt for WordPress keeps the dashboard out of reach but leaves the AJAX endpoint open, because themes and plugins use it on the public site. There is no need to block /wp-includes/, which holds scripts Google uses to render your pages.
User-agent: * Disallow: /wp-admin/ Allow: /wp-admin/admin-ajax.php Disallow: /?s= Disallow: /search/ Sitemap: https://www.example.com/wp-sitemap.xml
Custom robots.txt for Blogger
Blogger's search and label pages create endless thin URLs, so a custom robots.txt for Blogger usually blocks /search while keeping the AdSense crawler fully open.
User-agent: Mediapartners-Google Allow: / User-agent: * Disallow: /search Allow: / Sitemap: https://yourblog.blogspot.com/sitemap.xml
Online store with filters
Carts, accounts and sorted or filtered listings rarely belong in search. Blocking their URL patterns saves crawl budget for products and categories.
User-agent: * Disallow: /cart/ Disallow: /checkout/ Disallow: /my-account/ Disallow: /*?orderby= Disallow: /*?filter_ Sitemap: https://www.example.com/sitemap_index.xml
How to manage AI crawlers in robots.txt
AI companies now publish names for their crawlers, and those names fall into three jobs. Training crawlers collect pages that may be used to build future models. Search crawlers build the index that AI assistants search when they answer and cite sources. User-triggered fetchers open a page because a person asked the assistant to read it. Each job can be allowed or refused separately.
| User agent | Operator | Job | Common choice |
|---|---|---|---|
GPTBot | OpenAI | Training | Your call |
OAI-SearchBot | OpenAI | ChatGPT search results | Allow |
ChatGPT-User | OpenAI | User-triggered fetch | Allow |
ClaudeBot | Anthropic | Training | Your call |
Claude-SearchBot | Anthropic | Claude search results | Allow |
Claude-User | Anthropic | User-triggered fetch | Allow |
PerplexityBot | Perplexity | Search index | Allow |
Perplexity-User | Perplexity | User-triggered fetch | Allow |
Google-Extended | Gemini training and grounding; does not affect Google Search | Your call | |
Applebot-Extended | Apple | AI training; does not affect Siri or Spotlight | Your call |
CCBot | Common Crawl | Open dataset used by many model builders | Often blocked |
Meta-ExternalAgent | Meta | Training | Your call |
Bytespider | ByteDance | Training | Often blocked |
Stay citable, opt out of training
Many publishers want AI assistants to recommend and link to them without handing their pages to model training. The Block AI training, keep AI search shortcut in the generator builds exactly that file:
User-agent: * Allow: / User-agent: GPTBot User-agent: ClaudeBot User-agent: Google-Extended User-agent: Applebot-Extended User-agent: CCBot User-agent: Meta-ExternalAgent User-agent: Bytespider User-agent: Amazonbot Disallow: /
What robots.txt will not do for AI
The file is a request. OpenAI and Perplexity both state that their user-triggered fetchers may not follow robots.txt, since a person asked for the page, and crawlers that do not identify themselves will not read it at all. If content must stay out of every AI tool, put it behind a login or block it at your firewall. To see whether AI assistants actually mention you once the doors are open, run the free AI visibility checker.
Common robots.txt mistakes and how to avoid them
A leftover Disallow: / from staging
A development site is often blocked completely, and that file gets copied to production at launch. Check the live file the day you go live, and again after every redesign or migration.
Blocking CSS, JavaScript or images
Google renders pages much like a browser. If stylesheets and scripts are blocked, it may misread your layout and content. Keep folders such as /assets/ and /wp-includes/ crawlable.
Using robots.txt to hide pages
A disallowed URL can still be indexed if other pages link to it; it just shows without a description. Google stopped honouring noindex lines inside robots.txt in 2019. Use a noindex meta tag or an X-Robots-Tag header instead, and leave that page crawlable so the tag can be seen.
Forgetting that named groups override the default
Rules under User-agent: * do not carry over into a group that names a crawler. Repeat any restriction you still need, or let the generator do it for you.
A relative sitemap address
Sitemap: /sitemap.xml is not valid. The line needs the complete URL, starting with https://.
The wrong file name or location
The file must be called robots.txt in lowercase, saved as plain UTF-8 text, and served from the root of each host. A copy in a subfolder is ignored, and blog.example.com needs its own file.
Expecting Crawl-delay to slow Google
Googlebot ignores the line and adjusts its pace based on how quickly your server responds. Crawl-delay only affects crawlers that support it, such as Bingbot and YandexBot.
How to upload and test your robots.txt
Upload the file to the top-level folder of your site so it opens at https://yourdomain.com/robots.txt. You do not need to submit it anywhere, because crawlers fetch it on their own. The exact steps depend on your platform.
- WordPressWordPress serves a virtual file by default. Edit it in your SEO plugin's file editor, or upload a real robots.txt to the root folder by FTP.
- BloggerSettings, then Crawlers and indexing. Switch on Enable custom robots.txt and paste the file.
- ShopifyShopify generates the file. To change it, edit the
robots.txt.liquidtemplate in your theme code. - Wix and WebflowBoth have a robots.txt field in their SEO settings. Paste the generated text there.
- Next.jsPlace the file in the
publicfolder, or return the rules fromapp/robots.ts. - Static sites and serversSave the file in the web root next to your home page's index file.
Test before and after you publish
Open the live URL in a browser to confirm the new version is being served, then run important pages through the robots.txt checker to see which crawlers each rule lets in. Google Search Console's robots.txt report shows the version Google last fetched, any lines it could not parse, and lets you ask for a fresh fetch. Google reads up to 500 KiB of the file and usually refreshes its cached copy within a day.
When to review your robots.txt
- At launch, to confirm the staging block is gone.
- After a migration or redesign, when folder names and URL patterns change.
- When you add a section, such as a store, a forum or a members area.
- When a new AI crawler appears that you want to allow or refuse.
- When pages stop getting indexed without an obvious reason.
One file, or the whole site?
A robots.txt generator gets the rules right on day one. Keeping them right is harder, because plugin updates, new templates and site changes can block pages without anyone noticing. PilotDeck's site audit watches crawlability across your whole domain and flags problems as they appear, and you can start a free trial to run it on your site.
Robots.txt generator FAQ
What is a robots.txt generator?
A robots.txt generator is a form that writes your robots.txt file for you. You choose which crawlers may visit and which folders stay off limits, and the tool turns those choices into correctly formatted User-agent, Allow, Disallow and Sitemap lines that you upload to the root of your site.
How do I create a robots.txt file?
Pick a template or a default rule in the generator above, set rules for any crawler you want to treat differently, list the folders to block and add your sitemap URL. Press Generate robots.txt, download the file, keep the name robots.txt in lowercase and upload it to the top-level folder of your domain so it loads at yourdomain.com/robots.txt.
Is robots.txt still used?
Yes. Google, Bing and other search engines still request the file before they crawl, and the protocol became an official internet standard, RFC 9309, in 2022. It matters even more now that AI companies publish named crawlers that read it.
Is bypassing robots.txt illegal?
The file is a voluntary convention, not a lock, and on its own it carries no legal force. Whether ignoring it creates legal risk depends on the country, the site's terms of use and what happens to the collected data, so ask a lawyer about a specific case. For anything that must stay private, use a login or firewall rules rather than robots.txt.
Where should I put my robots.txt file?
In the root of the host it applies to, for example https://www.example.com/robots.txt. A copy inside a subfolder is ignored, and every subdomain, such as shop.example.com, needs a file of its own.
Can robots.txt remove a page from Google?
No. Robots.txt controls crawling, not indexing, so a blocked URL can still appear in results, without a description, if other pages link to it. To keep a page out of search, let it be crawled and add a noindex meta tag or X-Robots-Tag header, or put it behind a login.
Does Google support Crawl-delay?
No. Googlebot ignores the Crawl-delay line and sets its own pace based on how quickly your server responds. Bing and Yandex do read it, so this generator adds the delay to every group except Google's crawlers.
Should I block AI crawlers in robots.txt?
It depends on what you want from AI tools. Blocking training crawlers such as GPTBot, ClaudeBot and Google-Extended keeps your content out of future model training. Blocking search crawlers such as OAI-SearchBot, Claude-SearchBot and PerplexityBot can remove you from AI answers and citations, so brands that want to be recommended usually keep those allowed.
How do I add a custom robots.txt in Blogger?
Choose the Blogger template in the generator, replace the sample sitemap address with your blog's own URL and copy the result. In Blogger, open Settings, go to Crawlers and indexing, switch on Enable custom robots.txt and paste the file.
Do I need to submit robots.txt to Google?
No. Crawlers fetch the file on their own. Google usually caches it for up to a day, so after a major change you can ask for a fresh fetch from the robots.txt report in Google Search Console.
Is this robots.txt generator free?
Yes. There is no account, no limit and no watermark in the file. The generator runs entirely in your browser, so nothing you enter is sent to PilotDeck.
Crawl rules are step one. Getting found is the rest.
PilotDeck researches what your buyers search, publishes content against it every month, audits your pages continuously, and tracks which AI engines name you.
LLM Trackers
Letting AI crawlers in is only half the job. PilotDeck also follows what the major AI assistants say about you, so you know where your brand is named, linked or left out.
ChatGPT trackerSee when ChatGPT brings up your brand, which prompts set it off and how it describes you.Explore ChatGPT visibility β
Perplexity trackerFind out whether Perplexity links to your pages as a source when it answers questions in your market.Explore Perplexity visibility β- AI citation analysisLearn which websites AI answers rely on for your topics, and whether your pages are among them.Explore AI citation analysis β