Robots.txt Generator
A robots.txt file tells crawlers which parts of your site they may visit. Choose your rules, add your sitemap and copy the file. You can also decide whether AI crawlers may use your content.
Quick answer
Generate a robots.txt file with sitemap, blocked folders and optional rules for AI crawlers like GPTBot and CCBot. Free, no sign-up.
Choose which AI bots may read your site. Blocking training bots does not remove you from Google search.
How to use it
- Choose the default rule and list any folders to block.
- Add your sitemap URL and decide on AI bot rules.
- Generate, then copy or download the file and upload it to your site root.
Where to put the file
Save it as robots.txt in the root folder of your site so it loads at yourdomain.com/robots.txt. Crawlers look only in that location.
Should I block AI crawlers?
It depends on your goals. Blocking training crawlers stops them using your content, but sites that want to be cited by AI assistants often keep them allowed. Blocking is a choice, not a ranking requirement.
Robots.txt controls crawling, not indexing. To keep a page out of search results, use a noindex tag instead.
Frequently asked questions
What does robots.txt do?
It tells search and AI crawlers which URLs they may or may not fetch from your site.
Does robots.txt hide a page from Google?
Not reliably. A blocked URL can still be indexed if other sites link to it. Use a noindex tag to keep a page out of results.
Where do I upload robots.txt?
In the root folder of your site, so it opens at yourdomain.com/robots.txt.
Can I add my sitemap?
Yes. Add a Sitemap line with the full URL, and this tool does it for you.
Need help with SEO or a new website in Pakistan? See our SEO services or web design, or message us on WhatsApp.
How this topic connects: the layers of free seo and marketing tools
Search engines and AI assistants understand a subject through connected ideas. This map shows where this page sits and what to read or compare next.
| Topic layer | What it covers | Where to go |
|---|---|---|
| Core | Robots.txt Generator | This page |
| Topic hub | All free tools | Free tools |
| Tools and guides | Free resources for this topic | Free website SEO checker, Keyword density guide, UTM parameters guide |
| Next step | Get a written quote or help | Contact WCV Digital |
Questions answered on this page: What does robots.txt do? | Does robots.txt hide a page from Google? | Where do I upload robots.txt? | Can I add my sitemap?
About WCV Digital and this page
WCV Digital is a Karachi-based digital agency (Plot H 7/12C, Block 3 Nazimabad, Karachi 74600) offering web design, development, software and SEO. The business operates under Wholesale (WCV) Ltd, registered in the United Kingdom with Company No. 16571122. Last reviewed: November 2026 by the WCV Digital team. Rules, platforms and tool features change, so confirm current details before you commit.
More free tools
What a robots.txt file does
A robots.txt file sits at the root of your site, for example yoursite.com/robots.txt, and tells crawlers which areas they may visit. Search engines and AI bots check this file before crawling. A clear robots.txt saves crawl budget, keeps private areas such as admin panels and cart pages out of the crawl, and points bots to your sitemap.
This robots.txt generator writes the file for you from simple choices. Copy the result, upload it to your site root and test it.
The basic directives
- User-agent: which bot the rule applies to. An asterisk means all bots.
- Disallow: a path the bot should not crawl.
- Allow: an exception inside a blocked path.
- Sitemap: the full URL of your XML sitemap.
- Crawl-delay: a pause between requests, respected by some bots but not Google.
A simple, safe file for most business sites allows everything except admin or system folders and lists the sitemap on its own line.
robots.txt and AI crawlers
Many AI systems read robots.txt to decide whether they may use your content. User agents such as GPTBot, ClaudeBot, PerplexityBot and Google-Extended can be allowed or blocked separately. If you want your business to appear in AI answers, allow them. If you want to protect paid or private material, block them for those folders. Decide on purpose, because blocking by accident removes your brand from AI search.
Mistakes that hurt your SEO
- Blocking the entire site with Disallow: / after a staging launch.
- Blocking CSS or JavaScript files, which stops Google from rendering the page correctly.
- Using robots.txt to hide pages that should be removed, since a blocked URL can still be indexed from links.
- Forgetting the sitemap line.
- Uploading the file to the wrong folder.
To keep a page out of search results, use a noindex tag on a crawlable page, not a robots.txt block.
How to use the generator
- Select whether to allow all bots or set custom rules.
- Add paths you want to block, such as /admin/ or /cart/.
- Choose rules for AI bots.
- Enter your sitemap URL.
- Copy the file, name it robots.txt and upload it to the main folder of your website.
- Test it in Google Search Console.
After you publish
Open yoursite.com/robots.txt in a browser to confirm it loads as plain text. Use the robots.txt report in Search Console to check for errors, and the URL Inspection tool to test important pages. Review the file after every site redesign or migration. If you also want an AI-readable summary of your site, see our llms.txt generator and the sitemap generator.
Platform notes
WordPress sites create a virtual robots.txt and plugins can edit it. Shopify generates the file automatically and lets you customize it through a template. On custom PHP sites, upload the file by FTP or the file manager. Check your platform before you replace any existing rules.
Example robots.txt for a business website
A typical file starts with a rule for all bots, blocks private folders such as an admin area and a staging folder, allows the rest and ends with the sitemap address. It is only a few lines long. Short files are easier to maintain and less likely to contain mistakes that block important pages.
Testing before and after launch
Before a launch, make sure the file does not contain a site-wide block left over from development. After launch, request indexing for key pages and watch the coverage report. If pages show as blocked by robots.txt in Search Console, open the file and find the rule that matches those URLs.
robots.txt, noindex and canonical tags
These three tools do different jobs. Robots.txt controls crawling, noindex controls whether a crawled page appears in results and canonical tags tell search engines which version of similar pages to prefer. Using them together incorrectly can cause confusion, for example a noindex tag on a page blocked from crawling will never be seen by the bot.
Crawl budget and large sites
Crawl budget is the number of pages a search engine will crawl on your site in a given time. Small sites rarely worry about it, but large stores with filters and duplicate paths can waste it. Block endless filter and search result URLs in robots.txt, keep your sitemap clean and make internal linking clear so bots spend their visits on pages that matter.
Checklist before you go live
Confirm that the file is called robots.txt and sits in the root folder. Confirm that it does not contain a blanket Disallow for the whole site unless the site is intentionally private. Confirm that the sitemap line uses the full address with https. Confirm that CSS and JavaScript folders are not blocked. Finally, test a few key URLs in Search Console to make sure they are allowed. Keep a backup of the previous version so you can roll back if something goes wrong.
Free guide: robots.txt without the risk
A robots.txt file tells crawlers which parts of your site they may visit. One wrong line can hide your whole site from Google, so build it carefully and always test it.
What to block
- Admin areas, login pages and internal search results
- Cart, checkout and account pages on shops
- Duplicate filter and sort URLs that waste crawl budget
What never to block
- Your CSS and JavaScript files, because Google needs them to see the page
- Pages you want to rank
- The whole site with Disallow: / unless it is a private staging copy
robots.txt does not remove pages
A blocked page can still appear in Google if other sites link to it. To keep a page out of search, leave it crawlable and add a noindex tag instead.
AI crawlers
Bots such as GPTBot and ClaudeBot collect content for AI training. Blocking them is your choice. If you want to be quoted in AI answers, keep the search bots such as OAI-SearchBot and PerplexityBot allowed.
Install and test
- Generate the file and download it as robots.txt
- Upload it to the root, so it opens at yourdomain.com/robots.txt
- Use the Test path box here on your key pages and your blocked folders
- Check the file in Google Search Console and re-test after site changes
Questions people ask
Where does robots.txt go?
In the root folder of the domain, so it opens at yourdomain.com/robots.txt.
Does Disallow remove a page from Google?
No. It only stops crawling. Use noindex or remove the page to take it out of results.
Can I block only one bot?
Yes. Write a User-agent line with that bot name followed by its own rules.
Does every site need robots.txt?
It is not required, but it is recommended for pointing to the sitemap and controlling crawling.
Is the robots.txt generator free?
Yes, free to use.