# HTTP status codes for SEO: what each one tells Google

Status codes are crawl signals. Google reads them on every fetch, then decides whether to crawl more, index or drop a page. Here is what each key code means for your site, how to pick the right redirect, and how to check your URLs fast.

Updated 2026-09-14 · Source: https://porteur.ai/guides/http-status-codes-for-seo

## What Google does with status codes

Googlebot requests a URL, gets a status code, and acts. The code shapes crawl rate, canonical choice and index state. Get the code wrong and you send the wrong instruction.

- 2xx: content is available. Google can index the content at the final URL.
- 3xx: a redirect. Google follows, consolidates signals to the target when it trusts it, and may replace the old URL in the index.
- 4xx: a client error. Google drops or avoids indexing. Some 4xx shrink crawl on that path.
- 5xx: a server error. Google will retry, but persistent 5xx reduces crawl and can remove pages from the index.

Your aim: a clean 200 for every page that should rank. One hop 301 for every moved page. A clear 404 or 410 for pages that should not exist.

## The status codes that matter for SEO

| Code | Name | What it tells Google | Crawl and index behaviour | Notes |
| --- | --- | --- | --- | --- |
| 200 | OK | The page is here and renders | Indexable if not blocked or noindexed | Use for every live page like /pricing |
| 301 | Moved Permanently | This URL moved to a new URL | Google follows, consolidates signals to target | Use one hop to the exact new URL, not the home page |
| 302 | Found | Temporary redirect | Google often keeps the old URL indexed if change looks temporary | Use only for short tests or geolocation, not for site moves |
| 307 | Temporary Redirect | Temporary redirect with method preserved | Same intent as 302, temporary | Use when you need a strict temporary redirect |
| 308 | Permanent Redirect | Permanent redirect with method preserved | Like 301, treats move as permanent | Use for permanent moves when method preservation matters |
| 304 | Not Modified | Content unchanged since last crawl | Saves crawl budget, no index change | Requires proper caching headers |
| 404 | Not Found | No page at this path | Google removes or avoids indexing | Return 404 on dead URLs, not a 200 with error text |
| 410 | Gone | The page was removed on purpose | Google tends to drop faster than 404 | Use for removals like deleted blog posts with no replacement |
| 401 | Unauthorised | Auth needed | Blocked from crawling and indexing | Keep private areas 401 or behind login, not indexable |
| 403 | Forbidden | You are not allowed | Google cannot access, may keep old index for a while | Fix if it should be public, else leave as is |
| 429 | Too Many Requests | You are rate limiting | Google slows crawl for a time | Tune to avoid throttling Googlebot under normal load |
| 500 | Internal Server Error | The server failed | Google retries, persistent errors harm crawling and indexing | Debug and fix at source, watch logs for spikes |
| 503 | Service Unavailable | Temporary outage or maintenance | Google retries, does not assume removal | Use for planned maintenance with a Retry-After header |

These are the codes you will touch in practice. Learn them and you avoid most crawl and index headaches on a small site.

## Soft 404s: when a 200 is treated like a 404

A soft 404 is a page that returns 200, but Google judges it empty or irrelevant to the URL. It treats it like a 404 and may exclude it.

- Empty category pages that say “No products found” with thin content, but 200.
- A site move that 301s many old URLs to the home page instead of their real matches.
- Error templates that show as normal pages with a 200.

Fix by returning the right code or the right redirect. If the page is gone, use 404 or 410. If it moved, 301 to the exact new URL. If it is thin, add real content or noindex it until fixed.

> Rule: never blanket redirect old URLs to the home page. Map each old URL to its true replacement.

## 301, 302, 307, 308: which redirect to use and why

Pick permanent for real moves, temporary for short tests. Google treats permanent redirects as a strong signal to index the target and shift signals over time.

- Use 301 or 308 for permanent moves. Example: /guides/getting-started to /guides/start-here.
- Use 302 or 307 for temporary states. Example: A short campaign URL that points to /pricing for a week.

