Find out why Googlebot got a server error from your site

Server error (5xx) in Search Console's Page indexing report means your server answered Googlebot with a 500-level status code when it requested the page, so Google got nothing it could index. A one-off error can be temporary and clear on its own, but errors that keep coming back slow Google's crawling of the whole site and eventually drop the affected pages from Google's index.

What each 5xx status code points to

StatusWhat it meansWhere to look
500 Internal Server ErrorThe server hit an unexpected condition and had no more specific code to send. Unhandled exceptions, configuration mistakes, running out of memory and wrong file permissions can all cause it.Your application and web server error logs at the time of the crawl.
502 Bad GatewayA proxy, load balancer or CDN in front of your server got an invalid response from the server behind it.The server behind the proxy, and whether it was running and answering.
503 Service UnavailableThe server wasn't ready to handle the request, usually because it was down for maintenance or overloaded.Maintenance mode, deploys and resource limits such as memory, CPU or connection pools.
504 Gateway TimeoutA proxy or gateway didn't get a response in time from the server behind it.Slow pages, long database queries and the timeouts between the proxy and your server.

How server errors affect crawling and indexing

  • Google ignores any content that comes with a 5xx response and slows its crawling of the site for a while. For 500, 502 and 503 errors, the slowdown is proportionate to how many URLs return them, and once the server answers with 2xx codes again, Google speeds back up gradually. Pages already in the index stay there at first, but Google removes URLs that keep returning server errors. Google's HTTP status code guide covers each code.

  • Google treats a 429 Too Many Requests response as a server error too, so a rate limit that answers Googlebot with 429 slows crawling just as a 5xx does. Network timeouts, connection resets and DNS errors count much like 5xx errors, and Google's network and DNS error guide says indexed URLs that stay unreachable are removed within days.

How to fix a server error (5xx)

  1. Inspect an affected URLRun a live test in URL Inspection on an example URL from the report. If it fails, the error is still happening. If it passes, the error may have been temporary, since Google notes that a live test can succeed when its own crawl failed.
  2. Check host status in Crawl StatsOpen Crawl Stats under Settings and look at the host status and the Server error (5XX) row in the responses table, which shows roughly when the errors happened. The report is available only for root-level properties.
  3. Match those times to your server logsLook for 5xx responses to Googlebot in your web server and application logs at those times, and for what else happened then, such as a deploy, a scheduled job or a traffic spike.
  4. Make sure nothing blocks GooglebotFirewalls and denial-of-service protection can block Googlebot because it makes more requests than a person does. Find the part of your setup that blocks it and allow verified Googlebot, or ask your host if the firewall isn't yours to change.
  5. Cut slow and duplicate URLsPages that serve the same content for many parameter combinations can respond too slowly and time out. Keep parameter lists short, and add server capacity if Google keeps crawling at your limit.
  6. Validate the fixOnce the errors stop, click Validate fix on the issue in the Page indexing report. Google rechecks the affected URLs, which usually takes up to about two weeks.

Find the server errors Googlebot got

# List requests that say they're from Googlebot and got a 5xx (combined log format)
grep Googlebot access.log | awk '$9 ~ /^5/'

# Check that an IP address from that list belongs to Google
host 66.249.66.1
host crawl-66-249-66-1.googlebot.com

Check that the requests came from Google

Anyone can send Googlebot's user agent. A request is Googlebot's only when the reverse lookup of its IP address ends in googlebot.com and the forward lookup of that name returns the same IP. To let it through a firewall, allow the common-crawlers.json ranges that Google's verification guide links for Googlebot, not every range Google publishes, since some belong to fetches that apps on Google Cloud make for their own users.

Frequently asked questions

Will Google drop pages that return server errors?

Not right away. Google keeps already indexed URLs at first and slows its crawling, but it removes URLs that keep returning server errors. Fix the cause, then validate the fix so Google rechecks the affected URLs. Google's HTTP status code guide describes both effects.

Why does URL Inspection pass when the report shows a server error?

Server errors can be temporary, so a live test can succeed even though Google's crawl failed, and the report keeps the result of the last crawl until Google crawls the URL again. Check Crawl Stats for when the errors happened and compare those times with your logs. The Page indexing report guide describes this case.

Should my site return 503 during maintenance?

Yes, for a short window. A 503 says the problem is temporary, and a Retry-After header can say when to try again, as MDN explains. Don't send the 503 for robots.txt itself, since Google's guide to pausing a site says a 503 on robots.txt blocks all crawling. Google retries URLs that return 503 or 429 for about two days, and returning them for longer makes Google drop those URLs from its index, according to Google's crawling troubleshooting guide.