Technical SEOApril 26, 20269 min read

Ecommerce HTTP Status Codes Explained: 200, 301, 302, 404, 410, 503 — When to Use Each

A practical guide to HTTP status codes for ecommerce. When to use 301 vs 302, what to do with discontinued products (404 vs 410), and how to handle planned downtime with 503.

StoreVitals Team

Most ecommerce SEO problems boil down to using the wrong HTTP status code at the wrong time. A discontinued product returning 200 OK with a "sorry, sold out" page tells Google to keep indexing dead inventory. A redirected campaign URL using 302 instead of 301 leaks every backlink you earned. A planned maintenance window served as 200 with a static notice gets your homepage temporarily de-ranked.

This guide covers every status code that matters for ecommerce, when to use each, and the most common mistakes we see during scans.

200 OK — Page exists and renders normally

Default for any healthy page: product, collection, blog, homepage. Watch for these mistakes:

  • Soft 404s: Returning 200 with a "Page not found" message. Google detects this and treats it as a 404 anyway, but it wastes crawl budget and signals quality issues.
  • Out-of-stock products as 200: Acceptable if the product is coming back. Use the availability: OutOfStock schema property and don't remove the page. If it's permanently gone, see 410 below.
  • Empty search results as 200: A no-results search page should be 200 (the search engine worked, it just found nothing) — but should also include noindex to keep these out of Google.

301 Moved Permanently — Use this for almost every redirect

301 tells search engines and browsers: "this URL has permanently moved, update your bookmarks and your index." Critical properties:

  • Passes ~95-99% of link equity to the destination
  • Cached aggressively by browsers (clearing cache requires changing the URL)
  • Appropriate for: site migrations, URL structure changes, merging duplicate products, replacing discontinued products with successors

The most expensive 301 mistake: chained redirects. Migration A → B happens. Two years later, B → C. Now every link to A goes through two redirects. Each hop loses a small amount of equity, and Google may give up after 5+ hops. Audit chains and update them to point directly to the final destination.

302 Found / 307 Temporary Redirect — Almost never the right choice

302 means: "this URL is temporarily moved, keep the original in your index." Most ecommerce stores use 302 by accident — the framework default for some platforms, especially during A/B testing or session handling.

Use 302 only when:

  • A product is briefly unavailable and will return at the same URL within days
  • You're A/B testing and the redirect is genuinely temporary
  • Geo-redirecting users (though hreflang is usually better)

For everything else — campaign URLs, fixed typos, deleted products — use 301. The accidental use of 302 is the single biggest cause of "we lost rankings after our redesign" complaints.

404 Not Found vs 410 Gone — The discontinued product question

This is where ecommerce stores diverge from regular sites.

Use 404 when:

  • The product might come back (seasonal, restocking)
  • You don't know yet if the URL will be reused
  • The page is genuinely missing due to error

Google revisits 404s for months, hoping they'll resolve. This is usually what you want for ecommerce — "we might restock that camo hoodie next fall."

Use 410 Gone when:

  • The product is permanently discontinued
  • You want Google to drop the URL from its index fast
  • You're cleaning up bulk URLs from a discontinued category

410 signals "this is permanent, deindex now." Removal happens 2-3x faster than 404. Use it when you're sure the URL is dead forever and won't be reused.

Most platforms only support 404 by default. Adding 410 typically requires custom server config or middleware. For Shopify, use a 301 to a parent category instead — Shopify can't return 410.

503 Service Unavailable — The right way to handle planned downtime

If you take your store down for maintenance, migration, or a major sale launch, serve a 503 — not a 200 with a "back soon" page. Why it matters:

  • 503 tells Google "come back later, don't penalize me for being down"
  • Include a Retry-After header so Google knows when to try again
  • 200 with a "we're upgrading" message gets crawled, cached, and may temporarily replace your real content in Google's index

Sample 503 response:

HTTP/1.1 503 Service Unavailable
Retry-After: 3600
Content-Type: text/html

<html><body>We're back at noon ET</body></html>

451 Unavailable for Legal Reasons

Use when geoblocking or removing products due to legal requirements (GDPR, sanctions, regulated products in certain regions). Most stores will never need this, but it's the technically correct code when you do.

3xx Redirect Chains: The Hidden Performance Killer

Every redirect costs ~100-300ms of latency on a slow connection. A chain of three redirects on a mobile device can cost a full second before any page content loads.

Common ecommerce chains:

  • http://https://https://www.https://www./en/ = 4 hops
  • Old product slug → new product slug → category page → homepage = 4 hops
  • Tracking parameter → cleaned URL → mobile redirect = 3 hops

Always redirect directly to the final URL, even if it means updating multiple redirect rules.

Common Audit Findings

From thousands of StoreVitals scans, the most frequent status code issues:

  1. Soft 404s — 200 status with "page not found" content. Easy to find: search your site for "not found" via Google.
  2. 302s where 301s belong — campaign URLs and tracking redirects defaulting to 302.
  3. Discontinued products returning 404 forever — use 410 or redirect to the closest alternative.
  4. HTTPS redirect chains — http://example.com bouncing through 3+ URLs to reach the final HTTPS canonical.
  5. Maintenance pages served as 200 — costs you crawl signal during downtime.

Quick Audit

Run these checks monthly:

  • Crawl your site and flag any redirect chains longer than 1 hop
  • Check Google Search Console → Pages report for "Soft 404" entries
  • Identify high-traffic 404s in analytics (4xx pages getting referrals = missed redirects)
  • Verify your maintenance/error pages return appropriate status codes

StoreVitals reports redirect chains, soft 404s, and broken internal links on every scan. Run a free scan to see your store's status code health.

HTTPstatus codesredirectsSEOecommerce

See these issues on your store?

Run a free scan and find out in seconds.

Run Free Scan