How to fix “Server error (5xx)” in Search Console on WordPress
Where you see it: Search Console → Indexing → Pages → Why pages aren’t indexed
Search Console lists a URL here when Googlebot asked for it and your server answered with a 500-level status code, timed out, or said it was too busy. Google ignores anything a 5xx response contains, so the page can’t be indexed until it answers normally.
Fix it now if real posts or pages are listed; a one-off outage clears itself.
Google keeps indexed URLs through a short outage but drops the ones that keep failing, and crawls the whole site more slowly meanwhile. If the URLs load today and Crawl stats shows only an older issue, wait for the recrawl. Otherwise, find the cause.
Check the URL Search Console listed
Paste a URL from the report. The indexability checker follows its redirects, shows the final HTTP status, and fetches your robots.txt. It sends a RankHiveTools user agent, so a rule aimed only at Google won’t show here.
Indexability report
Enter a URL to see whether Google can crawl and index it, and which Search Console status any problem causes.
What each finding means in Search Console
The Page indexing report in Search Console names the reason a page is not indexed. This is the setting behind each reason, and the guide that fixes it on WordPress. For the full list, see Search Console Errors: Fixes for WordPress.
| What the checker finds | Search Console status | Fix guide |
|---|---|---|
| robots.txt Disallow rule matches the URL | Blocked by robots.txt | Blocked by robots.txt on WordPress: How to Fix |
| noindex in robots meta or X-Robots-Tag | Excluded by ‘noindex’ tag | Excluded by Noindex Tag in WordPress: How to Fix |
| Canonical points to another URL | Alternate page with proper canonical tag | Alternate Page With Proper Canonical Tag: Meaning |
| No canonical, duplicates exist | Duplicate without user-selected canonical | Fix Duplicate Without User-Selected Canonical |
| Conflicting canonicals or weak signals | Duplicate, Google chose different canonical than user | Fix Google Chose Different Canonical Than User |
| URL redirects elsewhere | Page with redirect | Page With Redirect: What It Means on WordPress |
| Returns 404 or 410 | Not found (404) | Fix 404 Errors in Search Console on WordPress |
| Error page that returns 200 | Soft 404 | Soft 404 Errors on WordPress: Causes and Fixes |
| Returns 5xx or times out | Server error (5xx) | Fix Server Error (5xx) in Google Search Console |
| Redirect loop or overly long chain | Redirect error | Fix 404 Errors in Search Console on WordPress |
| Nothing blocks it, but few links or thin content | Discovered – currently not indexed / Crawled – currently not indexed | Discovered – Currently Not Indexed on WordPress |
Reading the result
- HTTP status 503, or any code from 500 to 599, and a blocking finding with the same number: the error is happening now, not only for Google.
- HTTP status No response and the finding The URL did not respond: the request failed or ran out of time, which Google files under this label too.
- robots.txt could not be read, with a 5xx or no response in brackets: fix this first, because a failing robots.txt pauses Google’s crawl of the whole site.
- A redirect hop in the Redirect chain, then a 5xx: the listed URL is fine, but its destination fails.
- HTTP status 200 and Nothing on this URL blocks indexing: it works now. The error passed, or Google is treated differently; Test live URL tells you which.
The same tool with its full guide: Indexability Checker
Why it happens on WordPress
WordPress builds pages with PHP and a database, so a failure in either reaches Googlebot as a 5xx.
A plugin or theme that crashes PHP
On a fatal error, WordPress replaces the page with There has been a critical error on this website and a 500 status. Since 5.2 it also emails a recovery mode link to the admin address. Check what you installed or updated the day errors began.
PHP running out of memory
An Allowed memory size … exhausted error means PHP hit its ceiling mid-request. WordPress asks for 40MB on a single site and 64MB on multisite unless WP_MEMORY_LIMIT in wp-config.php says otherwise, and some hosts won’t allow more.
The database connection
Error establishing a database connection replaces every page, with a 500 status. WordPress’s docs blame wrong credentials in wp-config.php first, then a database quota exceeded at your host or a server outage.
A host that can’t keep up
Connection timed out means the site asked for more than the server can manage. Google’s help singles out slow dynamic pages with long parameter lists; on WordPress, think of /?s= search results and the filter URLs shop plugins build.
Maintenance mode
While WordPress installs an update it writes a .maintenance file to the site root and answers every request with 503, a Retry-After of 600 seconds and Briefly unavailable for scheduled maintenance. Right for minutes, wrong for weeks.
A firewall, DoS protection or CDN
Google’s help lists firewalls, DoS protection and DNS settings among the things that block Googlebot this way. Behind Cloudflare, 521 means your server refused Cloudflare’s connection and 522 means Cloudflare timed out reaching it. Both often come from a host firewall that blocks Cloudflare’s IP addresses.
Errors that came and went
The report reflects Google’s last crawl, so a few bad minutes under load can list pages that answer fine today.
How to fix it
Time the failure, read the error, then fix that layer.
1. Check whether it still fails
Inspect a listed URL in URL Inspection: Page fetch reads Failed: Server error (5xx) for the last crawl. Then click Test live URL, which fetches it again as Google-InspectionTool. If that succeeds, the outage is over; skip to validation.
2. Date it in Crawl stats
Open Settings → Crawl stats → Open report. Host status covers robots.txt fetching, DNS resolution and server connectivity for 90 days; Recent issue means within the last week. Click into the Server connectivity chart to see which URLs failed when.
3. Find the error message
Match those times against your host’s error log. To have WordPress log PHP errors too, add these lines to wp-config.php above That’s all, stop editing!
- define( 'WP_DEBUG', true );
- define( 'WP_DEBUG_LOG', true );
- define( 'WP_DEBUG_DISPLAY', false );
- Errors go to wp-content/debug.log, hidden from visitors. Site Health warns the log may be public, so remove the lines afterwards.
4. Stop the crash
Match the fix to the message.
- Critical error: use the recovery mode link from the admin email, then update, roll back or replace the paused plugin or theme. Locked out? Rename wp-content/plugins to plugins_old by SFTP, then reactivate plugins one by one.
- Memory exhausted: add define( 'WP_MEMORY_LIMIT', '96M' ); to wp-config.php. No change means your host caps PHP memory.
- Database: compare the database name, user, password and host in wp-config.php with your hosting panel, then ask your host about quotas or an outage.
- 500 on every page: WordPress suspects a corrupted .htaccess first. Rename it to .htaccess_old; if the site returns, save Settings → Permalinks to write a fresh one.
- Maintenance message that won’t go away: delete .maintenance from the site root.
5. Give the server headroom
Errors at busy times point at the server. Tools → Site Health → Info → Server lists your PHP limits; ask your host about raising them or your plan’s resource limits. A robots.txt Disallow keeps internal search URLs out of the crawl.
6. Let verified Googlebot through
Search your firewall or CDN log for blocked Google requests. Behind Cloudflare, have your host allow all Cloudflare IP ranges. Allowlist Google by verified IP, never by user agent.
Why Google crawls less after a 5xx
Google reads a 5xx, or a 429, as a struggling server and backs off across the whole site. The cut grows with the number of failing URLs, so a few broken ones slow the crawl of pages that work. Once pages answer 2xx again, Google raises the rate gradually.
Indexed pages ride out a short outage. Google’s crawling guide says 503 or 429 on the same URLs for more than about two days gets them dropped from the index.
robots.txt can stop everything: if it answers 5xx, Google stops crawling the site for 12 hours, then uses its last good copy for up to 30 days. WordPress serves robots.txt through PHP unless a real file sits in the site root, so a crash can break it too.
| What Google got | Usual WordPress cause | Look first at |
|---|---|---|
| 500 Internal Server Error | A critical error, a database connection error, exhausted memory or a broken .htaccess | wp-content/debug.log and your host’s error log |
| 503 Service Unavailable | An update in progress, or a server shedding load | A leftover .maintenance file; your plan’s limits |
| 521 or 522 behind Cloudflare | The origin refused Cloudflare or didn’t answer in time | Your host’s firewall and Cloudflare’s IP ranges |
Check the fix in Search Console
Validate once the listed URLs answer 200 for Google, not only for you.
- Run Test live URL on several listed URLs. Page fetch should read Successful.
- Check that Crawl stats shows no new host problem since your fix.
- Open Server error (5xx) in Indexing → Pages and click Validate fix once; Google asks you not to click again until the run passes or fails.
- Allow up to about two weeks. One URL that still fails ends the run with Failed; fix it and start over.
- Request indexing for your most important pages; it has a daily limit.
After a past outage, validation is optional: each URL clears when Google recrawls it.
Can RankHive fix this?
No. A 5xx comes from PHP, the database, your hosting plan or a layer in front of WordPress, and RankHive changes none of them. When it analyses your site it can read Search Console’s URL Inspection data for your posts, where a failed page fetch shows up.
What it writes, once you approve
- A Disallow line in the virtual robots.txt for slow URLs you never want crawled, such as internal search results. A physical robots.txt file overrides it.
What it can’t do here
- Raise PHP memory, change your PHP version or upgrade your hosting plan.
- Edit wp-config.php or .htaccess, turn on debug logging, or delete a leftover .maintenance file.
- Change plugins, themes, Cloudflare or firewall settings, or read your error logs.
- Open Crawl stats, run Test live URL or click Validate fix.
Every change is drafted next to the current value and waits for your approval. Each one written is logged in the Change Log, with Revert.
Check the rest of your site while you’re here
The free site check reads your public pages for titles, meta descriptions, headings, canonical tags and schema, and shows what needs fixing. If you sign up, RankHive reads your Google Search Console data every week, drafts the fixes, and writes the ones you approve to WordPress. Nothing changes on your site until you say yes.
Related issues
- URL Inspection toolNothing to fix: it’s the tool you diagnose and confirm fixes with.
- Blocked due to access forbidden (403)Fix it if the page should be public; keep Google away if it never should be.
- Blocked due to other 4xx issueFix it if the page should be in Google; leave it if the code is deliberate.
- Crawled – currently not indexedWorth fixing for real posts; expected for archives and extras.
- Not found (404)Fix the 404s that had traffic or links; leave the rest.
Common questions
What is a server error 5xx?
An HTTP status code in the 500s: the server got the request and failed to handle it. Search Console’s label also covers requests that timed out or found the site too busy.
Do 5xx errors hurt my rankings?
A short outage doesn’t remove pages; Google retries first. URLs that keep failing fall out of the index, and the site is crawled more slowly until the errors stop.
Why does the page load for me when Google got a 5xx?
The report shows Google’s last crawl, which may have hit a bad minute, and a firewall or CDN can treat Google’s requests differently from your browser. Test live URL shows what Google gets now.
Read next
Sources
Checked against these pages on .
- Google Search Console Help: Page indexing report
- Google Search Console Help: Crawl Stats report
- Google Search Console Help: URL Inspection tool
- Google: How HTTP status codes affect Google’s crawlers
- Google Search Central: Troubleshoot Google Search crawling errors
- Google Search Central: Reduce the Google crawl rate
- Google: How Google interprets the robots.txt specification
- WordPress Advanced Administration: Common WordPress errors
- WordPress Advanced Administration: Debugging in WordPress
- WordPress Advanced Administration: wp-config.php
- WordPress Developer Reference: wp_maintenance()
- WordPress Developer Reference: do_robots()
- Make WordPress Core: Fatal error recovery mode in 5.2
- WordPress Documentation: Site Health screen
- Cloudflare: Error 522