Robots.txt generator
robots.txt
5 rules for 1 group. Save it as robots.txt at the root of the domain.
User-agent: * Disallow: /wp-admin/ Disallow: /cart/ Disallow: /checkout/ Disallow: /?s= Allow: /wp-admin/admin-ajax.php Sitemap: https://www.example.com/sitemap.xml
- Note: robots.txt controls crawling, not indexing. To keep a page out of search results, use a noindex tag on the page and leave it crawlable so the tag can be seen.
How to use it · free, no signup
How to use the Robots.txt Generator
List the paths to block, any exceptions and the sitemap address to get a robots.txt with only the fields Google reads, checked for common mistakes. Runs in your browser.
01
Choose the starting point
Open to crawlers with exceptions, or closed while a site is being built.
02
List the paths
Folders and pages to block, and any exceptions inside them to allow.
03
Download robots.txt
Upload it to the root of the domain, so it opens at /robots.txt.
What robots.txt is for
A robots.txt file tells crawlers which addresses on a site they may request. Google’s introduction to robots.txt describes its main use as avoiding overloading a site with requests, and is plain about what it is not: a way of keeping a page out of Google. A blocked address can still be listed, without a description, if other pages link to it. Use robots.txt to keep crawlers out of areas with no value in search, such as carts, internal search results and admin screens.
The four lines Google reads
| Field | What it does |
|---|---|
User-agent: | Starts a group of rules for one crawler, or * for all of them |
Disallow: | A path the crawler should not request |
Allow: | An exception inside a disallowed path |
Sitemap: | The full address of a sitemap, for any crawler |
According to how Google interprets the robots.txt specification, other fields, crawl-delay included, are not supported. Paths are case sensitive, * matches any run of characters and $ marks the end of the address, so Disallow: /*.pdf$ blocks every address ending in .pdf.
Mistakes the generator checks for
- Paths without a leading slash. Rules match from the start of the path, so
admin/is written as/admin/. - Blocking resources. A rule that looks like it covers CSS, JavaScript or image folders gets a warning.
- A relative sitemap. The Sitemap line needs the full URL.
- A whole-site block left in place. Disallow: / under * is fine for a site not yet launched and disastrous after launch.
Testing before you upload
A rule that looks right can block more than intended, because the longest matching rule wins and allow beats disallow only on a tie. Paste the file and a few addresses into the robots.txt tester to see which rule decides each one. The Sitemap line should point at a real file; the XML sitemap generator builds one from a list of URLs.
Published by Koit Academy. Who runs it, how it is paid and how its tools are checked.
Questions
What people ask about the Robots.txt Generator
Does robots.txt keep a page out of Google?
Where does robots.txt go?
Why is there no Crawl-delay line?
Can robots.txt block AI crawlers?
Should I block my CSS and JavaScript files?
Related tools
Robots.txt Tester
Which rule allows or blocks a URL, and why
Open itXML Sitemap Generator
A valid sitemap.xml from a list of URLs
Open itMeta Tag Generator
Title, description, canonical and sharing tags in one block
Open itURL Slug Generator
Clean URL slugs from page titles
Open itSERP Preview Tool
See where a title and description will be cut
Open itLocal Business Schema Generator
LocalBusiness JSON-LD from your business details
Open it