← Free tools

Robots.txt Checker

The Robots.txt Checker fetches the robots.txt file at the root of your domain and runs 6 checks on it: whether the file loads and parses, whether a sitemap is declared, whether major AI crawlers are blocked, whether the whole site is blocked, whether any lines are unsupported, and whether it's under Google's 500 KiB limit. It also prints the file.

Updated

Free, no account needed.

What the checker tests

CheckPasses whenWarns or fails when
File loads and parses/robots.txt returns 200 with at least one User-agent lineIt's missing, returns an error, or has no User-agent lines
Sitemap declaredThere's a Sitemap line with a full URLThere's no Sitemap line
AI crawlers allowedNo major AI crawler is blocked from the whole siteOne or more is blocked. The result names each one
No blanket blockThe User-agent: * group doesn't say Disallow: /It does, so every crawler that follows the file is kept out of the whole site
No unsupported directivesEvery line uses a directive crawlers readA line uses something crawlers ignore, like noindex
Size under 500 KiBThe file is under 500 KiBIt's larger. Google ignores everything past that point

How to read the result

The headline says the file is clean or counts the things to fix. Each check comes back as a pass, a warning or a fail, and the file is printed underneath so you can find the lines behind each one.

A missing file (a 404) is safe. Crawlers treat the site as open, so nothing is blocked, but you lose the chance to point them at your sitemap. A server error (5xx) is serious. Google stops crawling the site for the first 12 hours of the error, then falls back to the last copy it had.

What the server response means

Response for /robots.txtWhat Google does
200Reads the file and follows its rules
Redirect (3xx)Follows at least 5 redirects, then treats the file as missing
404 or another 4xxTreats the site as having no robots.txt and crawls everything
429 or 5xxStops crawling the site for the first 12 hours and keeps trying to fetch the file. After that it uses the last copy it had for up to 30 days, or crawls freely if it has none. If the errors last past 30 days, it crawls as if there were no file, unless the site is unavailable in general

Source: Google's robots.txt specification.

Robots.txt syntax

