HTTP Status Codes for SEO: 301 vs 302, Soft 404s, and Status Code Auditing

Status Codes Are the HTTP Contract

Every time a browser or search engine bot requests a URL, the server responds with a status code. These aren't just numbers — they're the communication protocol between your server and the crawling/indexing infrastructure. Getting them wrong sends the wrong message about your content, and search engines take those messages seriously.

The Redirects: 301 vs 302 vs 307 vs 308

301 — Permanent Redirect

The most important redirect for SEO. A 301 tells search engines "this page has permanently moved here — update your records." Google transfers the majority of link equity through 301 redirects (they've confirmed it passes the same PageRank as a direct link, which wasn't always the case).

Use for: domain migrations, HTTP→HTTPS, www→non-www, permanent URL changes.

302 — Found (Temporary Redirect)

A 302 says "this page is temporarily at a different address." Google keeps the old URL in the index, expecting the original to come back. In practice, if you use a 302 for something that's actually permanent, Google will eventually figure it out and treat it like a 301 — but "eventually" might be weeks or months of suboptimal indexing.

Use for: A/B testing where you redirect some users, temporary maintenance pages, geolocation-based redirects where the original URL should stay indexed.

307 and 308 — The Technical Cousins

307 is the HTTP/1.1 version of 302 (temporary), and 308 is the HTTP/1.1 version of 301 (permanent). The difference from 301/302 is that 307/308 preserve the HTTP method — a POST request stays a POST after redirect. For SEO, Google treats 308 the same as 301 and 307 the same as 302.

In practice, I rarely see 307/308 in SEO contexts. If your framework generates them, they're fine. But don't go out of your way to use them over 301/302.

Soft 404s — The Hidden Killer

This is the status code issue that causes the most damage while being the hardest to detect. A soft 404 is when a page returns a 200 status code but its content is essentially an error page: "Sorry, we couldn't find what you're looking for" or a nearly empty template with no real content.

Google is surprisingly good at detecting soft 404s. When they identify one, they treat it like a 404 for indexing purposes — the page gets dropped from the index. But here's the problem: your monitoring tools see a 200 status code and think everything is fine.

Common causes of soft 404s:

  • CMS templates that generate pages for empty categories or tags
  • Search result pages with no results: /search?q=asdfjkl returns 200 but shows "No results found"
  • E-commerce product pages for out-of-stock items that show a generic "Product unavailable" message
  • Dynamically generated pages where the database record has been deleted but the template still renders

Fix: configure your application to return proper 404 status codes when content doesn't exist. A well-designed 404 error page that actually returns a 404 status code is far better than a pretty "not found" message with a 200 status.

410 Gone — The Emphatic Delete

A 410 tells search engines "this page is permanently gone, and it's not coming back." Compared to a 404 (which could be temporary), a 410 triggers faster removal from the index. Google's John Mueller has confirmed that 410 speeds up the removal process compared to 404.

Use 410 for content that's been intentionally and permanently removed — discontinued products, retracted articles, deleted user profiles. Don't use it for pages that might come back or URLs that never existed in the first place (those should be 404).

The 5xx Errors

Server errors (500, 502, 503, 504) are critical for SEO because they affect both crawling and user experience.

503 — Service Unavailable (Use This for Maintenance)

When you need to take your site down for maintenance, return a 503 with a Retry-After header:

HTTP/1.1 503 Service Unavailable
Retry-After: 3600

This tells Google "we'll be back in an hour, please try again then." Without this header, Google doesn't know when to retry and might temporarily reduce its crawl rate for your site. Never use 301 or 302 redirects to a maintenance page — that signals a permanent or temporary move, not a brief outage.

Status Code Auditing

Here's how I audit status codes across a site:

  1. Crawl the site — with Screaming Frog — export the full URL list with status codes. Filter for anything that's not a 200 on pages that should be indexable.
  2. Check redirect chains — look for URLs with multiple redirect hops. Flatten any chains longer than 2 hops.
  3. Cross-reference with Search Console — the Page Indexing report shows URLs with crawl errors, soft 404 detections, and redirect issues.
  4. Test key URLs with curl
curl -o /dev/null -s -w "%{http_code} %{redirect_url}\n" https://example.com/page

For ongoing monitoring, set up automated checks. A simple cron job that curls your top 100 URLs and alerts on non-200 responses will catch most issues before they impact rankings. Tools like UptimeRobot or Pingdom can do this for you if you don't want to build it yourself.

Status codes aren't exciting, but getting them right removes a whole category of potential SEO problems. An afternoon spent auditing and fixing status codes can prevent months of indexing issues down the line.