Robots.txt Generator – Free Tool for WordPress and Any Website
Choose a preset, add the folders you want to block and your sitemap. Get a clean robots.txt file you can copy or download, with optional rules for AI crawlers like GPTBot.
Robots.txt Rules Explained
Robots.txt is a small text file at the root of your website. It tells search engine crawlers which parts of the site they should not visit.
| Line | Meaning | Example |
|---|---|---|
User-agent: | Which crawler the rules are for (* means all) | User-agent: * |
Disallow: | A path the crawler should not visit | Disallow: /wp-admin/ |
Allow: | An exception inside a blocked folder | Allow: /wp-admin/admin-ajax.php |
Sitemap: | Full URL of your XML sitemap | Sitemap: https://www.example.com/sitemap_index.xml |
Empty Disallow: | Nothing is blocked | Disallow: |
Common Robots.txt Mistakes
Disallow: / on a live site
This blocks your whole website. It often gets left behind after a site moves from staging to live.
Blocking CSS and JS
Do not block /wp-content/ or /wp-includes/. Google needs your styles and scripts to see the page properly.
Using it to hide pages
A blocked page can still show in Google if other sites link to it. Use a noindex tag instead.
Forgetting the sitemap
The Sitemap line helps every search engine find your pages, not just Google.
Test after uploading
Open yoursite.com/robots.txt in a browser, then check the robots.txt report in Google Search Console.
WordPress SEO plugins
Rank Math and Yoast let you edit robots.txt from the dashboard, so you do not need FTP.
Learn Technical SEO the Practical Way
Robots.txt is one small part of technical SEO. Learn crawling, indexing, site speed and Search Console with live websites in our small-batch classes in Coimbatore.
Frequently Asked Questions
Where do I put the robots.txt file?
In the root folder of your website, so it opens at yourdomain.com/robots.txt. In WordPress you can also edit it from Rank Math or Yoast.
What is the best robots.txt for WordPress?
A simple one: block /wp-admin/ but allow admin-ajax.php, optionally block internal search, and add your sitemap. Do not block CSS, JS or images.
Does robots.txt stop a page from appearing in Google?
No. It stops crawling, not indexing. To keep a page out of search results, use a noindex meta tag and let Google crawl it.
Should I block AI crawlers like GPTBot?
It is your choice. Blocking training crawlers such as GPTBot, ClaudeBot and Google-Extended keeps your content out of AI model training. It does not affect normal Google Search rankings.
Does Google follow Crawl-delay?
No. Google ignores Crawl-delay, so this tool leaves it out. Bing and some other crawlers support it.
Is this robots.txt generator free?
Yes. It is free, needs no login, and works in your browser.
More Free Digital Marketing Tools
All free, no sign-up. See all tools
