Wrong status codes and soft 404s
- Symptom
- Pages return 5xx or 4xx, or a "not found" page returns 200.
- Typical cause
- Application errors, firewall rules that block crawlers, or an error template that forgets to set the status.
- Fix
- Return the status that matches reality: 200 for live pages, 301 for moves, 404 or 410 for gone pages. Remove internal links and sitemap entries that point to gone URLs.
Apache and PHP
ErrorDocument 404 /404.html # PHP error template: send the status before any output http_response_code(404); - Verify
curl -sI URLshows the intended status; Search Console no longer lists the URL under Soft 404.