Free tool

Robots.txt Generator

Create a clean, valid robots.txt file in seconds. Start from a WordPress or WooCommerce preset, choose what crawlers can reach, add your sitemap and decide how AI bots can use your content.

Upload the file to the root of your site so it opens at example.com/robots.txt. Robots.txt controls crawling, not indexing: a blocked page can still appear in Google if other sites link to it. Use a noindex tag or a password to keep a page out of search. Google ignores Crawl-delay; Bing and some other crawlers follow it.

Quick answer

A robots.txt file tells search engine crawlers which parts of your site they may crawl. For most WordPress sites, block /wp-admin/, allow /wp-admin/admin-ajax.php and add your sitemap URL. Robots.txt does not stop pages being indexed, and blocking AI training bots like GPTBot does not affect Google rankings.

How to use the Robots.txt Generator

  1. Pick the WordPress or WooCommerce preset, or start from an empty file.
  2. Add any folders or URLs you want to keep crawlers out of, plus paths you want to allow.
  3. Paste your sitemap URL and decide whether to block AI training crawlers.
  4. Check the warnings, then copy or download robots.txt and upload it to the root of your site.

What is a robots.txt file?

A robots.txt file is a plain text file at the root of your website (for example example.com/robots.txt) that tells search engine crawlers which parts of the site they may crawl. Google, Bing and most well-behaved bots check it before they crawl your pages.

Each group starts with a User-agent line that names the crawler, followed by Disallow and Allow rules. A Sitemap line points crawlers to your XML sitemap.

Example robots.txt for WordPress

For most WordPress sites, a short file is best:

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

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

This keeps crawlers out of the admin area but lets them load admin-ajax.php, which some themes and plugins use on the front end. Rank Math and Yoast both create a sitemap at /sitemap_index.xml.

Robots.txt mistakes to avoid

Should you block AI crawlers?

AI companies use different bots for different jobs. Training crawlers such as GPTBot, ClaudeBot, CCBot and Google-Extended collect content to train AI models. Blocking them does not remove you from Google Search. AI search bots such as OAI-SearchBot, PerplexityBot and Claude-SearchBot fetch pages to answer questions and cite sources.

If you want your business to appear in AI answers, keep AI search bots allowed. Many publishers block training crawlers but allow search bots. This generator lets you choose each group separately. Want to know how visible you are in AI search? Read our guide to ranking in Google AI Overviews.

How to test your robots.txt

After you upload the file, open yourdomain.com/robots.txt in a browser to check it is live. In Google Search Console, the robots.txt report shows which robots.txt files Google found and any errors. Use the URL Inspection tool to check whether a specific page is blocked.

Want us to do it for you?

Manual, white-hat link building on real US and UK websites, reported live in Google Sheets.

Get a technical SEO auditBrowse 1,900+ sites

Frequently asked questions

Where do I upload robots.txt?

Upload it to the root folder of your website so it opens at yourdomain.com/robots.txt. On WordPress, Rank Math and Yoast also let you edit robots.txt from the dashboard.

Does robots.txt stop a page from being indexed?

No. It only controls crawling. To keep a page out of search results, use a noindex meta tag or password-protect the page, and do not block it in robots.txt.

Does Google follow Crawl-delay?

No. Google ignores the Crawl-delay rule and adjusts its crawl rate automatically. Bing and some other crawlers do follow it.

Will blocking GPTBot or Google-Extended hurt my SEO?

No. These are AI training crawlers. Blocking them does not affect how your site ranks in Google Search. Blocking Googlebot would.

Do I need a robots.txt file?

Not strictly. Without one, crawlers assume they can crawl everything. A simple file is still useful to point crawlers to your sitemap and keep them out of admin or search pages.

More free SEO tools

See all free tools