Free Robots.txt Generator Tool.
Robots.txt Generator
Create a custom robots.txt file for your website. This file tells search engines and AI crawlers which pages they can or cannot crawl on your site.
Enter the URL of your XML sitemap
Common Restrictions:
AI & LLM Crawlers (optional):
Control access for popular AI crawlers like GPTBot, Perplexity, Claude, and Google-Extended.
Other Specific Bots (optional):
Use carefully. Disallowing Googlebot or Bingbot can remove your site from search results.
Add any additional paths you want to block from search engines
A robots.txt file is a plain-text file placed at the root of your website—for example, https://yourwebsite.com/robots.txt — that instructs web crawlers and bots which pages or directories they are permitted or prohibited from accessing. It forms part of the Robots Exclusion Protocol, a widely accepted standard observed by all major search engines, including Google, Bing, and Yahoo.
For bloggers, publishers, and website owners, a correctly configured robots.txt file is one of the most cost-effective SEO improvements available. Without it, search engine crawlers may waste their crawl budget on low-value pages such as admin panels, tag archives, or internal search results—time and resources that could instead be spent indexing your best content.
Quick Fact: Google has confirmed that crawl budget matters for large websites. Even for smaller sites, unnecessary crawler activity on duplicate or private pages can dilute how efficiently your content is indexed.
How to Use This Free Robots.txt Generator
Our tool above requires no registration, no installation, and no technical knowledge. Follow these four steps to generate your customized robots.txt file in under two minutes.
Step 1: Enter your website URL
Provide your full domain, including the https:// protocol. This is used to construct the Host directive and auto-fill your sitemap path if you leave the sitemap field blank.
Step 2: Add your sitemap URL (optional but recommended)
If you have an XML sitemap—WordPress users typically find theirs at /sitemap.xml or /sitemap_index.xml — entering it here ensures search engines can discover it directly from your robots.txt file.
Step 3: Select your restrictions
Choose from common preset restrictions (admin directories, CGI-BIN, and temp files); configure AI and LLM crawler rules, manage specific SEO bots; and add any custom paths you wish to block.
Step 4: Click “Generate Robots.txt”
Your file is produced instantly. Copy it to your clipboard or download it directly as a robots.txt file ready for upload to your server.
Understanding the Robots.txt Syntax
The structure of a robots.txt file is straightforward. Each instruction block begins with a User-agent directive identifying the crawler, followed by one or more Allow or disallow directives specifying which paths the crawler may or may not access. A blank line separates each block.
# Allow all crawlers full access, except specific directories User-agent: * Disallow: /wp-admin/ Disallow: /cgi-bin/ Allow: / # Block OpenAI's GPTBot from training on your content User-agent: GPTBot Disallow: / # Block Google's AI training crawler User-agent: Google-Extended Disallow: / # Sitemap location Sitemap: https://www.yourwebsite.com/sitemap.xml
The * wildcard in User-agent: * applies the rules to every crawler that has not been given specific instructions elsewhere in the file. Rules listed under a specific user-agent name take precedence over wildcard rules for that particular bot.
Blocking AI and LLM Crawlers: Should You Opt Out?
Since 2023, a growing number of AI companies have deployed crawlers to scrape publicly accessible web content for training large language models. This has prompted considerable debate among publishers and content creators about whether — and how — to restrict such access.
Unlike search engine crawlers, AI training bots typically offer no direct benefit to your site’s discoverability or traffic. If your content is scraped for model training, you receive no attribution, no backlink, and no visitor. For this reason, many publishers are choosing to opt out by blocking known AI crawlers via robots.txt file.
| User-agent | Company | Purpose |
|---|---|---|
GPTBot | OpenAI | Training data for GPT models |
OAI-SearchBot | OpenAI | ChatGPT search index |
ChatGPT-User | OpenAI | Real-time browsing by users |
PerplexityBot | Perplexity AI | AI search engine indexing |
ClaudeBot | Anthropic | Training data collection |
Google-Extended | Gemini AI training opt-out |
Important: Blocking GPTBot does not block OAI-SearchBot, which powers ChatGPT’s search results. If you wish to exclude your site from both training data and ChatGPT search results, you must list each user-agent separately. Our generator handles this automatically when you select multiple bots.
Common Robots.txt Mistakes to Avoid
- Blocking Your Entire Site by Accident: The most damaging error is accidentally disallowing all crawlers from all content. The directive
Disallow: /underUser-agent: *will prevent every search engine from indexing your site. Always verify that your global wildcard block includes an explicitAllow: /after any specific disallow rules. - Using Robots.txt to Hide Sensitive Data: Robots.txt is a publicly accessible file. Any path you list in a
Disallowdirective is, by definition, visible to anyone who reads your robots.txt. For genuinely sensitive content, use server-side authentication, not robots.txt directives. - Blocking CSS and JavaScript Files: Googlebot renders pages visually and needs access to your CSS and JavaScript in order to accurately assess your page content and layout. Blocking these file types can negatively affect how your pages are understood and ranked.
- Placing the File in the Wrong Location: Your robots.txt file must reside at the root of your domain:
https://yourdomain.com/robots.txt. A file placed in a subdirectory such as this/blog/robots.txtwill not be recognized by crawlers. - Assuming All Bots Comply: Reputable crawlers from Google, Bing, and most legitimate SEO tools respect robots.txt. However, malicious bots and scrapers typically do not. Robots.txt is a directive, not a technical barrier — use additional security measures for true access control.
How to Add Robots.txt to a WordPress Site
WordPress 5.3 and later generates a virtual robots.txt file automatically via its built-in virtual file handling. There are two primary approaches for customizing it.
- Option A — Via Yoast SEO or Rank Math: Both plugins provide a built-in robots.txt editor under their respective settings menus. Paste the output from our generator directly into the editor and save. This is the recommended method, as it avoids directly editing server files.
- Option B — Upload directly to your server: Download the
robots.txtfile produced by our generator and upload it to the root directory of your hosting account using FTP or your hosting control panel’s file manager. Ensure it is placed alongside yourwp-config.phpfile, not inside the/wp-content/folder.
Tip: After uploading or saving your robots.txt, verify it is accessible by visiting https://yourdomain.com/robots.txt in your browser. You can also test it using Google Search Console’s Robots.txt Tester tool.
Frequently Asked Questions on Robots.txt Generator
Does robots.txt affect my Google rankings?
Indirectly, yes. Blocking low-value pages from crawling preserves your crawl budget for high-value content and prevents duplicate or thin pages from being indexed. However, robots.txt directives do not directly raise or lower a page’s ranking signals—they simply control crawler access.
What is the difference between robots.txt and a noindex tag?
A Disallow directive in robots.txt prevents a crawler from visiting a page. A noindex meta tag allows a crawler to visit the page but instructs it not to include the page in search results. Notably, Google cannot see a noindex tag on a page it is blocked from crawling, so never use both simultaneously on the same URL.
How often should I update my robots.txt file?
Review your robots.txt whenever you add new sections to your website, install new plugins that create new URL structures, or when new significant crawlers emerge (as has been the case with AI bots). An annual audit is a reasonable baseline for most blogs.
Do I need a robots.txt file if my site is small?
Even small sites benefit from a robots.txt file that, at minimum, points to the sitemap and restricts admin directory access. It establishes good hygiene and ensures no inadvertent exposure of backend paths occurs as your site grows.
Is it legal to block AI crawlers?
Yes. You are fully within your rights to instruct bots not to access your content via robots.txt. Reputable AI companies—including OpenAI, Anthropic, and Google—have publicly committed to honoring these directives.
