Website Down for Maintenance? The Status Codes That Protect Your Google Rankings
"Our developers need to take the site offline to patch PHP. Will we lose our organic rankings?" It's the question we've heard most from marketing teams since PHP released emergency fixes on 21 October. The short answer is no, as long as your server tells Google exactly what's going on.
Most of the advice out there stops at "use a 503". That covers an hour of planned maintenance. It doesn't cover the spam pages left behind after a hack, the microsite nobody remembered, or the platform migration that often follows a scare like PHP2Shell. This guide does.
Why status codes matter when your site goes offline
Match the status code to the downtime
| Situation | Status code | How long | Avoid |
| Planned maintenance or upgrade | 503 + Retry-After | A few hours | A 200 "back soon" page |
| Emergency security patch | 503 + Retry-After | As short as possible | Timeouts or blank pages |
| One section offline (e.g. a booking tool) | 503 on that section only | Hours | Taking the whole site down |
| Server overloaded by traffic | 503 or 429 | Minutes to hours | Leaving 500 errors running |
| Page removed for good | 410 | Permanent | Redirecting it to the homepage |
| Spam URLs left behind by a hack | 410 | Permanent | Leaving them live or returning 200 |
| Content moved to a new URL or platform | 301 | Permanent | Temporary 302s or no redirect at all |
503 and Retry-After for planned and emergency downtime
The key limit is time. Google's guidance warns against serving 503s for longer than one to two days. After that, pages can start dropping out of the index. Most PHP upgrades take minutes to a few hours, so plan to be back well inside that window.
410 vs 404 when cleaning up after a hack
Both 404 and 410 lead to removal, but a 410 says the page was removed on purpose and won't return. In practice, Google tends to drop 410 pages a little faster, which matters when spam is sitting in search results under your brand. For the worst offenders, use the Removals tool in Search Console as well.
301s when downtime turns into a migration
This is where most migration ranking losses come from: missing redirects, chains of redirects, or everything pointing to the homepage. Map old URLs to new ones page by page before launch day, not after.
The codes that quietly cost you rankings
- A 200 "under maintenance" page. Google sees a working page and may index your maintenance message across hundreds of URLs, or treat them all as soft 404s.
- Timeouts and connection resets. If the server simply stops answering, Google treats it like a server error and reduces how often it crawls.
- 500 errors left running. A brief 500 is fine. Days of them and Google starts removing pages.
- Redirecting everything to the homepage. Google usually treats this as a soft 404, so the original pages lose their rankings anyway.
- A 503 on robots.txt. If Google can't fetch your robots.txt file, it may stop crawling the whole site. Keep it returning a normal 200.
Not sure what your sites return when they go down? Request a free check.
After you're back online: a two-week recovery check
Going back online isn't the end of the job. Google needs time to recrawl, and problems often only surface days later. Set a reminder to check these for at least two weeks.
What to watch in Search Console
- Crawl Stats: look for a spike in server errors (5xx) during and after the downtime, then check it drops back to normal.
- Page Indexing: watch for new soft 404s, "server error" pages, or a sudden drop in indexed pages.
- Security Issues and Manual Actions: confirm both are clear, especially if there's any chance the site was compromised.
- Performance: compare clicks and impressions for your top pages against the week before.
- If indexed pages suddenly jump, check for URLs you don't recognise. That's often the first sign of injected spam.
Downtime is a process, not a one-off
We can help you
Website Downtime and SEO: Frequently Asked Questions
1. Which status code should I use when my website is down for maintenance?
2. How long can a website return a 503 before it affects SEO?
3. Should I use a 404 or a 410 for pages I've deleted?