Robots.txt Generator for Any Site

Create a correct robots.txt with presets for Blogger, WordPress and Shopify, block AI crawlers if you want, and test which pages Google may crawl.

Your platform

Block AI crawlers and SEO tool bots (optional)

These bots collect content for AI training or SEO databases. Blocking them does not affect Google or Bing search results. Well-behaved bots follow robots.txt; it is a request, not a lock.

Your robots.txt
  • 100% free
  • No sign-up
  • Blogger, WordPress & Shopify
  • Block AI crawlers
  • Check any robots.txt
  • Test any page

Why use our Robots.txt Generator?

A wrong line in robots.txt can hide your whole site from Google. Build a safe file with ready presets, block AI crawlers if you want, then check it line by line and test any page before you upload it.

4platform presets
12AI and SEO bots to block
10+mistakes checked
0sign-ups or emails
  • Platform presetsBlogger, WordPress, Shopify or any site.
  • Block AI crawlersGPTBot, ClaudeBot, Google-Extended and more.
  • Checks for mistakesFinds rules that block Google or hide your sitemap.
  • Test any pageSee if Googlebot may crawl a URL, and why.

What is a robots.txt file?

A robots.txt file is a small text file at the root of your website, at https://yourdomain.com/robots.txt. It tells search engine crawlers which parts of the site they may visit and where your sitemap is. A robots.txt generator writes that file for you, with the correct rules and spelling, so you don’t accidentally block Google from pages you want in search. Robots.txt controls crawling, not indexing. To keep a page out of Google, use a noindex tag instead (see the comparison below).

The simplest useful robots.txt allows everything and points to your sitemap:

User-agent: *
Allow: /

Sitemap: https://example.com/sitemap.xml

Where does robots.txt go?

Always in the root folder of the domain, never in a subfolder. Search engines only look at https://example.com/robots.txt. A file at /blog/robots.txt is ignored. Each subdomain needs its own file, so shop.example.com reads shop.example.com/robots.txt. Blogger, WordPress and Shopify create the file for you, and you edit it in their settings (see the platform sections below).

How to use the robots.txt generator

  1. Choose your platform: Any website, Blogger, WordPress or Shopify. Each preset fills in safe default rules and the right sitemap addresses.
  2. Enter your website address so the sitemap lines use your domain.
  3. Add folders or pages to block, one per line, for example /admin/ or /cart. Leave it empty if every page may be crawled.
  4. Optional: block AI crawlers or SEO tool bots such as GPTBot, ClaudeBot or AhrefsBot.
  5. Copy or download your robots.txt. The tool checks it for mistakes as you type and shows where to add it on your platform.
  6. Test a page with the built-in tester to confirm Google may crawl it.

Already have a robots.txt? Open the Check my robots.txt tab. It reads your live file, explains every problem in plain English and tests any page against it.

Robots.txt rules explained

