Robots.txt Generator
Build a complete robots.txt file with multiple user-agent blocks, AI bot rules, and sitemap reference.
Configure user-agent blocks with allow and disallow paths, optional crawl-delay, and a sitemap reference. The syntax-highlighted preview updates live as you build.
Quick presets
User-agent: *Allow: /Disallow: /admin/Disallow: /private/Disallow: /tmp/ Sitemap: https://example.com/sitemap.xml
Test a URL path
See which rule applies for any path + bot.
Place this file at yoursite.com/robots.txt. Robots.txt is a crawl hint — well-behaved bots respect it but it is not a security barrier, and a blocked URL can still be indexed if other pages link to it (use noindex on a crawlable page to keep it out of results).
Saved configurations
Use the "Save configuration" button above to save your current setup here.
Last updated:
Create a robots.txt file in minutes
This robots.txt generator builds a valid robots.txt file for your website without writing rules by hand. Add rules for one or many crawlers, block AI bots, add your sitemap, test any URL path, then copy the file or download it as robots.txt.
How to make a robots.txt file
- Enter your site URL. A
Sitemap:line pointing to/sitemap.xmlis added automatically, or you can enter a different sitemap URL. - Start from a preset — Allow all, Block all, Block AI bots or SEO default — or build your own.
- Add rule blocks. In each block choose the user-agents (Googlebot, Bingbot, GPTBot and others), then add Allow and Disallow paths and an optional crawl-delay.
- Use Test a URL path to check whether a page is allowed or blocked for a given bot.
- Download the file and upload it to the root of your domain, so it opens at
https://yourdomain.com/robots.txt.
Robots.txt example
User-agent: *
Disallow: /admin/
Disallow: /private/
Allow: /
User-agent: GPTBot
Disallow: /
Sitemap: https://example.com/sitemap.xml
This file lets every crawler visit the site except the admin and private folders, blocks OpenAI GPTBot completely, and tells search engines where the sitemap is.
Robots.txt rules explained
- User-agent — the crawler the block applies to.
*means every bot without its own block. - Disallow — a path the bot should not crawl. An empty
Disallow:allows everything. - Allow — re-opens a path inside a disallowed folder. When rules conflict, the longest matching path wins.
- Crawl-delay — seconds between requests. Bing respects it; Google ignores it.
- Sitemap — the full URL of your XML sitemap.
Common robots.txt mistakes
- Blocking CSS and JavaScript. Google needs your scripts and styles to render pages. Blocking folders such as
/assets/,/static/or/_next/can make pages look empty to Google and hurt rankings. - Using Disallow to hide a page from search. Disallow stops crawling, not indexing. To keep a page out of Google, use a
noindexmeta tag and leave it crawlable. - Leaving “Disallow: /” from a staging site on the live site, which blocks the whole website.
- Wrong location. The file only works at the domain root, not in a sub-folder.
Should you block AI bots?
AI crawlers such as GPTBot, CCBot, Google-Extended and anthropic-ai collect content for AI models. Blocking them does not affect your Google rankings. Some assistants also send visitors by citing sources, so decide per bot. The Block AI bots preset blocks the nine most common AI crawlers while keeping search engines allowed.
Frequently asked questions
Do I need a robots.txt file?
It is not required, but it is recommended: it points crawlers to your sitemap and keeps them out of admin, search and duplicate pages.
Where do I upload robots.txt?
In the root folder of your website, next to your home page, so it is reachable at /robots.txt.
How do I check my robots.txt is working?
Open yourdomain.com/robots.txt in a browser, then use the robots.txt report in Google Search Console to see the version Google fetched.
Related Developer Tools
Browse all tools from the same category.
Domain Authority Checker
Check Moz authority, page authority, spam score, and backlink metrics
Open toolSEO Audit Tool
Audit a website URL for technical SEO, metadata, headings, broken internal links, hreflang, canonical and X-Robots-Tag checks, with report exports
Open toolShowing 1-2 of 49