HTTP Status Codes and Their SEO Impact: A Complete Guide
Understand how HTTP status codes affect crawling and indexing. Learn when to use 301, 302, 404, 410, and other status codes for optimal SEO performance.
Introduction
HTTP status codes are three-digit responses that servers send to indicate the result of a client's request. These codes have significant implications for SEO, as they tell search engine crawlers how to treat URLs.
Status Code Categories
2xx Success
Code | Name | Meaning | SEO Impact |
---|---|---|---|
200 | OK | Request successful | ✅ Index normally |
201 | Created | Resource created | Rare in web browsing |
204 | No Content | Successful, no content | Uncommon for pages |
3xx Redirection
Indicates the resource has moved.
301 Moved Permanently
HTTP/1.1 301 Moved Permanently
Location: https://example.com/new-page
When to use:
- Permanent URL changes
- Site migrations
- HTTPS migrations
- Consolidating duplicate content
SEO Impact:
- ✅ Passes ~90-99% of link equity
- ✅ Old URL replaced with new in index
- ✅ Signals permanence to crawlers
Always use 301 for permanent changes. Crawlers will eventually stop checking the old URL.
302 Found (Temporary Redirect)
HTTP/1.1 302 Found
Location: https://example.com/temp-page
When to use:
- A/B testing
- Temporary promotions
- Maintenance pages
- Country-specific redirects
SEO Impact:
- ⚠️ Original URL stays in index
- ⚠️ May not pass full link equity
- ⚠️ Crawlers continue checking original URL
307 Temporary Redirect
Similar to 302 but preserves request method (POST stays POST).
308 Permanent Redirect
Similar to 301 but preserves request method.
4xx Client Errors
Indicates a client-side error.
404 Not Found
HTTP/1.1 404 Not Found
When to use:
- Page deleted without replacement
- URL never existed
- Resource intentionally unavailable
SEO Impact:
- ✅ Eventually removed from index
- ✅ Link equity is lost
- ✅ Signals to crawlers: don't return
404 errors are normal. Even healthy sites have them. Focus on fixing important broken links, not achieving zero 404s.
410 Gone
HTTP/1.1 410 Gone
When to use:
- Permanently deleted content
- Want faster de-indexing than 404
SEO Impact:
- ✅ Faster removal from index than 404
- ✅ Crawlers stop checking sooner
- ✅ Signals permanent deletion
Use 410 for:
- Expired promotions
- Discontinued products (with no replacement)
- Removed articles
429 Too Many Requests
HTTP/1.1 429 Too Many Requests
Retry-After: 3600
When to use:
- Rate limiting implemented
- Crawler exceeding limits
SEO Impact:
- ⚠️ Crawler will retry later
- ⚠️ May slow indexing
- ✅ Use
Retry-After
header to help crawlers
5xx Server Errors
Indicates a server-side error.
500 Internal Server Error
HTTP/1.1 500 Internal Server Error
SEO Impact:
- ⚠️ Temporary: Crawler retries later
- ❌ Persistent: May be de-indexed
- ❌ Negative ranking signal if common
503 Service Unavailable
HTTP/1.1 503 Service Unavailable
Retry-After: 3600
When to use:
- Planned maintenance
- Temporary overload
SEO Impact:
- ✅ Crawler treats as temporary
- ✅ Won't immediately de-index
- ✅ Use for maintenance windows
# nginx maintenance mode
if (-f $document_root/maintenance.html) {
return 503;
}
error_page 503 @maintenance;
location @maintenance {
add_header Retry-After 3600 always;
return 503 /maintenance.html;
}
Common Redirect Patterns
Site Migration
# Old domain to new domain
RewriteEngine On
RewriteCond %{HTTP_HOST} ^old-domain\.com$ [NC]
RewriteRule ^(.*)$ https://new-domain.com/$1 [L,R=301]
HTTPS Migration
# Force HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]
Trailing Slash Normalization
# Add trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ $1/ [L,R=301]
Redirect Chains and Loops
Redirect Chain (Bad)
example.com/page-1
→ 301 → example.com/page-2
→ 301 → example.com/page-3
Problems:
- ❌ Wastes crawl budget
- ❌ Loses link equity at each hop
- ❌ Slower user experience
- ❌ May not be fully followed
Solution: Direct redirects
example.com/page-1 → 301 → example.com/page-3
example.com/page-2 → 301 → example.com/page-3
Redirect Loop (Fatal)
example.com/page-a → 301 → example.com/page-b
example.com/page-b → 301 → example.com/page-a
Impact:
- ❌ Crawlers give up
- ❌ Page becomes unreachable
- ❌ Will be de-indexed
Custom Error Pages
404 Page Best Practices
<!DOCTYPE html>
<html>
<head>
<title>Page Not Found - Example Site</title>
</head>
<body>
<h1>404: Page Not Found</h1>
<p>The page you're looking for doesn't exist.</p>
<!-- Help users find what they need -->
<nav>
<a href="/">Home</a>
<a href="/search">Search</a>
<a href="/popular">Popular Pages</a>
</nav>
<!-- Log broken links -->
<script>
logBrokenLink(window.location.pathname);
</script>
</body>
</html>
Must return 404 status, not 200 with "Not Found" message!
Soft 404s (Avoid)
A "soft 404" returns 200 OK but shows "not found" content:
HTTP/1.1 200 OK
<html>
<body>
<h1>Page Not Found</h1>
</body>
</html>
Problems:
- ❌ Confuses crawlers
- ❌ Wastes crawl budget
- ❌ Pages stay in index unnecessarily
Monitoring Status Codes
Server Logs
# Count status codes
awk '{print $9}' access.log | sort | uniq -c | sort -rn
# Find 404s
grep " 404 " access.log | awk '{print $7}' | sort | uniq -c | sort -rn
# Find redirect chains
grep " 301 " access.log | awk '{print $7}'
Google Search Console
Monitor:
- Coverage Report: Shows indexing issues
- Status Codes: Filter by error type
- Not Found (404): List of 404 URLs
- Redirect Errors: Chains and loops
Third-Party Tools
- Screaming Frog SEO Spider
- Ahrefs Site Audit
- Semrush Site Audit
Best Practices Summary
Scenario | Use | Avoid |
---|---|---|
Permanent move | 301 | 302 |
Temporary move | 302 | 301 |
Deleted forever | 410 | 404 then 301 |
Deleted, no rush | 404 | Soft 404 |
Maintenance | 503 | 404 or 500 |
Rate limiting | 429 | 403 or 500 |
Common Mistakes
1. Using 302 for Permanent Changes
Using 302 for permanent changes confuses crawlers and may not pass link equity.
2. Redirect Chains
Always redirect directly to final destination.
3. Not Using 410
For permanently deleted content, 410 signals faster removal than 404.
4. Soft 404s
Always return proper 404 status code, not 200 with error message.
Conclusion
HTTP status codes are fundamental to how crawlers interpret your site. Use them correctly to:
- ✅ Preserve link equity during migrations
- ✅ Help crawlers understand content status
- ✅ Optimize crawl budget
- ✅ Provide better user experience
Key Takeaways:
- Use 301 for permanent redirects
- Use 302 only for temporary redirects
- Return real 404s, not soft 404s
- Avoid redirect chains
- Monitor status codes regularly
- Fix critical errors promptly
Next Steps
- Learn about redirect strategies
- Explore crawl budget optimization
- Study log file analysis