RuleWhat it doesExample
User-agentNames the crawler the next rules are for. * means every crawler.User-agent: Googlebot
DisallowA path the crawler should not visit. An empty Disallow: blocks nothing.Disallow: /admin/
AllowA path that may be crawled, even inside a blocked folder.Allow: /admin/help
SitemapThe full address of your sitemap. You can list several.Sitemap: https://example.com/sitemap.xml
Crawl-delaySeconds to wait between requests. Bing respects it; Google ignores it.Crawl-delay: 10
* and $* matches any characters; $ marks the end of the URL.Disallow: /*.pdf$
#A comment. Crawlers ignore the rest of the line.# Staging rules

How Google decides which rule wins

  • Most specific group: Googlebot follows a User-agent: Googlebot group if there is one, and ignores the * group.
  • Longest rule wins: for /shop/sale, the rule Allow: /shop/sale beats Disallow: /shop/ because it is longer.
  • Allow wins a tie: if an Allow and a Disallow rule are the same length, the page may be crawled.
  • Paths are case-sensitive: Disallow: /Private does not block /private.

The tester in this tool follows exactly these rules and shows which line decided the result.

Robots.txt examples

Allow everything (most websites)

User-agent: *
Allow: /

Sitemap: https://example.com/sitemap.xml

Block a folder and filter pages

User-agent: *
Disallow: /admin/
Disallow: /*?sort=
Allow: /

Sitemap: https://example.com/sitemap.xml

Block one crawler, allow the rest

User-agent: GPTBot
Disallow: /

User-agent: *
Allow: /

Block everything (test or private site only)

User-agent: *
Disallow: /

Careful: “Block everything” is the most common robots.txt mistake on live websites. It is often left over from a test copy, and it stops Google from crawling the whole site. Remove it before launch.

Custom robots.txt generator for Blogger

Blogger lets you replace its default robots.txt with a custom robots.txt. The best custom robots.txt for Blogger keeps Blogger’s safe defaults, keeps the AdSense crawler allowed, and adds both of your sitemaps:

User-agent: Mediapartners-Google
Disallow:

User-agent: *
Disallow: /search
Disallow: /share-widget
Allow: /

Sitemap: https://myblog.blogspot.com/sitemap.xml
Sitemap: https://myblog.blogspot.com/sitemap-pages.xml
  • Mediapartners-Google is the AdSense crawler. An empty Disallow: lets it read every page so ads match your content.
  • Disallow: /search keeps search-result and label pages (/search/label/…) out of the crawl, because they only repeat your posts.
  • Two sitemap lines: Blogger’s default robots.txt lists only /sitemap.xml, so your static pages sitemap is easy to miss.

To add it, open Blogger → Settings → Crawlers and indexing, turn on Enable custom robots.txt, click Custom robots.txt, paste the file and save. Choose the Blogger preset above to get this file with your own blog address. To check that your Blogger sitemaps work and see how many posts they list, use our Blogger Sitemap Generator.

Custom robots header tags for Blogger

In the same settings section, Enable custom robots header tags controls the noindex and similar tags on each type of page. A safe setup:

SettingTickWhy
Home page tagsallYour homepage should be indexed.
Archive and search page tagsnoindexArchive and label pages repeat your posts.
Post and page tagsallYour posts and pages are what you want in Google.

Don’t combine a robots.txt block with a noindex tag on the same pages if you want them removed from Google. When a page is blocked in robots.txt, Google cannot crawl it, so it never sees the noindex tag.

Robots.txt for WordPress and Shopify

WordPress

WordPress creates a virtual robots.txt that blocks /wp-admin/ but keeps /wp-admin/admin-ajax.php open, because many themes and plugins need it. Edit it with Yoast SEO (Tools → File editor) or Rank Math (General Settings → Edit robots.txt), or upload a real robots.txt file to the root folder, which replaces the virtual one. Don’t block /wp-content/ or /wp-includes/: they hold the CSS and JavaScript Google needs to render your pages. Check which sitemap address your site uses (/wp-sitemap.xml or /sitemap_index.xml) in our WordPress sitemap guide.

Shopify

Shopify generates robots.txt automatically. It already blocks the cart, checkout, account and search pages and lists your sitemap. To add your own rules, for example to block AI crawlers, create a robots.txt.liquid template in Online Store → Themes → Edit code and add your lines below Shopify’s default code. The Shopify preset in this tool gives you only the extra lines to add.

Should you block AI crawlers?

AI companies use crawlers to collect text for training their models. You can ask them to stay away with robots.txt:

CrawlerCompanyUsed for
GPTBotOpenAITraining ChatGPT models
Google-ExtendedGoogleTraining Gemini. It does not affect Google Search.
ClaudeBotAnthropicTraining Claude models
CCBotCommon CrawlAn open web archive many AI models are trained on
PerplexityBotPerplexityPerplexity’s AI search

Blocking these does not change your Google or Bing rankings, because Googlebot and Bingbot are separate crawlers. It is a trade-off: blocking keeps your content out of AI training, but AI tools may then mention your site less. Also remember that robots.txt is a request. Reputable crawlers follow it, but it cannot technically stop a bot that ignores it.

Robots.txt vs noindex vs sitemap

robots.txtnoindex tagXML sitemap
ControlsWhat may be crawledWhat may be indexedWhat you want found
WhereOne file for the whole siteOn each pageA file listing your URLs
Keeps a page out of Google?Not reliably. A blocked page can still be indexed from linksYesNo
Use it forAdmin areas, filters, duplicate URL patternsThin or private pagesHelping Google find your important pages

The three work together. Your robots.txt should point to your sitemap, as explained in how to add a sitemap to robots.txt. Your sitemap should list only pages that are allowed and indexable. Don’t have a sitemap yet? Create one with our free XML Sitemap Generator.

Common robots.txt mistakes

  • Disallow: / left over from a test site blocks Google from everything.
  • Blocking CSS or JavaScript folders stops Google from rendering your pages properly.
  • A relative sitemap address such as Sitemap: /sitemap.xml. It must be the full URL.
  • Using Noindex: in robots.txt. Google stopped supporting it in 2019.
  • Blocking pages you want removed from Google. Use noindex and let Google crawl them instead.
  • Typos such as User agent or Dissallow. Crawlers silently ignore lines they don’t understand.
  • Blocking your sitemap’s folder, which leads to “Couldn’t fetch” in Search Console. See how to fix “Couldn’t fetch”.
  • A file larger than 500 KB. Google ignores everything after the first 500 KB.

How to check and test your robots.txt

  1. Open the file in your browser at https://yourdomain.com/robots.txt to confirm it is live.
  2. Run it through the Check my robots.txt tab above. It lists every problem with its line number.
  3. Test important pages with the tester to confirm Googlebot may crawl them.
  4. Check Google Search Console: Settings → robots.txt shows the version Google last read and any errors it found.
  5. Check your sitemap too, with our Sitemap Checker, and submit it to Google Search Console.

Frequently asked questions

Quick answers about our free Robots.txt Generator. Still have a question? Ask us through our contact page.

What is a robots.txt generator?

A tool that writes the robots.txt file for your website: the rules that tell search engine crawlers which parts of the site they may visit, plus your sitemap address. It saves you from typos and rules that accidentally block Google.

Where do I put my robots.txt file?

In the root folder of your website, so it opens at https://yourdomain.com/robots.txt. Search engines do not look for it anywhere else, and each subdomain needs its own file.

What is the best custom robots.txt for Blogger?

Keep the AdSense crawler (Mediapartners-Google) allowed, block /search and /share-widget for all other crawlers, allow everything else, and list both /sitemap.xml and /sitemap-pages.xml. The Blogger preset in this tool creates exactly that with your blog address.

How do I add a custom robots.txt in Blogger?

Open Blogger, go to Settings → Crawlers and indexing, turn on Enable custom robots.txt, click Custom robots.txt, paste your file and save.

What are the best custom robots header tags for Blogger?

A safe setup is: home page tags all, archive and search page tags noindex, and post and page tags all. Turn on Enable custom robots header tags in Settings → Crawlers and indexing to set them.

Does robots.txt stop a page from appearing in Google?

Not reliably. Robots.txt stops crawling, but a blocked page can still be indexed if other pages link to it. To keep a page out of Google, add a noindex tag and let Google crawl the page.

Should I block AI crawlers like GPTBot?

It is your choice. Blocking GPTBot, ClaudeBot, Google-Extended or CCBot keeps your content out of AI training and does not affect your Google or Bing rankings, but AI tools may then mention your site less. Reputable crawlers follow robots.txt; it cannot stop bots that ignore it.

Does Google follow Crawl-delay?

No. Google ignores Crawl-delay and adjusts its crawl speed automatically. Bing respects it, so only add it if your server struggles with Bing’s crawling.

How do I test my robots.txt?

Open the Check my robots.txt tab and enter your domain. It reads your live file, lists any problems with their line numbers, and lets you test whether Googlebot, Bingbot or GPTBot may crawl a page. Google Search Console also shows the version Google last read under Settings → robots.txt.

Is the robots.txt generator free?

Yes, completely free with no sign-up. Creating a robots.txt runs in your browser with no limit, and each visitor can check up to 60 live robots.txt files an hour.