On a site move with URL changes as of 2026, build a one to one redirect map. Every old URL 301s to the one new URL that replaces it. Do not 301 everything to the home page, that pattern is read as soft 404s. Test the map before the switch and keep it for at least a year, longer if you can. Update internal links, canonicals, hreflang, structured data and the sitemap to the new URLs and expect some fluctuation for weeks.

```js
// next.config.js example
module.exports = {
  async redirects() {
    return [
      { source: '/guides/getting-started', destination: '/guides/start-here', permanent: true },
    ];
  },
};
```

## HTTP to HTTPS, trailing slash, and www vs non-www

Google treats HTTP to HTTPS as a site move. Plan it and keep redirects simple. One hop from http to the exact https twin on every path.

- 301 every HTTP URL to HTTPS in one hop.
- Update internal links, canonicals, hreflang and sitemaps to HTTPS.
- Avoid mixed content. Consider HSTS. Verify the HTTPS property in Search Console.

/page and /page/ are different. Pick one and redirect the other. Keep internal links consistent. In Next.js you can set trailingSlash to true or false and match your redirects to that choice.

www and non www are different hosts. Pick one, 301 the other for every path, and set canonicals to the chosen host. In Search Console, verify a Domain property so you see both variants in one view.

## 503 for maintenance, and 429 for crawl rate control

Use 503 for short downtime or deploy windows. It tells Google the outage is temporary and to retry. Add a Retry After header where you can.

Do not leave a 503 up for days. If Google only sees 503 for a long time it will drop pages. Keep maintenance tight, test on a staging host, and deploy fast.

429 tells Google you are rate limiting. Google will slow crawl when it sees many 429s. That can save your origin during a surge, but it will slow discovery too.

- Serve 200 to Googlebot under normal load. Avoid blanket 429 on Googlebot.
- Set sensible per IP or per token limits. Exempt your static assets when possible.
- Watch your logs. If 429 appears for Googlebot, raise limits or add exceptions.

## How to check a URL’s status code

1. **Use curl from your terminal** Run curl -I https://yourproduct.com/pricing. Look at HTTP/2 200 or the redirect chain. Follow with curl -I -L to see the final 200.
2. **Use your browser devtools** Open the Network panel, load the page, and click the document request. Read the status and any redirects.
3. **Use a redirect checker** Enter https://yourproduct.com/guides/getting-started and see the hop chain and final code. Save the result for your migration test notes.
4. **Use Search Console’s URL Inspection** Inspect the URL to see the URL Google considers canonical and the crawl status. Fetch the page to confirm what Googlebot sees.

For bulk checks, crawl your site. Export all non 200s and review them by type and template. Fix templates before isolated cases.

## Build and test a redirect map for a site move

A redirect map is a two column table, old URL and new URL. Keep it in your repo. Apply it at the edge or the server. Test it before launch.

1. **Crawl the old site and export URLs** Include the old sitemap and Search Console’s known pages. Add your top landing pages from analytics if you have them.
2. **Map each old URL to one new URL** Use exact matches where possible. If content is merged, choose the closest target and update internal links.
3. **Implement one hop 301s** Use an nginx map or framework redirects. Avoid rewrite loops and multiple hops.
4. **Test every old URL** Write a script to request every old URL and confirm the final status is 200 and the hop count is one.
5. **Tell Google about a domain move** For a domain change, verify both domains in Search Console and use Settings, Change of address. This does not cover path only or HTTPS only moves.
6. **Keep the old domain live** Keep redirects for at least a year, longer if possible. Keep the old sitemap listed for a while so Google recrawls and finds redirects.

```bash
# Simple check: final status and hops
urls_old='old-urls.txt'
while read -r u; do
  final=$(curl -s -o /dev/null -w "%{http_code} %{url_effective} %{redirect_url} %{num_redirects}\n" -L "$u")
  echo "$u -> $final"
done < "$urls_old"
```

A clean run shows each old URL, the final 200 and zero or one redirect. Example: /blog/how-we-built-x to /blog/how-we-built-y, 301 then 200. No chains.

## Fixing common status code problems