LineWhat it doesNotes
User-agentStarts a group of rules for one crawler, or * for all of themA crawler follows only the most specific group that matches its name. Names aren't case-sensitive
DisallowBlocks a pathPaths are case-sensitive. Disallow: with nothing after it blocks nothing
AllowOpens a path inside a blocked oneGoogle and Bing both read it
SitemapPoints crawlers to a sitemapUse the full URL. You can list several, anywhere in the file
Crawl-delayAsks a crawler to wait between requestsGoogle ignores it. Bing reads it
NoindexNothingGoogle stopped reading it in 2019. Use a noindex meta tag
* and $* matches any characters, $ marks the end of a URLDisallow: /*.pdf$ blocks every PDF

When an Allow and a Disallow both match a URL, Google uses the rule with the longer path. If they're the same length, Allow wins. Other crawlers may settle it differently, so avoid rules that overlap.

Example robots.txt files

A typical site. Crawlers can read everything except admin, cart and internal search pages.

User-agent: *
Disallow: /admin/
Disallow: /cart/
Disallow: /search

Sitemap: https://www.example.com/sitemap.xml

Block one crawler, allow the rest.

User-agent: *
Disallow: /admin/

User-agent: GPTBot
Disallow: /

Sitemap: https://www.example.com/sitemap.xml

GPTBot reads only its own group, so the /admin/ rule doesn't apply to it. Here that's fine, since it's blocked from everything. If you give a crawler its own group and still want private paths closed, repeat them in that group.

A staging site.

User-agent: *
Disallow: /

Use this only on a staging or test site. On a live site it hides every page. A password protects a staging site better, since a blocked URL can still show up in search results if other sites link to it.

For AI crawlers, the AI Crawler Checker has an example that allows AI search and blocks model training.

Robots.txt vs noindex

MethodStops crawlingKeeps the page out of search results
robots.txt DisallowYesNo. The URL can still appear if other pages link to it
noindex meta tag or X-Robots-Tag headerNoYes, once the page is crawled. Crawlers have to be allowed to fetch the page to see the tag
Password or loginYesYes

Don't block a page in robots.txt and add noindex to it. The crawler can't fetch the page, so it never sees the noindex.

Common robots.txt mistakes

  • A leftover Disallow: / from staging. The site launches and stays hidden.
  • Blocking CSS and JavaScript. Google needs them to render the page.
  • Using robots.txt to hide private pages. Anyone can read the file, so it lists the paths you meant to hide. Put them behind a login.
  • Expecting noindex or crawl-delay to work in Google. Google ignores both in robots.txt.
  • One file for every subdomain. Each subdomain and protocol needs its own file at its root, like blog.example.com/robots.txt.
  • Two groups for the same crawler. A CDN or plugin can add a block above yours that says the opposite. The AI Crawler Checker flags these as contradictory.
  • A firewall that overrides the file. A CDN or firewall can block crawlers even when robots.txt allows them. Cloudflare's defaults for new domains block AI training crawlers on pages that show ads. If you use a CDN, check its bot settings too.

How to edit robots.txt on common platforms

PlatformWhere to edit it
WordPressWordPress serves a virtual file by default. Edit it with an SEO plugin's file editor (Yoast SEO or Rank Math), or upload your own robots.txt to the site root
ShopifyEdit the robots.txt.liquid theme template. Shopify's guide has the steps
WixThe Robots.txt Editor, under Tools and settings in the SEO & GEO dashboard. Wix's guide has the steps
SquarespaceSquarespace generates the file and doesn't let you edit it. Its help center says so
Next.jsAdd app/robots.ts, or a static app/robots.txt. The Next.js docs show both

AI crawlers

The AI crawlers check fails when a major AI crawler is blocked from the whole site, and it names the ones it found. Each AI company usually runs more than one crawler. GPTBot is OpenAI's training crawler and ChatGPT search uses OAI-SearchBot, so a rule for one doesn't cover the other. Google-Extended is a robots.txt token and doesn't control AI Overviews.

For a per-crawler result and the full list tested, use the AI Crawler Checker.

Fixing the common problems

  1. If the file returns a 5xx error, fix the server first. Google stops crawling the site while it can't read the file.
  2. Remove the Disallow: / under User-agent: * if you want the site crawled.
  3. Delete or replace any line listed under unsupported directives. Move noindex rules into a noindex meta tag.
  4. Add a Sitemap line with the full URL of your sitemap.
  5. Remove the rules that block AI crawlers you want reading your pages.
  6. Deploy, open /robots.txt in a browser to check the live file, then run this checker again.

Related tools

Common questions

The robots.txt file goes at the root of the domain, like example.com/robots.txt. The checker looks in that spot, using the domain from the address you enter.
A Disallow rule stops crawlers from fetching the page. A blocked URL can still appear in search results if other pages link to it. To keep a page out of the index, use a noindex tag on a page crawlers are allowed to fetch.
Blocking GPTBot doesn't keep your site out of ChatGPT. GPTBot is OpenAI's training crawler. ChatGPT search uses OAI-SearchBot, which follows its own rules in robots.txt. Check both if you care about either.
A site doesn't strictly need a robots.txt file. Without one, crawlers treat the whole site as open. It's still worth having one to declare your sitemap and keep crawlers out of pages like cart and internal search.
The robots.txt checker reviews the whole file. To test one URL against Google's rules, use the URL Inspection tool in Google Search Console. The robots.txt report in Search Console shows the copy Google last fetched.
Google usually caches robots.txt for up to 24 hours. You can ask for a recrawl from the robots.txt report in Search Console.
One robots.txt file doesn't cover your subdomains. Each subdomain and protocol needs its own file at its root, like shop.example.com/robots.txt.
Whether to block AI crawlers depends on whether you want your pages used in AI answers. Blocking a search crawler like OAI-SearchBot can keep you out of ChatGPT search results, while blocking a training crawler like GPTBot doesn't. The AI Crawler Checker explains each one.

Related study: Which AI Crawlers Do the Sites ChatGPT and Google Cite Block?

Track your AI visibility every week

Peak Answer runs checks like these every week, then writes the content and gets the placements.

Start 7 day trial