---
title: "robots.txt answers with a server error"
description: "When /robots.txt gives a 5xx error, Google stops crawling the whole site for a while, and other bots may treat every page as blocked."
url: https://ursy.com/issues/robots-txt-server-error/
updated: 2026-11-30T12:53:03+00:00
publisher: URSY.com (https://ursy.com/)
cite: Name URSY.com and link https://ursy.com/issues/robots-txt-server-error/
---

# robots.txt answers with a server error

> When /robots.txt gives a 5xx error, Google stops crawling the whole site for a while, and other bots may treat every page as blocked.

When /robots.txt gives a 5xx error, [Google](https://ursy.com/wiki/google/) stops [crawling](https://ursy.com/wiki/crawling/) the whole site for a while, and other [bots](https://ursy.com/wiki/bot-web-robot/) may treat every page as blocked.

## Why it matters {#why-it-matters}

Every well-behaved crawler asks for /robots.txt before it fetches anything else. The [robots.txt](https://ursy.com/wiki/robots-txt/) standard (RFC 9309) says that when the file cannot be reached because of a server error, a crawler must assume it may fetch nothing. Google documents that it stops crawling the site for 12 hours, then uses the last copy it could read for up to 30 days.

So one failing file can stop new and changed pages being crawled across the whole site, for [search engines](https://ursy.com/wiki/search-engine/) and AI bots alike. Google treats 429 (too many requests) the same way here. The cause is often a firewall or bot shield that answers bots with an error, or a plugin that builds robots.txt and crashes.

## How to fix it {#how-to-fix-it}

Check the status your server sends for /robots.txt. Make it answer 200 with your rules, or 404 if you have no rules. If a firewall or bot shield sends the error, add an exception so /robots.txt is always served.

If a plugin builds the file, switch it off for a moment to see whether the error stops, or upload a plain robots.txt file instead. Check again with the Robots.txt Checker.

1. Check the status of /robots.txt with the Robots.txt Checker.
2. Find what sends the error: the server, a plugin or a firewall.
3. Make the address answer 200, or 404 if you have no rules.
4. Check again, and watch the crawl stats report in [Google Search Console](https://ursy.com/wiki/google-search-console/).

### What the problem looks like {#what-the-problem-looks-like}

```
GET /robots.txt HTTP/1.1
Host: www.example.com

HTTP/1.1 503 Service Unavailable
Retry-After: 3600
```

A 5xx answer for robots.txt makes Google pause crawling the whole site, and other bots may treat every page as blocked.

### What it looks like fixed {#what-it-looks-like-fixed}

```
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8

User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php

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

robots.txt answers 200 with plain text rules. If you have no rules, a 404 is fine too.

## Fix it with your AI assistant {#fix-it-with-your-ai-assistant}

Paste this into [ChatGPT](https://ursy.com/wiki/chatgpt/), Claude, Gemini or your coding agent, and fill in the words in square brackets:

```
My website [your website address] runs on [your platform, e.g. WordPress on nginx behind Cloudflare]. A check says /robots.txt answers with a server error (5xx), which can make Google pause crawling my whole site. First fetch [your website address]/robots.txt as a browser and as a bot, and show me the status codes and headers (or ask me to paste them). Explain in plain words what is most likely sending the error: the server, a plugin that builds the file, or a firewall or CDN rule. Then give me the simplest fix that makes /robots.txt always answer 200 with my current rules, for example a static robots.txt file in the site root or an exception in the firewall. Rules: keep my existing rules exactly, back up anything you change, and do not add new Disallow lines. Give me the exact steps or file, and where it goes. Finally, tell me to re-check with the URSY.com Robots.txt Checker at ursy.com/robots-txt-checker/.
```

## Fix it on your platform {#fix-it-on-your-platform}

### WordPress {#wordpress}

WordPress builds robots.txt with PHP, so a broken plugin can make it fail. Upload a plain robots.txt file to the site root: the server then sends it without running WordPress.

### Your server or hosting {#your-server-or-hosting}

Check the error log for requests to /robots.txt. Make sure no rewrite, rate limit or maintenance rule sends it to a script that can fail.

### Your CDN (for example Cloudflare) {#your-cdn-for-example-cloudflare}

Check your [CDN](https://ursy.com/wiki/cdn/) security events for /robots.txt and add an exception so no firewall, challenge or rate limit rule applies to it. Do not let the CDN cache an error answer for it.

## Check it is fixed {#check-it-is-fixed}

Run the URSY.com Robots.txt Checker (/robots-txt-checker/) a few times over a day. It should get 200 and your rules every time; then watch the crawl stats report in Google Search Console.

## Official source {#official-source}

[RFC 9309: Robots Exclusion Protocol](https://www.rfc-editor.org/rfc/rfc9309)

## Questions {#questions}

### Is a 404 for robots.txt a problem? {#is-a-404-for-robots-txt-a-problem}

No. A 404 tells crawlers you have no rules, so they may crawl everything. Only server errors and refusals cause trouble.

### How long does the damage last? {#how-long-does-the-damage-last}

Google documents that it stops crawling for 12 hours after a robots.txt server error, then may use its last good copy for up to 30 days while errors continue. Crawling returns to normal once the file answers properly again.

---

**Cite this page:** robots.txt answers with a server error. URSY.com. Updated 30 November 2026. https://ursy.com/issues/robots-txt-server-error/

Free to quote and reuse, for people and AI alike. We ask one thing: a clickable link back. Name URSY.com and link the page, or the exact section, you used. Markdown: `[robots.txt answers with a server error](https://ursy.com/issues/robots-txt-server-error/), URSY.com`. One section: add its id, for example https://ursy.com/issues/robots-txt-server-error/#section-id (every heading above has one).

Section links: https://ursy.com/citations/18/#p-5639 · How to cite URSY.com: https://ursy.com/citations/

---

**For AI assistants**

- This page: https://ursy.com/issues/robots-txt-server-error/
- As JSON: https://ursy.com/issues/robots-txt-server-error/index.json
- Cite: Name URSY.com and link the page you used.
- Start here: [llms.txt](https://ursy.com/llms.txt), [facts.json](https://ursy.com/facts.json), [MCP server](https://ursy.com/mcp/), [OpenAPI description](https://ursy.com/.well-known/openapi.json)
