Robots.txt Generator

Create a properly formatted robots.txt file in seconds

No syntax guessing. This tool generates valid syntax every time to make sure that your entire site doesn't get de-indexed by accident, due to a misplaced slash in a hand-written robots.txt file. Create rules for each crawler, add the sitemap, and download/copy to upload.

Configuration workspace

Default Crawl Instructions

Custom Directories Rules

Robots.txt Output

# Robots.txt will populate here

What Is a Robots.txt File?

A robots.txt file is a plain text file that is located in the root of your website and communicates to search engine robots which pages they are permitted to crawl and which ones they should skip. It's a part of the Robots Exclusion Protocol, which is a standard that almost all significant search engines (Google, Bing and others) follow while crawling the web.

The first thing that a crawler such as Googlebot does on a site, before crawling any of your content, is to check for /robots.txt. The file that forbids a path will usually be ignored by the crawler. If no robots.txt file, then everything is assumed to be crawlable.

You should be careful to note that this file does not govern the crawling process, but rather the indexing process. Other sites can link to the page, and it may show up in search results (typically without an description) even if it has been blocked in a robots.txt file — robots.txt does not necessarily make a page disappear from search results, just a page that a search bot will not crawl. Instead, use a noindex meta tag, or password protection.

Creating a Robots.txt File (3 Step Guide)

  1. Configure default rule. Set whether to allow all crawlers by default (the most common setting — 'Allow All' — is enabled by default) or to block them by default.
  2. Add specific rules. Exclude directories that you don't want Google or other bots to crawl, and include per-bot rules for individual Google and Bing crawlers and the GPTBot.
  3. Include your sitemap and generate. Enter the URL of your sitemap, click the Generate button, and copy or download the generated robots.txt file. Upload it to your site's root directory, so that you can access it via yourdomain.com/robots.txt, not via yourdomain.com/yourfolder/robots.txt.

Robots.txt Syntax, Explained

Directive What It Does Example
User-agent Names which crawler the rules below apply to User-agent: Googlebot
Disallow Denies access to a particular path by a crawler. Disallow: /admin/
Allow Throws an exception in an unsupported path. Allow: /admin/public-file.html
Crawl-delay Asks for a delay (in seconds) between requests Crawl-delay: 10
Sitemap This plugin will help you get your XML sitemap linked. Sitemap: https://example.com/sitemap.xml

A minimal example that leaves everything as it is and refers to a sitemap:

User-agent: *
Allow: /
Sitemap: https://example.com/sitemap.xml

An example that would deny access to one bot in one folder, and give access to everyone else:

User-agent: Googlebot
Disallow: /nogooglebot/

User-agent: *
Allow: /

Note that the * rules are "all crawlers", that each group of rules begins with its own User-agent line and that the file paths are case sensitive — /Photo/ is a different directory from /photo/.

Errors That Can Actually Problem Your Site.

This is what people say little about when talking about generators, and it's why a generator is worth using instead of hand-writing the file:

  • The inadvertent full disallow. Deny: / under User-agent: * will deny access to all crawlers to your whole site. It's one character off target for Disallow: /admin/ and has inadvertently removed entire sites from search results.
  • Blocking personal CSS/JS. Blocking asset folders such as /wp-content/themes/ or /assets/js/ was used to be common practice; but today it is detrimental to your rankings as Google needs to see your page as a real user does to properly evaluate it.
  • Using robots.txt as a privacy measure. Occasionally, disallowed pages will appear in search results if they are linked to from other sites. Don't only use robots.txt to exclude a page from search if it really should not be indexed.
  • Case-sensitivity mismatches. The Disallow: /photo/ takes no effect if your actual folder is called /Photo/.
  • Listing individual files instead of the folder. Don't block the whole directory if you want to block all the files in it; It's easier to maintain and less likely to be mis-blocked.

Common bots that you can target.

Crawler Belongs To
GooglebotGoogle Search
Googlebot-ImageGoogle Images
BingbotMicrosoft Bing
DuckDuckBotDuckDuckGo
SlurpYahoo
YandexBotYandex
BaiduspiderBaidu
GPTBotOpenAI (GPT/ChatGPT Training Crawler)
ClaudeBotAnthropic
AhrefsBot / SemrushBotSearch engines other than those are called as SEO crawling tools.

If you want it specifically not included in AI training crawls, it's usually addressed through special Disallow rules for AI bots (GPTBot, ClaudeBot) that are distinct from those for search engine indexing crawls.

Frequently Asked Questions

Will robots.txt prevent a page from being indexed by Google?

No. Robots.txt does not affect whether a page will be visible in search results, only whether or not the crawler will visit the page. Sometimes it may appear on a blocked page even when it has no snippet in the snippet section (typically when other sites link to it). If you want to ensure that a page is not indexed, use a noindex meta tag.

If I want everything crawled, do I need a robots.txt file?

Not necessarily — if no robots.txt file is present, then everything defaults to being crawled. However, even though it is best practice to have one, even if it's just everything and redirecting to your sitemap, that's also a good way for the crawlers to know where to get your sitemap.

Where to upload the robots.txt file?

It should be located at the base of your domain, not in a subfolder, like yourdomain.com/robots.txt. Crawlers only index that particular page/location.

Disallow vs noindex?

Do not allow robots to access a page with Disallow in robots.txt. The noindex meta tag will allow the crawler to visit the page but not add that page to the search results. They solve different problems and sometimes they're used together, but a noindexed page must NOT be disallowed; otherwise the crawler won't see the noindex tag in the first place.

Is it possible to prevent AI crawlers such as GPTBot from accessing you while allowing search engines access?

Yes — include an extra User-agent block with the name of the specific AI crawler (such as GPTBot or ClaudeBot) that has its own Disallow rules; leave the Googlebot and Bingbot rules alone.

What is the reason crawl-delay?

It makes a crawler wait a certain number of seconds between requests to your server (can help on websites with limited server resources). It is not universally observed by all crawlers, like Google which does not use the Crawl-delay directive at all, but rather controls the crawl rate in Search Console.

Is there any risk that any errors in robots.txt will impact my entire site?

It will not take your site offline, but if you make a mistake such as adding an unrecognized Disallow: / command, then search engines will stop crawling your site and eventually remove your pages from their index — which, in reality, could be just as devastating.

What's the best way to test your robots.txt file?

Once uploaded, check yourdomain.com/robots.txt directly in a web browser to make sure it's accessible to the public, and then verify your robots.txt rules using a robots.txt testing tool (like the one in Google Search Console) to make sure they are interpreted as you expect.

Share This Tool

Browser Extension

Get quick access to remove the gemini watermark from the image and video directly from your browser toolbar.