What your robots.txt validation results and HTTP status codes mean
Crawlers fetch, parse, and evaluate /robots.txt using the official internet robots.txt standard (Internet Engineering Task Force (IETF) RFC 9309): one file applies strictly to its scheme, host, and port, groups are selected by crawler name, and conflicting rules resolve by longest-match pattern length. When the file cannot be retrieved cleanly, the HTTP status code itself determines crawler behavior. For complete syntax rules and deployment templates, see the robots.txt configuration guide.
| Validation State | Observed File or HTTP Condition | How Search Engines & AI Bots React | SEO and AI Crawl Impact |
|---|---|---|---|
| Valid 200 OK, clean syntax | Plain-text file fetched within 5 redirects and 500 KiB without syntax errors | Crawlers select the matching User-agent group and evaluate every URL by longest-match precedence | Predictable crawl control across search engines and compliant AI crawlers. |
| HTTP 404 or other 4xx (except 429) | No robots.txt served at the requested HTTPS origin | Treated as allow-all: crawlers assume no restrictions when no file exists | Every reachable path is crawlable; publish a valid file if any directory must be restricted. |
| HTTP 429 Too Many Requests | Rate limiter or Web Application Firewall (WAF) throttled the /robots.txt endpoint | Google treats HTTP 429 like a 5xx server error: crawling pauses instead of falling back to allow-all | Exempt /robots.txt from aggressive rate limits and bot challenges, then re-verify. |
| HTTP 5xx server error or timeout | Origin returned 500/502/503/504 or timed out while serving /robots.txt | Crawlers assume full disallow while unreachable. Google halts crawling for 0 to 12 hours, then reuses its last cached file for up to 30 days (or assumes no restrictions if no cached copy exists) | Fix origin or CDN availability immediately; do not edit rules to work around server outages. |
| HTML soft-404 or >5 redirects | 200 OK body starts with HTML (<!doctype / <html>) or redirect chain exceeds 5 hops | HTML produces no valid directives; Google stops following redirects after 5 hops and treats the file as 404 (allow-all) | Serve robots.txt directly with HTTP 200 and text/plain; keep canonical redirects to 1 hop. |
| Syntax errors, group traps, or CDN managed rules | Orphan directives, Sitemap between User-agent lines, wildcard override traps, or Cloudflare Managed prepends | Malformed lines are ignored; Sitemap does not split consecutive User-agent lines; managed sections evaluate together with origin rules by group and length | Inspect the validation findings and test key URLs against the combined served file. |
This validator never fabricates a rule verdict for a file it could not fetch. A failed HTTP lookup (404, 429, 5xx, timeout, or HTML soft-404) is reported strictly as a delivery observation because crawlers may temporarily operate on a cached robots.txt copy that no external tool can inspect.
How to fix robots.txt errors and update your CMS or Search Console
Fixing robots.txt errors across a Content Management System (CMS) or hosting edge starts with confirming plain-text HTTP 200 delivery, resolving syntax and group-override traps, checking managed prepends, and staging changes locally before triggering a Search Console recrawl:
- Verify clean HTTP 200 plain-text delivery first. Keep the response under 500 KiB (512,000 bytes) and within 5 redirect hops, eliminate HTML soft-404 responses, and remove optional UTF-8 Byte Order Mark (BOM) headers (
EF BB BF) if strict third-party tools reject line 1. - Fix all syntax and directive errors flagged by the checker. Remove rules appearing before the first
User-agent:line, replace fullhttps://URLs insideDisallow:with origin-relative paths starting with/, convert relativeSitemap:paths to absolute URLs, and replace deprecatedNoindex:directives (ignored by Google since September 1, 2019) withmeta robotsorX-Robots-Tagheaders. - Repeat global disallow rules inside named User-agent groups. A named block such as
User-agent: Googlebotcompletely overridesUser-agent: *, so any global rules that should still apply to Googlebot must be repeated inside it. Also check that you did not place aSitemap:line between twoUser-agent:lines, which leaves both crawlers merged into one shared group. - Inspect Content Delivery Network (CDN)-prepended rules and keep render assets crawlable. Never block CSS, JavaScript, or build directories (such as
/_next/static/,/_astro/, or/wp-content/themes/) needed for Googlebot rendering. If Cloudflare serves a managed robots.txt prepend, review the combined output and check our Cloudflare AI crawler controls reference before editing either layer. - Stage edits in the browser-local sandbox, deploy, then refresh Search Console. Click Edit in local sandbox on any live fetch, test your critical URLs across the 16-crawler matrix, download the updated
robots.txt, publish it, and verify the live origin again.
| Platform / Tool | Where to Edit or Inspect robots.txt | Operational Pitfall to Avoid |
|---|---|---|
| WordPress (native or SEO plugin) | Edit virtual robots.txt via your SEO plugin file editor or upload a static /robots.txt to the web root | Never block /wp-admin/admin-ajax.php or theme CSS/JS assets; confirm your static file does not conflict with virtual output. |
| Shopify | Customize templates/robots.txt.liquid in Online Store > Themes > Edit code | Extend default Shopify groups with Liquid filters rather than wiping built-in checkout and cart disallows. |
| Cloudflare (Managed robots.txt) | Review Security > Bots > Configure Bot Fight Mode / AI Crawl Control and Managed robots.txt | Cloudflare can prepend managed directives ahead of your origin file; always validate the combined served output. |
| Astro / Next.js / Static Frameworks | Place a static public/robots.txt file or generate robots.txt via a route handler (app/robots.ts) | Keep /_astro/ and /_next/static/ crawlable so Googlebot can load JavaScript and CSS for rendering. |
| Wix / Squarespace | Edit under SEO Tools > Robots.txt Editor (Wix) or Settings > Crawlers (Squarespace) | Managed platforms lock core system paths; verify custom additions in the local sandbox before saving. |
| Google Search Console recrawl | Open Settings > Crawling > robots.txt (replaces the legacy Tester retired in December 2023) | Click Request a recrawl after deploying fixes; Google normally refreshes cached robots.txt files within 24 hours. |
Verify robots.txt from the command line (curl)
# 1. Inspect HTTP status, redirect chain (max 5 hops), Content-Type, and Cache-Control
curl -sSIL https://example.com/robots.txt | grep -iE '^(HTTP/|location:|content-type:|cache-control:)'
# 2. Measure the exact UTF-8 byte size against the 500 KiB (512,000 byte) parsing limit
curl -sSL https://example.com/robots.txt | wc -c
# 3. Compare responses served to Googlebot and GPTBot user-agent strings
curl -sSL -A "Googlebot/2.1" https://example.com/robots.txt | head -n 30
curl -sSL -A "GPTBot/1.0" https://example.com/robots.txt | head -n 30
# 4. Check the first 3 bytes for a UTF-8 BOM (ef bb bf)
curl -sSL https://example.com/robots.txt | head -c 3 | xxd These four commands measure response headers, exact UTF-8 byte count, user-agent variation, and leading BOM bytes directly from your terminal. Keep in mind that sending a crawler user-agent header from your own IP does not prove how your firewall treats verified crawler IP ranges. For policy templates by bot class, review how to block AI crawlers and how to allow AI crawlers.
robots.txt directives, rule matching, and Google crawler inheritance
This reference summarizes the 10 core directives, URL matching rules, and non-standard extensions from the official internet robots.txt specification (IETF RFC 9309) and Google's crawler documentation:
| Directive / Rule | Syntax Example | Matching and Precedence Behavior | Crawler Support and Notes |
|---|---|---|---|
| User-agent: | User-agent: Googlebot | Case-insensitive crawler name match; an explicit group ignores *; duplicate groups for the same bot combine | Universal; never add spaces or version slashes like Googlebot/2.1. |
| Disallow: | Disallow: /admin/ | Case-sensitive prefix match from /; an empty Disallow: imposes no restriction | Universal across compliant search and AI crawlers. |
| Allow: | Allow: /admin/public.html | Overrides any shorter or equal-length Disallow: pattern in the same active group | Supported by Google, Bing, Apple, and major AI crawlers. |
| Longest-match & tie-breaker | Allow: /page (5) vs Disallow: /*.htm (6) | Longest matching pattern in UTF-8 bytes wins; exact length ties go to Allow: | Rule order inside a group does not decide precedence. |
| Wildcard * and end anchor $ | Disallow: /*.pdf$ | * matches zero or more characters; trailing $ anchors the end of path plus query string (mid-pattern $ is literal) | Supported by Googlebot, Bingbot, and modern AI crawlers. |
| URL encoding & #fragments | /café == /caf%C3%A9; /a%2fb == /a%2Fb | #fragment is stripped before matching; unreserved ASCII escapes decode; hex case normalizes; non-ASCII UTF-8 percent-encodes; encoded %2F stays distinct from / | This validator normalizes both tested paths and rule patterns identically. |
| Sitemap: | Sitemap: https://example.com/sitemap.xml | File-level absolute URL independent of groups; placing Sitemap: between consecutive User-agent: lines does not split the group | Multiple Sitemap lines allowed; relative URLs flagged as errors. |
| 500 KiB file size limit | 512,000 bytes (UTF-8) | The standard sets 500 KiB as the minimum parser buffer and Google stops parsing at 500 KiB; trailing lines are ignored | Both live fetches and local drafts enforce and report the 500 KiB limit. |
| HTTP 4xx, 429, and 5xx | 404 vs 429 vs 503 | 4xx (except 429) = allow-all; 429 and 5xx = Google 0 to 12h crawl halt, then up to 30 days on last cached file (or allow-all if none cached) | Each delivery failure displays as inconclusive instead of a fake rule verdict. |
| Non-standard & deprecated directives | Crawl-delay:, Noindex:, Host:, Clean-param:, Content-Signal: | Outside the core robots.txt standard: Bingbot honors Crawl-delay: (Google ignores it; Yandex deprecated it in Feb 2018); Google dropped Noindex: in Sept 2019; Yandex deprecated Host: in 2018 while keeping Clean-param: | Cloudflare Content-Signal: and all legacy directives are flagged clearly by the linter. |
Crawler token inheritance and wildcard-exclusion rules
Not every crawler resolves User-agent: * the same way. This validator models these crawler inheritance rules inside both the single-crawler tester and the 16-crawler access matrix:
| Crawler Class | Group Resolution Order | Practical Effect |
|---|---|---|
| Standard search and AI crawlers (Googlebot, Bingbot, Applebot, GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot) | Exact named group -> User-agent: * -> implicit allow | Once an explicit group matches the token, User-agent: * is ignored completely. |
| Google shared-token sub-crawlers (Googlebot-Image, Googlebot-News, Googlebot-Video, Google-InspectionTool, Google-CloudVertexBot) | Exact named group -> User-agent: Googlebot -> User-agent: * -> implicit allow | Sub-crawlers inherit User-agent: Googlebot before falling back to * (GoogleOther-Image/Video similarly inherit GoogleOther). |
| Google special-case crawlers (AdsBot-Google, AdsBot-Google-Mobile, APIs-Google, Mediapartners-Google) | Exact named group ONLY -> implicit allow (ignores User-agent: *) | Global Disallow: / under User-agent: * does NOT block AdsBot-Google; you must name the token explicitly. |
| AI training control tokens (Google-Extended, Applebot-Extended) | Standalone policy token (not an HTTP crawler User-Agent) | Controls AI model training and grounding preferences without affecting standard Google Search or Applebot indexing. |
What this robots.txt checker does not check
This validator checks your robots.txt file and how crawlers match its rules, while several separate crawling and indexing layers sit outside robots.txt:
- Search indexing decisions: robots.txt governs crawling only; a disallowed URL with inbound links can still be indexed without page content.
- Page-level robots directives:
meta name="robots"tags andX-Robots-TagHTTP headers live on individual URL responses and cannot be read if crawling is blocked. - WAF, firewall, and bot-challenge enforcement: Edge security rules can return HTTP 403 or 429 to a real crawler even when
robots.txtexplicitly allows the path. - Non-compliant scrapers: robots.txt is a voluntary standard; unauthorized scrapers must be blocked at the CDN, WAF, or origin layer.
- Other schemes, subdomains, and ports:
https://example.com/robots.txtdoes not governhttps://www.example.com/,https://blog.example.com/, orhttp://example.com/; test each origin separately.
Frequently asked questions
Why is a URL blocked when I only disallowed a folder or prefix? +
Robots.txt directives match URL paths by prefix from the root slash. Disallow: /admin without a trailing slash blocks /admin, /admin-login.html, and /administrators/, while Disallow: /admin/ blocks every file and subfolder inside /admin/ unless a longer Allow: rule overrides it. Add a trailing slash when targeting a directory, use a trailing $ anchor for exact-path matches, and test edge cases with multiple paths before deploying.
Does blocking a URL in robots.txt remove it from Google Search results? +
No. Blocking a URL in robots.txt stops Googlebot from crawling the page, but Google can still index the URL without a description if external or internal links point to it. To remove a page from search results reliably, allow crawling so Googlebot can fetch the page, then return a meta robots noindex tag or an X-Robots-Tag: noindex HTTP header.
Which rule wins when Allow and Disallow both match the same URL? +
The matching pattern with the longest length (measured in UTF-8 bytes) always wins, regardless of rule order in the file. When an Allow rule and a Disallow rule match with the exact same length, Allow wins the tie. For example, Allow: /page (5 bytes) loses to Disallow: /*.htm (6 bytes) on /page.htm, whereas Allow: /page (5 bytes) beats Disallow: /*.ph (5 bytes) on /page.ph.
What happens if /robots.txt returns a 404, 429, or 500 HTTP status code? +
Each status class triggers different crawler behavior. Any 4xx response except 429 (such as 404 Not Found, 403, or 410) means no policy file exists, so crawlers assume no restrictions and can crawl freely. Google treats HTTP 429 and 5xx server errors as temporary unreachable states: Google halts crawling for up to 12 hours, then falls back to its last cached robots.txt copy for up to 30 days (or assumes no restrictions if no cached copy exists) before pausing if the site remains unreachable.
If I add a User-agent: Googlebot group, does Googlebot still follow User-agent: *, and what about AdsBot-Google? +
No. Once a crawler matches a specific named group such as User-agent: Googlebot, it obeys only that group and ignores User-agent: * completely. Any global Disallow rules must be repeated inside the Googlebot group. Google sub-crawlers like Googlebot-Image inherit User-agent: Googlebot when unnamed, whereas special-case crawlers including AdsBot-Google, APIs-Google, and Mediapartners-Google ignore User-agent: * entirely and only follow rules that name them explicitly.
Can I test or edit robots.txt in Google Search Console, and how long does Google cache changes? +
Google retired the legacy Search Console robots.txt Tester in December 2023 and replaced it with the read-only report under Settings > Crawling > robots.txt, where you can view the last fetched file and request a recrawl. Google normally caches robots.txt for up to 24 hours, though shorter Cache-Control: max-age headers can reduce refresh time. Stage and validate edits locally in a browser sandbox before publishing, then trigger a recrawl in Search Console.
Next checks
- Probe live HTTP status codes,
X-Robots-Tagheaders, and non-JS HTML across 22 AI bots with the AI crawler checker. - Publish an AI-oriented markdown site index with the llms.txt generator.
- Inspect official bot tokens and operator purposes in the AI crawlers list.
- Authenticate real crawler traffic via reverse DNS and published IP ranges using our AI crawler verification guide.
- Measure real GPTBot, ClaudeBot, and PerplexityBot hits in your Nginx, Apache, Cloudflare, or CloudFront server logs with the AI log analyzer.
- Validate JSON-LD structured data,
@graphlinks, and 2026 rich result eligibility on crawlable pages with our schema validator. - Audit DNS, DNSSEC, email auth, and AI access together in the AI readiness checker.