How to use it
- Generate: keep Allow the site, list the folders crawlers should skip (such as
/admin/or/cart/), tick any AI crawlers to block and add your sitemap address. - Press Test this file, or open the Test tab and paste any robots.txt.
- Pick a crawler, list the addresses you care about and read the verdicts. Then download the file and upload it to your site's root.
How Google reads the rules
- A crawler obeys only the group for its most specific name: Googlebot-Image uses a
Googlebot-Imagegroup if there is one, otherwiseGooglebot, otherwise*. - Rules match from the start of the path.
*stands for any characters and$marks the end, so/*.pdf$covers every PDF. - Paths are case-sensitive:
/Fishdoesn't match/fish. - Google reads only the first 500 KiB of the file and ignores fields it doesn't support, such as Crawl-delay.
- If robots.txt is missing (a 404), Google crawls everything; if it fails with a server error, Google pauses crawling the site.
Example
With Disallow: / and Allow: /$ in the * group, the home page / is allowed, because /$ is the longer match, but /page.htm is blocked, because /$ only covers the root. With Allow: /folder and Disallow: /folder, /folder/page is allowed: the two rules are equally long, so the less restrictive one wins. Both cases come from Google's own specification, and the tester gives the same answers.
Checking the rest of your setup
Pair this with the XML sitemap generator for the Sitemap line, and with the meta tag generator for noindex tags. Fetching a live site's robots.txt from this page comes soon; until then, open the site's /robots.txt in your browser and paste it into the tester.