webzod
account

Fix the server error on robots.txt

hygiene.robots.server_error · effort: about an hour

Why it matters

While robots.txt answers with a 5xx error, Google stops crawling the site for about 12 hours, then relies on its last good copy for up to 30 days. The cause is usually a failing backend, a script that builds the file, or a firewall.

The fix

  1. Request https://example.com/robots.txt and note the status. Read the server or application error log around the time of the request.
  2. Fix the cause. Common ones are a crashed or overloaded backend, a plugin or script that generates the file and fails, wrong file permissions, and a firewall or rate limiter that answers 5xx.
  3. Serve robots.txt as a plain static file if you can; it is the most reliable. Return 200 with the rules, or 404 if you want no rules at all.

The examples use example.com. Replace it with your own domain.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.