SEO Tools

Robots.txt Generator

Create a correct robots.txt file in seconds. Choose what search engines may crawl, block private folders, point crawlers to your sitemap and decide whether AI training bots may read your content.

Generate robots.txt

Choose your options. The file updates instantly; upload it to the root of your website as robots.txt.

How to Create and Install robots.txt

  1. Choose whether crawlers may access your site by default, and pick a preset if you use WordPress or run an online shop.
  2. Add any folders you want to keep out of search, and paste your sitemap URL.
  3. Download the file and upload it to the root of your domain so it is available at https://yourdomain.com/robots.txt. In WordPress, SEO plugins such as Yoast and Rank Math let you edit it from the dashboard.
  4. Check it in Google Search Console's robots.txt report.

robots.txt Syntax

User-agent: *The rules below apply to all crawlers. Use a bot's name, such as Googlebot, to target one.
Disallow: /admin/Do not crawl URLs starting with /admin/.
Disallow: (empty)Nothing is blocked.
Allow: /wp-admin/admin-ajax.phpAn exception inside a blocked folder.
* and $Wildcard and end-of-URL, e.g. Disallow: /*.pdf$.
Sitemap:The full URL of your XML sitemap.

Common Mistakes

  • Leaving Disallow: / after launch. Developers often block staging sites and forget to change it, which removes the whole site from Google.
  • Using robots.txt to hide pages. Blocked pages can still appear in results if other sites link to them. Use a noindex meta tag or password protection instead, and do not block those pages, because Google must crawl them to see the noindex.
  • Blocking CSS and JavaScript. Google needs them to render your pages correctly.

Should I Block AI Crawlers?

Bots such as GPTBot (OpenAI), CCBot (Common Crawl) and Google-Extended collect content to train AI models. Blocking them does not affect your Google Search rankings. It is your choice: some publishers block them to protect their content, while others allow them so their brand appears in AI answers. Reputable AI companies respect robots.txt, but it is a request, not an enforcement mechanism.

Frequently Asked Questions

Where do I put the robots.txt file?

In the root folder of your website, so it loads at https://yourdomain.com/robots.txt. It does not work in a subfolder.

Does robots.txt remove pages from Google?

No. It only stops crawling. To remove a page from search results, use a noindex meta tag and let Google crawl the page.

Will blocking GPTBot hurt my SEO?

No. GPTBot and other AI training crawlers are separate from Googlebot. Blocking them does not change your Google rankings.

What is a good robots.txt for WordPress?

Allow everything except /wp-admin/, keep /wp-admin/admin-ajax.php allowed, and add your sitemap URL. Choose the WordPress preset above.