A Quick Word About 503s When Your PHP Goes Down
2026-10-22 — management consulting India
Your PHP needs patching. You're taking the server down anyway, so why does the HTTP status code matter?
Because Google will decide whether to keep your indexed pages or throw them out, depending on what you tell it while you're offline.
Google Search Central posted on LinkedIn this week reminding site owners that a 503 status code — the "Service Unavailable" response — is what you want to serve when you go dark for maintenance. Not a 404. Not a 200 with an error page. A 503. It's the signal that says "I'm here, but temporarily broken. Come back soon."
The difference is real. A 404 tells Google your pages are gone. It removes them from search. A 200 with error content tells Google to index your maintenance page. A 503 tells Google to wait and keep what it already knows about your site. Which one you send matters for search visibility, which matters for traffic, which usually matters to someone.
The tricky part is actually serving it. You can't use PHP to return a 503 if PHP is what's going down for patching. This is where it gets practical. You need something else running — a CDN rule, a web server layer in front of PHP, or DNS pointing to a temporary holding server. Your robots.txt file should still work normally too, because if Google can't even read your robots.txt, it stops crawling everything on your site for up to 12 hours.
Timing matters more than people think. A 503 lasting 10 or 15 minutes? Google doesn't care, as one of Google's senior engineers said a couple of years ago. Extended beyond that, and crawl rates slow down. Crawl rate slowdown means fewer new pages discovered and existing pages refreshed less often. If it drags past one or two days, Google's documentation warns that your URLs may get dropped from the index entirely. Not flagged as temporarily unavailable. Actually removed.
There's a Retry-After header you can add to the 503 response, telling Google exactly when to come back. You can set it to a number of seconds or a specific date and time. Google's crawlers will respect it. But that assumes you know how long the patch will take, which is — actually, that's not quite right. Even if the timing estimates slip, the Retry-After just suggests a schedule. Google will still retry before then if it decides to check in early.
The whole point is that this is a short-term tactic. Days of 503s signal something else to Google — not maintenance, but maybe a site that's permanently broken. So if the downtime is going to run longer than a couple of days (because something went wrong during patching, or you're waiting for a host response), Google's own documentation suggests switching to a 200 response with an indexable maintenance page instead.
Most consultants get this wrong, including us when we're moving fast and not thinking through the edge cases. The code seems like a technical detail. It is a technical detail. It's also the lever that controls whether your search traffic vanishes temporarily or vanishes permanently.
Source: ""better to return a 503 HTTP result code" than a 404 or a 200 error page, and warning that "lasting 503s can eventually be seen as a sign that the server is now permanently unavailable"" — PPC.Land