Skip to main content

Google: Use a 503 Status Code When Taking Sites Down for PHP Patches

|
Search news from Native Rank

What changed

Google Search Central posted a reminder on LinkedIn on Wednesday, the same day PHP shipped emergency fixes for two critical flaws. Those flaws can let attackers run code on a server without logging in. Google’s advice is that sites going offline to patch should return a 503 (Service Unavailable) status code. That code tells Google the outage is temporary, so pages already in Search stay put.

Google also warned against showing generic 404 pages or error pages that return a 200 status during the downtime. Google’s John Mueller added on Bluesky that the 503 can be served from outside PHP, for example through a CDN or by pointing DNS to another server. This matters because PHP itself is what is being taken down.

Why it matters

The wrong response during maintenance can hurt your visibility. An error page that returns a 200 can get indexed as if it were real content. A 503 protects your listings, but only for a short time. Google’s documentation advises against serving one for more than one to two days. URLs that return it for several days may be removed from the index.

There are other side effects to plan for:

  • When many URLs return errors, Google slows crawling across the whole hostname, including pages that still work.
  • Slower crawling means new pages get found later and existing pages get refreshed less often.
  • Google cannot update titles, descriptions, metadata or structured data on a page returning a 503.
  • Google Ads campaigns may be paused or canceled.

What to do

  • Patch promptly. If your site runs on PHP, ask your developer or host about the new security fixes. Versions 8.1 and older no longer get regular official updates, so check with your host or vendor on available fixes.
  • Serve the 503 from something that stays online. Use a CDN rule or a temporary server you point DNS to.
  • Add a Retry-After header to tell Google’s crawlers when to check back, as seconds or a UTC date and time.
  • Keep robots.txt responding normally. A 503 on that file blocks all crawling.
  • Keep downtime short. Brief outages are fine. If the closure will run past a day or two, use an indexable placeholder home page that returns a 200.
  • Return to 200 responses as soon as you can. Google says crawling then picks back up gradually.

Source: Google Reminds Sites To Serve A 503 During PHP Patch Downtime, Search Engine Journal. This brief sums up their reporting; all credit for the original goes to them.


Native Rank


More Articles By Native Rank