5xx server errors
What are 5xx server errors?
5xx server errors are HTTP status codes from 500 to 599 that mean the server failed to fulfil a valid request. The common ones are 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable and 504 Gateway Timeout. Unlike a 404, they say nothing about whether the page exists; they say the server could not deliver it.

503 is the one to use on purpose. During planned maintenance, returning 503 with a Retry-After header tells crawlers to come back later, instead of indexing a maintenance page.
Why 5xx server errors matter for SEO
Google responds to 5xx and 429 errors by temporarily slowing its crawling, then speeding up again once responses return to 2xx. Pages already indexed are kept for a while, but URLs that persistently return server errors are eventually dropped from the index.
A 5xx on robots.txt is worse: Google stops crawling the whole site for up to 12 hours while it retries, then falls back to the last good copy of the file. See robots.txt.
Server errors also mean visitors see an error page. Intermittent 5xx under load are easy to miss in a browser but show up clearly in crawls, Search Console and server logs.
How to fix 5xx errors
- Find them: run a crawl, check the "Server error (5xx)" list in Search Console’s page indexing report, and look at the Crawl stats report for spikes.
- Check server and application logs for the failing URLs to find the cause: crashes, timeouts, database errors or exhausted memory.
- For 502 and 504, look at the layer between visitor and app: the CDN, load balancer or reverse proxy and its timeouts.
- If load is the cause, add caching, a CDN or more capacity. Return 503 or 429 briefly rather than letting the server fall over.
- For planned downtime, serve 503 with
Retry-Afterand keep it short. A day or two is fine; weeks of 503 lead to pages being dropped.
5xx server errors example
HTTP/1.1 503 Service Unavailable
Retry-After: 3600
Content-Type: text/html; charset=utf-85xx server errors FAQ
Do 5xx errors affect rankings?
Brief errors usually do not. Google slows crawling and keeps indexed pages for a while. Errors that persist lead to pages being dropped from the index.
Should I use 503 for site maintenance?
Yes. Return 503 Service Unavailable with a Retry-After header for the duration, so Google knows the outage is temporary and does not index the maintenance page.
Related SEO terms
HTTP status codes are three-digit numbers a server returns with each response to say whether a request worked, moved or failed.
Crawl budget is the set of URLs Google can and wants to crawl on a site. It only becomes a constraint on very large or fast-changing sites.
Time to First Byte (TTFB) is the time from requesting a page until the first byte of the response arrives. It sets the floor for every other speed metric.
CDN (content delivery network)
A CDN (content delivery network) is a network of servers around the world that caches and serves your site from locations close to each visitor.
Log file analysis is reviewing your server’s access logs to see exactly which URLs search engine bots requested, when and with what result.
A 404 error is the HTTP status a server returns when a requested page does not exist. It is normal, but broken links to 404s are worth fixing.