- 200 on error pages: return 404 or 410. Update templates to set the right header and a clear message.
- Looping redirects: fix regex or order. Test sample URLs from every template, like /pricing and /pricing/.
- Multiple hops: collapse to one hop. For http to https and non www to www, combine rules to reach the final URL in one step.
- Wrong use of 302 for moves: switch to 301. Update canonicals and sitemaps at the same time.
- Mixed slash variants: choose with or without trailing slash. Redirect the other and fix internal links.
- Blocked HTTPS: fix certificates and HSTS order. Only HSTS after a working HTTPS setup everywhere.
- 403 or 401 on public content: check firewalls, allow Googlebot, and confirm no country blocks on core paths.
- Persistent 5xx on a template: roll back the deploy. Add health checks. Watch error rates in logs.

After changes, check Search Console’s Page indexing and Crawl stats reports. Look for drops in server errors and a rise in crawled pages at 200.

## Questions

### Do 301 redirects pass all signals to the new URL?

Google treats a 301 or 308 as a strong signal to index the target and consolidate signals. The shift can take time. Keep the 301s in place for at least a year, longer if you can, and update canonicals and internal links so the intent is clear.

### Should I use 302 or 307 for a temporary redirect?

Either can be temporary. 307 preserves the HTTP method and is the stricter version. For SEO, the key is that both signal temporary. Use them only when the source URL will come back soon.

### Is 404 bad for SEO?

404 is correct for pages that no longer exist. It helps Google clean up the index. It is a problem only if you return 404s on pages that should be live, or you link to many 404s from your own pages and emails.

### When should I use 410 instead of 404?

Use 410 when you removed a page on purpose and there is no replacement. Google tends to drop 410s faster. For bulk removals, 410 can speed clean up after pruning content.

### How do I handle a domain change?

Set a one to one 301 map from every old URL to its new URL. Verify both domains in Search Console and use the Change of address tool. Keep redirects and the old sitemap for at least a year. Update internal links, canonicals, hreflang and structured data to the new URLs.

### What is a soft 404 and how do I fix it?

It is a 200 page that Google reads as empty or unrelated to the URL’s intent. Fix by returning 404 or 410 when content is gone, or by 301ing to a true replacement. Avoid mass redirects to the home page on a migration.

## Read next

- [Build a redirect map: one old URL, one new URL, tested](https://porteur.ai/guides/redirect-map): A practical redirect map: where to find old URLs, how to match them, store the table, apply 301s, and test every row for one hop and a 200.
- [Moving from HTTP to HTTPS: the checklist that keeps rankings](https://porteur.ai/guides/http-to-https-migration): Move from HTTP to HTTPS without losing rankings. Use one-hop 301s, update canonicals and sitemaps, fix mixed content, and verify the HTTPS property.
- [Changing your domain without losing search traffic](https://porteur.ai/guides/domain-change-seo): Change domains without tanking your rankings. Map 301s one to one, use Change of Address, update canonicals and hreflang, and keep redirects for a year.
- [How to fix 404 errors reported in Search Console](https://porteur.ai/guides/how-to-fix-404-errors-in-google-search-console): Decide which 404s to fix, find the ones with links or traffic, choose redirect, restore or 410, clean internal links and sitemaps, and revalidate.
- [Soft 404: when a page says 200 and Google reads not found](https://porteur.ai/guides/soft-404): Soft 404 means your server says 200 but the page reads like an error or empty. See where it shows in Search Console and fix each case fast.
- [How to use the URL Inspection tool in Search Console](https://porteur.ai/guides/url-inspection-tool): Read each panel, run Test live URL, and know when to request indexing. Fix new pages, dropped pages, and canonicals Google ignores.
- [410 Gone](https://porteur.ai/glossary/410-gone): 410 Gone means you deleted a URL on purpose and it will not return. Here is when to use 410 vs 404 or 301, how Google treats it, and what to fix.
- [The 404 page: the status code, and what the visitor sees](https://porteur.ai/guides/how-to-design-a-404-page): Why a 404 must return 404, how soft 404s pollute your index, what belongs on the page for visitors, and when a redirect is the better answer.

Paste your URL and get a free check in about thirty seconds: it reads your site, the searches around it and the rivals on them, and shows three findings whole. Free check: https://porteur.ai/
