Build a robots.txt file to control which bots can crawl your site.
What Is a Robots.txt Generator?
A robots.txt file is a plain text file that sits at the root of your domain, for example at yourdomain.com/robots.txt. It gives instructions to web crawlers about which parts of your site they may or may not request. Search engine bots such as Googlebot and Bingbot, SEO tools and many AI crawlers check this file before they crawl. Our free Robots.txt Generator builds a correctly formatted file from a few simple choices, including rules for specific bots, restricted folders, an optional crawl delay and your sitemap location.
Why Robots.txt Matters
Managing crawl budget
Search engines allocate a limited amount of crawling to each site. On large websites, blocking low-value areas such as internal search results, endless filter combinations or admin folders helps crawlers spend their time on the pages that matter.
Keeping crawlers out of private areas
Folders like /wp-admin/, /cgi-bin/ or staging directories do not need to be crawled. Blocking them keeps logs cleaner and reduces unnecessary server load.
Pointing to your sitemap
Adding a Sitemap line tells every crawler where to find your XML sitemap, which helps them discover new and updated pages quickly.
Controlling AI and third-party bots
Many site owners now decide whether AI training crawlers, such as GPTBot, ClaudeBot, Google-Extended or CCBot, and SEO tool crawlers, such as AhrefsBot and SemrushBot, may access their content. Robots.txt is the standard way to express that choice.
How Robots.txt Works
A robots.txt file is made of groups. Each group starts with one or more User-agent lines naming the crawler it applies to, followed by rules:
- User-agent: the name of the bot. An asterisk means all bots.
- Disallow: a path the bot should not crawl. An empty Disallow means nothing is blocked.
- Allow: an exception that permits a path inside a blocked folder.
- Crawl-delay: asks some bots to wait a number of seconds between requests. Google ignores this directive, but Bing, Yandex and others respect it.
- Sitemap: the full URL of your XML sitemap. It can appear anywhere in the file.
An important detail: a crawler follows only the most specific group that matches its name. If you create a group for Googlebot, Googlebot will ignore the rules in the asterisk group. That is why our generator repeats your restricted directories inside each specific bot group you allow.
Robots.txt Is Not a Security or Noindex Tool
It does not hide pages from search results
Blocking a URL in robots.txt stops crawling, not indexing. If other sites link to a blocked page, Google can still index the URL without its content and show it in results. To keep a page out of search results, allow crawling and add a noindex robots meta tag instead. You can create one with our Meta Tag Generator.
It does not protect sensitive data
The file is public, and anyone can read it. Listing secret folders in robots.txt can actually reveal them. Protect private areas with passwords and server permissions, not with robots.txt.
Well-behaved bots only
Reputable crawlers follow robots.txt, but malicious scrapers may ignore it. For abusive bots, use a firewall or security plugin.
How to Use the Generator
1. Choose the default rule
Most websites should leave “All robots” set to Allowed. Choose Blocked only for development sites or private projects that should never be crawled.
2. Set a crawl delay if needed
Only add a delay if a crawler is overloading your server. Remember that Googlebot ignores it.
3. Add your sitemap URL
Enter the full address, such as https://yourdomain.com/sitemap_index.xml for Rank Math or Yoast, or https://yourdomain.com/wp-sitemap.xml for the default WordPress sitemap.
4. List restricted directories
Add one path per line, starting with a slash. If you add /wp-admin/, the generator automatically adds an Allow line for /wp-admin/admin-ajax.php, which many WordPress themes and plugins need for front-end features.
5. Set rules for specific robots
Use the dropdowns to allow or block individual crawlers, for example to block AI training bots while allowing search engines.
6. Download and upload
Click Download to save robots.txt, then upload it to the root folder of your website using your host’s file manager or FTP. Many SEO plugins also let you edit robots.txt directly from the WordPress dashboard.
Example Robots.txt Files
Standard WordPress site
Allow all bots, block /wp-admin/ except admin-ajax.php and list the sitemap. This simple setup suits most business websites.
Ecommerce store
Allow all bots but block cart, checkout, account and internal search URLs, plus parameter-heavy filter pages that create near-duplicate content.
Site that opts out of AI training
Allow search engine crawlers but set GPTBot, ClaudeBot, Google-Extended and CCBot to Blocked.
Common Robots.txt Mistakes
- Blocking the whole site by accident: a single “Disallow: /” under the asterisk group, often left over from development, can wipe out organic traffic.
- Blocking CSS and JavaScript: Google needs these files to render pages properly. Do not block theme or plugin asset folders.
- Using robots.txt to remove indexed pages: blocked pages cannot be re-crawled to see a noindex tag, so they may stay indexed longer.
- Wrong file location: the file must be at the root of the host. A robots.txt inside a subfolder is ignored.
- Case and spelling errors: paths are case-sensitive, and misspelled directives are ignored.
Testing Your Robots.txt
After uploading, open yourdomain.com/robots.txt in a browser to confirm it is live. Use the robots.txt report in Google Search Console to see the version Google fetched and any parsing errors. Our Website SEO Checker also confirms whether a robots.txt file and sitemap can be found.
Pair It With a Sitemap
Robots.txt tells crawlers where not to go; a sitemap tells them where the important pages are. If you do not have a sitemap yet, build one with our XML Sitemap Generator and add its URL to your robots.txt.
Robots.txt and Subdomains
Each subdomain and protocol needs its own file. The rules at www.example.com/robots.txt do not apply to blog.example.com or shop.example.com, so create and test a separate robots.txt for every host you run.
Need Technical SEO Help?
Crawl control becomes more complex on large, multilingual or ecommerce sites. If you want an expert to review your robots.txt, sitemaps and indexing, contact Aazz Agency for a free consultation.
About the Robots.txt Generator
A robots.txt file tells search engine crawlers which parts of your website they may visit. This generator builds a correct file for you, including rules for Google, Bing and AI crawlers such as GPTBot and ClaudeBot.
How to use the Robots.txt Generator
- Choose the default rule for all robots.
- Add the folders you want to keep crawlers out of, and your sitemap URL.
- Set rules for specific bots if needed, then download robots.txt and upload it to your site root.
Why use this tool?
- Keep crawlers out of admin and duplicate areas
- Block or allow AI training bots
- Point search engines to your XML sitemap
Frequently asked questions
Where do I upload robots.txt?
In the root of your domain, so it is available at https://yourdomain.com/robots.txt.
Does robots.txt stop a page from being indexed?
Not reliably. It stops crawling, but a blocked URL can still be indexed if it is linked from elsewhere. Use a noindex meta tag to keep a page out of search results.