HTTP Status Codes for SEO: 301, 302, 404, 500 Explained
How HTTP status codes affect SEO: when to use 301 vs 302, how 404 and 500 errors hurt rankings and crawl budget, plus copy-paste server fixes.
SlapMyWeb TeamΒ·
Every time a browser or crawler requests a page, your server answers with a three-digit HTTP status code before sending any content. For SEO, four ranges matter: 2xx (success), 3xx (redirects), 4xx (missing pages like 404), and 5xx (server errors like 500). The short version: serve 200 for pages you want ranked, use 301 for permanent moves, return a clean 404 or 410 for deleted content, and treat any 500 as a ranking emergency. Get the codes wrong and you waste crawl budget, leak link equity, and confuse Google about which URLs to keep.
This guide explains every status code that affects rankings, shows the exact server config to fix them, and gives you a priority order so you fix the damaging ones first.
What HTTP Status Codes Are and Why They Matter for SEO
A status code is the first thing your server says in response to a request β before a single byte of HTML. The crawler reads that code to decide what to do next: index the content, follow a redirect, drop the URL, or back off entirely.
The codes that move rankings, crawl efficiency, and link equity live in the 2xx, 3xx, 4xx, and 5xx ranges. Getting them right is the foundation of a crawlable, trustworthy site β and it's one of the first things any complete SEO audit checks. Google's own documentation on how it handles HTTP status codes is the authoritative reference, and it lines up with everything below.
Web developer reviewing a server response log on a large monitor in an office
The Status Codes That Actually Affect Rankings
200 OK β The One You Want
200 means the server returned the requested page successfully. This is the ideal response for every URL you want indexed. When Googlebot gets a 200, it processes the content, indexes it, and assigns ranking signals.
The trap: make sure your 200 pages actually contain real content. A page that returns 200 but displays "page not found" text is a soft 404 β and Google treats those worse than honest 404s because they waste crawl budget and clutter the index with thin pages.
301 Moved Permanently β The SEO-Safe Redirect
A 301 tells search engines "this URL has permanently moved." It is the most important redirect for SEO because Google consolidates the old URL's signals β including PageRank β onto the new one. Google has stated that 301s pass full ranking signals and that using 301 versus 302 does not result in PageRank loss for permanent moves.
Use a 301 when you:
Change URL structure (e.g. migrating /blog/123 to /blog/seo-guide)
Merge duplicate pages into one canonical URL β it pairs with canonical tags to kill duplicate content
Every permanent URL change should be a 301, never a 302.
302 Found and 307 Temporary Redirect
A 302 says "this URL moved temporarily β keep the original in the index." Google keeps showing the original URL in search results and may not consolidate signals onto the target the way a 301 does. The 307 is the HTTP/1.1 equivalent; for SEO purposes Google treats 302 and 307 the same way.
The real-world problem: most developers reach for a 302 when they mean a 301, and many CMS platforms and plugins default to temporary redirects. The result is old URLs lingering in Google's index, signals failing to consolidate, and conflicting duplicate-content cues. Only use 302/307 for genuinely temporary moves β a flash sale page, an A/B test, a geo-redirect you'll reverse.
Code
Meaning
Index behavior
Use when
301
Permanent move
Replaces old URL
Permanent URL changes
302
Temporary move
Keeps old URL
Short-term moves
307
Temporary (HTTP/1.1)
Keeps old URL
Same as 302, preserves method
308
Permanent (HTTP/1.1)
Replaces old URL
Same as 301, preserves method
404 Not Found β The Honest Error
A 404 says "this page doesn't exist." That is perfectly fine when it's true. Google expects every site to have some 404s β pages get deleted, content gets reorganized. A clean 404 with a helpful error page beats a soft 404 or a broken redirect chain every time.
When Google hits a 404, it removes the URL from the index after re-verifying, stops passing any link equity to it, and reduces how often it recrawls that URL. The real damage shows up when external sites link to your 404 pages β those inbound links carry equity and hit a dead end. That's when a 301 to a relevant page rescues the value.
410 Gone β The Definitive Delete
A 410 means "permanently gone, never coming back." Google generally processes 410s a little faster than 404s and is less likely to keep rechecking. Use it when you intentionally remove content β an expired campaign, a discontinued product with no replacement β and want it dropped quickly.
500 Internal Server Error β The Emergency
A 500 means your server crashed while handling the request. This is the most damaging status code for SEO. Repeated 500s push Googlebot to slow its crawl rate, eventually drop affected pages from the index, and lower its trust in your whole site.
Intermittent 500s happen during traffic spikes or deployments. Persistent 500s point to broken code, database connection failures, or a misconfigured server. Treat them as a ranking emergency and fix them before anything else.
503 Service Unavailable β The Right Way to Go Down
A 503 says "temporarily down for maintenance." This is the correct code to serve during planned maintenance or a deploy. Paired with a Retry-After header, it tells Google to come back later without penalizing you.
# Proper 503 response for planned maintenance
HTTP/1.1 503 Service Unavailable
Retry-After: 3600
Content-Type: text/html
Never serve a 200 with "Site under maintenance" text during downtime β Google can index that page, replacing your real content in the index. Always return 503.
Two colleagues at a desk discussing a redirect map chart displayed on a laptop screen
How Status Codes Affect Crawling and Link Equity
Search engines allocate a limited crawl budget to your site β roughly the number of pages they'll fetch in a given window. Every request that returns a non-200 code is budget spent on nothing instead of on discovering and indexing your real content. This matters most on large sites; smaller sites rarely hit a budget ceiling, but the link-equity and indexing effects apply to everyone.
Here's how it plays out:
Redirect chains (301 β 301 β 301 β 200) burn multiple crawl requests for one page and dilute signals at each hop.
Redirect loops (A β B β A) block crawling and indexing for those URLs entirely.
Excessive internal 404s signal a poorly maintained site and waste budget.
Persistent 500s make Google throttle its crawl, slowing discovery of new content.
Google Search Console surfaces these under Pages (Indexing) and Crawl Stats. Check them on a regular cadence β the same way you would when verifying whether your pages are indexed. Status codes also interact with your robots.txt rules and XML sitemap: a sitemap listing URLs that 404 or redirect sends a confusing signal about which pages you actually want crawled.
Fixing Status Code Issues: Server Config Examples
Apache (.htaccess)
For Apache servers, .htaccess is the standard place to implement redirects:
apache
# 301 single page redirect
Redirect 301 /old-page https://example.com/new-page
# 301 entire directory (preserves the path after the prefix)
RedirectMatch 301 ^/blog/old-category/(.*) https://example.com/blog/new-category/$1
# Force HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Force non-www
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(.*)$ https://example.com/$1 [L,R=301]
# Custom 404 and 410 pages
ErrorDocument 404 /404.html
ErrorDocument 410 /410.html
One rule that prevents most chain problems: always point a redirect to the final destination, not to another redirect. If you later move B to C, update the original A β B rule to A β C.
How to Find and Fix Issues β In Priority Order
1. Crawl the Whole Site First
You can't fix what you can't see. A full crawl maps every status code at once: 3xx chains and loops, every 404 and 410 (including ones linked internally), any 500 or 503, and soft 404s. Run a free SlapMyWeb audit to see which of these issues your site actually has β the Crawl & Indexation report flags each one with the affected URLs.
2. Fix 500 Errors
Server errors damage your entire site's trust score. They come first, no exceptions.
3. Flatten Redirect Chains
Collapse any chain longer than one hop into a single 301 that points straight to the live URL.
4. Rescue 404s With Inbound Links
For deleted pages that have backlinks or internal links, add a 301 to the most relevant existing page so the equity isn't lost.
5. Convert Wrong 302s to 301s
Change temporary redirects to permanent wherever the move is actually permanent.
6. Resolve Soft 404s
Either add real content or return a proper 404/410 status.
7. Verify Every Fix
After implementing redirects, recheck each URL's response code. Confirm chains are truly flattened and no new loops appeared.
Person at a standing desk checking a website crawl report on a desktop screen
Common HTTP Status Code Mistakes
Using 302 When You Mean 301
The single most common mistake. A platform or developer defaults to a temporary redirect for a permanent move, so old URLs linger in the index and signals don't consolidate. Audit your redirects and switch permanent ones to 301.
Building Redirect Chains
You redirect A β B, then later B β C, leaving a two-hop chain. Bots and users pay the cost on every request and signals weaken at each step. Always update the original rule to hit the final URL directly.
Ignoring Soft 404s
A soft 404 returns 200 but shows error or empty content. Google identifies these algorithmically and flags them in Search Console. They're worse than real 404s because the crawler keeps revisiting them expecting content, and they can pile up as thin pages.
Not Monitoring After Changes
URL migrations, CMS updates, and plugin changes routinely break existing redirects or introduce fresh 404s. Crawl on a schedule so problems get caught before they compound β and run an immediate audit any time you migrate URLs or switch hosting. Status-code hygiene is a core part of the complete technical SEO guide, and it pays to revisit it after every major site change.
Frequently Asked Questions
Does a 301 redirect pass all link equity?
Google has stated that 301 redirects pass full ranking signals and that 301 versus 302 makes no PageRank difference for permanent moves. In practice the consolidation isn't always instant, but a 301 is always the right choice for a permanent URL change β the alternative, losing a page to a 404, forfeits the equity entirely.
How many 404 errors are too many for SEO?
There's no fixed threshold. Google expects every site to have some 404s, and a 404 on truly deleted content is correct behavior. The problem is 404s that receive traffic, have backlinks, or are linked from your own navigation. Fix those with 301s; leave genuinely dead pages as 404s.
Should I redirect deleted pages to the homepage?
Only when the homepage is genuinely the most relevant replacement. Mass-redirecting deleted URLs to the homepage hurts user experience, and Google may treat those redirects as soft 404s anyway. Send each deleted URL to the closest topical match, or return a clean 404 if nothing fits.
What's the difference between a 404 and a 410?
Both tell Google a page is gone. A 404 means "not found" and Google may keep rechecking it for a while. A 410 means "permanently gone," and Google generally removes it faster and rechecks less. Use 410 when you've deliberately and permanently removed content.
How often should I audit my site for status code issues?
Monthly for most sites; weekly for large or frequently publishing sites. Always run an immediate audit after a URL migration, CMS update, or hosting change. A single crawl catches chains, loops, broken links, soft 404s, and server errors together so you can fix them in priority order.