5xx Server Errors
5xx server errors are HTTP status codes that mean the server received a valid request but failed to deliver the page. Unlike 4xx errors, the problem is on the website’s side, and if errors persist, search engines crawl less and may eventually drop affected pages.
Common 5xx codes
| Code | Meaning | Typical cause |
|---|---|---|
| 500 | Internal Server Error | A code bug, failed plugin or misconfiguration |
| 502 | Bad Gateway | A proxy or CDN got an invalid response from the origin server |
| 503 | Service Unavailable | Server overloaded or in planned maintenance |
| 504 | Gateway Timeout | The origin server took too long to respond |
Other 5xx codes exist, but these four are the ones site owners meet most often. These sit alongside the other families described in HTTP status codes.
How 5xx errors affect SEO
Google has explained that when it sees many 5xx errors or slow responses, Googlebot slows its crawl rate to avoid overloading the server.
This reduces how quickly new and updated pages are found, which matters for crawl budget on large sites.
A short outage is normally harmless: Google retries later and indexed pages stay put. If URLs keep returning errors over a longer period, Google may remove them from the index. Errors when fetching robots.txt are especially serious, because Google may pause crawling the whole site until it can read the file.
Using 503 for maintenance
For planned downtime, return a 503 status, ideally with a Retry-After header suggesting when to come back. This tells search engines the outage is temporary. Avoid showing a maintenance message with a 200 status, which risks the message being indexed, and keep maintenance windows short.
How to find and fix 5xx errors
- Check the Page indexing report and Crawl stats report in Google Search Console for server errors and host availability problems.
- Review server error logs and use log file analysis to see which URLs fail and when.
- Set up uptime monitoring so you hear about outages quickly.
- For 500 errors, look for recent code changes, plugin updates or configuration edits, and roll back if needed.
- For 502 and 504 errors, check the connection between your CDN or proxy and the origin, plus slow database queries.
- For repeated 503s under load, add caching, a CDN or more server resources.
Common mistakes
- Firewall or bot protection rules returning 5xx codes to Googlebot only, which you may not notice as a visitor.
- Leaving a site in maintenance mode for days.
- Returning a 200 status on error pages, which hides real failures from search engines and monitoring tools.
- Ignoring slow responses: pages that take many seconds to load can time out for crawlers even if they eventually work in a browser.
- Assuming errors are fine because the site works for you: intermittent failures often appear only under load.
Further reading: Google on HTTP status codes and network errors.
Key Takeaways
- 5xx errors mean the server failed to deliver a valid request.
- Frequent 5xx errors make Googlebot slow down its crawling.
- Short outages are usually harmless, but long ones can lead to deindexing.
- Use a 503 with Retry-After for planned maintenance.
- Monitor uptime and Search Console crawl stats to catch problems early.
Related Terms
Want help putting this into practice? Get a free SEO check, or keep learning in the SEO Encyclopedia.