Sample robots.txt files
robots.txt is a text file at the root of a site: it tells search crawlers which sections to visit and which to leave alone. Below are ready-made files you can drop in as they are: a plain working one, the defaults of popular CMSs, blocking AI crawlers and scrapers, plus edge cases for testing your own parser
The basics
Defaults of popular CMSs
Ready-made for common jobs

Edge cases
🧠 Which rule wins
A crawler obeys exactly one group: the one whose User-agent matches it most closely. It does not also read the group under the asterisk, so rules never add up. Within that group the longest path match wins, and it is the length of the pattern that decides, not the order of the lines: Allow: /wp-admin/admin-ajax.php beats Disallow: /wp-admin/ even when it sits below it. On a tie Allow wins. There are only two special characters: * stands for any run of characters and $ pins the end of the URL. And the part everyone forgets: the file blocks crawling, not indexing. A page other sites link to can still turn up in results while being disallowed here, just without a description. To take it out of the index you need an X-Robots-Tag header or a noindex meta tag, and for that the page has to be crawlable in the first place.