This guide explains how to use Robots.txt Generator, step by step, with screenshots of the real tool. It is written for site owners, developers and SEOs who look after crawling, indexing and site health. This robots.txt generator builds a correct robots.txt file for your website. Choose a default rule, block private folders, add your sitemap and stop selected bots, then copy or download the file.
Quick answer: To use the Robots.txt Generator, open the free tool, choose the default rule for all bots, enter the crawl-delay, enter the sitemap URL and paste the disallow paths, then copy the text it creates. Everything runs in your browser, so there is no sign up and nothing you type is stored on a server.
On this page

What is the Robots.txt Generator?
txt generator. Allow or block search and AI bots, disallow folders, add your sitemap and download a correct robots.txt file in seconds.
Quick answer: A robots.txt file sits at yoursite.com/robots.txt and tells crawlers which paths they may fetch. Use User-agent to name a bot, Disallow to block a path, Allow for exceptions and Sitemap to list your XML sitemap. It controls crawling, not indexing. Build yours with the robots.txt generator and test it before upload.
How to use Robots.txt Generator step by step
-
Step 1: Open the Robots.txt Generator
Go to the Robots.txt Generator on hasnainsanmal.com. It loads with example values already filled in, so you can see how it works straight away. It works the same way on a phone, tablet or computer.
-
Step 2: Choose Default rule for all bots
Choose an option from Default rule for all bots. Options include Allow all and Block all. The example uses Allow all.
-
Step 3: Enter Crawl-delay
In the Crawl-delay (optional, seconds) box, type your own figure. The example uses 5, which you can replace.
-
Step 4: Enter Sitemap URL
In the Sitemap URL box, type your own value. The example uses https://example.com/sitemap.xml, which you can replace.
-
Step 5: Paste Disallow paths
Paste or type your text into Disallow paths (one per line). The example starts with: /wp-admin/ /cart/ /?s=.
-
Step 6: Paste Allow paths
Paste or type your text into Allow paths (one per line). The example starts with: /wp-admin/admin-ajax.php.
-
Step 7: Tick Block these bots completely
Tick Block these bots completely if you want this option, or leave it empty to turn it off.
-
Step 8: Tick GPTBot
Tick GPTBot if you want this option, or leave it empty to turn it off.
-
Step 9: Tick CCBot
Tick CCBot if you want this option, or leave it empty to turn it off.
-
Step 10: Read the results
The output appears inside the tool card. Change any input to compare different scenarios.

Screenshot of the Robots.txt Generator results. -
Step 11: Copy or download the output
Use Copy and Download robots.txt to take the result into your document, CMS, spreadsheet or report.
What does each field in the Robots.txt Generator mean?
| Field | What to enter | Example |
|---|---|---|
| Default rule for all bots | Choose one option (Allow all, Block all) | Allow all |
| Crawl-delay (optional, seconds) | A number | 5 |
| Sitemap URL | Your text | https://example.com/sitemap.xml |
| Disallow paths | Text, one item per line where asked | /wp-admin/ /cart/ /?s= |
| Allow paths | Text, one item per line where asked | /wp-admin/admin-ajax.php |
| Block these bots completely | Tick to turn on | GPTBot |
| GPTBot | Tick to turn on | GPTBot |
| CCBot | Tick to turn on | CCBot |
What does a worked example look like?
With the example inputs (Default rule for all bots: Allow all, Crawl-delay (optional, seconds): 5, Sitemap URL: https://example.com/sitemap.xml and Block these bots completely: GPTBot), the Robots.txt Generator returns: User-agent: * Allow: /wp-admin/admin-ajax.php Disallow: /wp-admin/ Disallow: /cart/ Disallow: /?s=
Replace the example with your own input to get your own result, then review it before you use it.
How do you get the best results from the Robots.txt Generator?
- Quick answer
- What is a Robots.txt Generator?
- How to use the Robots.txt Generator
- Re-check after every theme, plugin or server change.
- Confirm fixes in Google Search Console with URL Inspection.
For background, read the Google crawling and indexing documentation. If you are working on a related task, our guide on how to use the XML Sitemap Generator walks through it the same way. You can also browse all free Technical SEO Tools.
What mistakes should you avoid with the Robots.txt Generator?
- Testing on a staging copy and forgetting that the live site has different rules.
- Fixing one URL and not checking the template that created the problem.
- Changing URLs without adding 301 redirects.
Key terms
- Robots.txt
- A plain text file at the root of a website that tells crawlers such as Googlebot which paths they may or may not crawl. It controls crawling, not indexing, so a blocked URL can still appear in search if other pages link to it.
- Generative engine optimisation
- The practice of making content easy for AI search tools such as ChatGPT, Gemini, Perplexity and Google AI Overviews to find, understand and cite. It builds on SEO with clear answers, entities, structure and trusted brand mentions.
- Indexing
- The process in which Google stores a crawled page in its index so it can appear in search results. A page must be crawlable, return a 200 status code and not carry a noindex tag before it can be indexed.
- XML sitemap
- A file that lists the URLs you want search engines to find, often with last modified dates. Submitting it in Google Search Console helps new and deep pages get discovered faster, although it does not guarantee indexing.
- Google Business Profile
- The free Google listing that shows a local business in Maps and the local pack, with its address, hours, photos and reviews. A complete, accurate profile and genuine reviews are key local ranking factors.
Related free tools
Frequently asked questions
Is the Robots.txt Generator free to use?
Yes. The Robots.txt Generator is completely free, with no sign up, no daily limit and no watermark. It is one of more than 500 free SEO and marketing tools on hasnainsanmal.com.
Is my data stored when I use the Robots.txt Generator?
No. The Robots.txt Generator runs in your browser with JavaScript, so the values and text you enter are processed on your own device and are not sent to or saved on our server.
How accurate is the Robots.txt Generator?
It creates a solid first draft from your inputs. Always review and edit the output so it is accurate, specific and sounds like you before you publish or send it.
Does the Robots.txt Generator work on a phone?
Yes. The tool is built for screens from 360 pixels wide, so you can use the Robots.txt Generator on a phone, tablet or computer in any modern browser.
Can I use the Robots.txt Generator for client work?
Yes. You can use the results for your own sites and for client projects. Check the output first, and keep a note of the inputs you used so you can repeat the check later.
What should I do after using the Robots.txt Generator?
Apply the result on your page, campaign or document, then measure the effect. If you would like expert help, see the SEO services or message Hasnain on WhatsApp for a free recommendation.
How we checked this guide: every step and screenshot was taken from the live Robots.txt Generator on 2 November 2026. Further reading: Google SEO Starter Guide.




