Hosting
Servers
Web Development Pricing
Resources
Get started → Log in
Home/Calculators/Robots.txt generator
Free tool · runs in your browser

Robots.txt generator
free, for WordPress or any site.

Pick a preset, add your rules and sitemap, then copy or download a ready robots.txt. Nothing is sent anywhere; it all runs on this page.

1. Start from a preset

The AI preset blocks GPTBot, Google-Extended and CCBot. It does not remove your site from Google Search.

2. Default policy

3. Rule groups

4. Sitemap

5. Crawl-delay (optional)

Google ignores Crawl-delay. Bing respects it. It is added to the * and Bingbot groups only.

Upload the file to the root of your site, so it opens at https://example.com/robots.txt.

What robots.txt is

robots.txt is a plain text file that tells search engine crawlers which parts of your website they may visit. Well-behaved crawlers such as Googlebot and Bingbot read it before they crawl, and follow it. It is a request, not a lock: it does not hide anything from people, and a bad bot can ignore it.

Where it lives

The file must sit in the root of the domain and be named exactly robots.txt, in lowercase, for example https://example.com/robots.txt. A file in a folder, such as /blog/robots.txt, is not read. Each host needs its own file: blog.example.com does not use the file from example.com.

Syntax: User-agent, Allow, Disallow, Sitemap

The file is made of groups. Each group starts with a User-agent line, followed by rules for that crawler.

  • User-agent names the crawler, or * for all of them.
  • Disallow gives a path the crawler should not fetch. An empty Disallow: blocks nothing.
  • Allow makes an exception inside a blocked path.
  • Sitemap gives the full URL of your sitemap. It stands alone and is not tied to a group.

Two wildcards work in paths. * matches any run of characters, and $ marks the end of a URL. For example, Disallow: /*.pdf$ blocks every URL that ends in .pdf. Paths are case sensitive, so /Photos/ and /photos/ are different. When two rules match, Google uses the most specific (longest) one.

User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php

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

Robots.txt blocks crawling, not indexing

This is the most misunderstood point. If a page is blocked in robots.txt, Google cannot read it, but it can still list the bare URL in results if other sites link to it. To keep a page out of search results, leave it crawlable and add a noindex meta tag: <meta name="robots" content="noindex">.

Do not combine the two. If you noindex a page and also block it in robots.txt, Google never fetches the page, so it never sees the noindex tag.

The same goes for the AI preset above. Blocking GPTBot, Google-Extended or CCBot asks those crawlers not to use your content for AI training. It does not remove your site from Google Search, because Googlebot is a different crawler.

Common mistakes

  • Blocking CSS and JavaScript. Google needs them to render your pages. Do not block folders that hold your styles and scripts.
  • Leaving Disallow: / on after launch. Staging sites are often blocked, and the file gets copied to the live site. Check /robots.txt on launch day.
  • Wrong case. /Admin/ does not block /admin/.
  • Missing the leading slash. Paths start with / (or *). The generator warns you if they do not.
  • Using it for secrets. The file is public. Anyone can read it, so never list private URLs there. Use a password or login instead.

Testing your robots.txt

Open https://example.com/robots.txt in a browser first. It should show plain text. Then use the robots.txt report in Google Search Console (under Settings). It shows the file Google last fetched, when it fetched it, and any errors or warnings. After a change, you can ask Google to recrawl the file from that report.

The WordPress virtual robots.txt

If there is no physical robots.txt in your WordPress folder, WordPress answers requests for /robots.txt with a virtual file it builds on the fly. By default it blocks /wp-admin/ and allows admin-ajax.php, which is what the WordPress preset above produces. SEO plugins can edit this virtual file. If you upload a real robots.txt, the real file wins. Also check Settings, then Reading: the "Discourage search engines from indexing this site" box should be off on a live site.

Blogger

Blogger makes a robots.txt for you. In Settings you can turn on "Custom robots.txt" and paste your own text there. Use full https:// sitemap URLs, and keep it short.

Uploading it on RapidServer

On RapidServer web hosting (cPanel hosting, from ₹49/mo (3-year plan) plus 18% GST) you can upload or edit robots.txt with the cPanel File Manager. Put it in your site's document root, usually public_html. Running a blog? WordPress hosting comes with WordPress pre-installed, and WordPress serves its own robots.txt that SEO plugins can edit. More free tools are on the calculators page.

Need a home for your website?

cPanel web hosting on LiteSpeed and NVMe in Mumbai, with free SSL and a 7-day money-back guarantee.

See web hosting

Frequently asked questions

Is a robots.txt file required?+
No. Without one, crawlers assume they may visit everything. A file is useful when you want to keep crawlers out of some areas, point to your sitemap, or block specific bots.
Will robots.txt keep a page out of Google?+
Not reliably. It stops crawling, but a blocked URL can still appear in results if others link to it. Use a noindex meta tag on a crawlable page instead.
What does User-agent: * mean?+
The asterisk means all crawlers. The rules under it apply to every bot that does not have its own, more specific group.
What does Disallow: / do?+
It asks the crawler to stay out of the entire site. It is fine for a staging site, but on a live site it can stop your pages being crawled, so remove it at launch.
Does Google respect Crawl-delay?+
No, Google ignores it. Bing respects it. Leave it empty unless a crawler is slowing your server.
Can I block AI crawlers and still appear in Google?+
Yes. Blocking GPTBot, Google-Extended and CCBot does not affect Googlebot, so your pages can still rank in Google Search. It only asks those bots not to use your content for AI training.
How long until a change takes effect?+
Google usually caches the file for up to a day. After editing it, check the robots.txt report in Search Console to see when the new version was fetched.
Chat with sales