# 301 vs 302 vs 307 vs 308 Redirects: Which One a SaaS Site Should Use

> A 301 vs 302 redirect decision for SaaS sites: which status code fits renamed features, moved docs, trials, app routes and API endpoints, and how to test it.

Source: https://comppound.com/blog/301-vs-302-vs-307-vs-308-redirects-which-one-a-saas-site-should-use (published 2026-10-30)

The 301 vs 302 redirect choice comes down to one question: is the move permanent? Use a 301 when the old URL is gone for good and a 302 when you intend to bring it back. A 308 and a 307 make the same permanent and temporary promises, with one extra rule: they forbid the browser from changing the request method. For marketing pages that rule rarely matters. For API endpoints and forms it can decide whether a request works.

Google reads the four codes in two groups. [Its redirect documentation](https://developers.google.com/search/docs/crawling-indexing/301-redirects) treats 301 and 308 as permanent, so the target becomes the [canonical URL](/blog/canonical-urls-on-saas-sites-common-issues-and-fixes), and treats 302, 303 and 307 as temporary, so the source URL usually stays in search results.

## The four codes side by side

| Code | Promise | Request method on redirect | What Google does | Best fit on a SaaS site |
| --- | --- | --- | --- | --- |
| 301 | Permanent | Browsers may change POST to GET | Target becomes canonical | Renamed pages, merged posts, domain moves |
| 302 | Temporary | Browsers may change POST to GET | Source usually stays in results | Short-lived campaigns, maintenance |
| 307 | Temporary | Method and body preserved | Source usually stays in results | Temporarily rerouting POST requests |
| 308 | Permanent | Method and body preserved | Target becomes canonical | Permanently moved API routes and form handlers |

There is one more practical point about 307. Your browser may show one when you visit an HTTP address on a site using HSTS, a setting that forces HTTPS. That redirect is generated inside the browser, not sent by your server, so seeing it in dev tools doesn't mean your server configuration is wrong. Check with a command-line request instead.

## Matching the code to real SaaS situations

Generic guides stop at "permanent or temporary". The harder part is recognizing which one you are in, because SaaS sites change in ways a typical website doesn't.

**You renamed a feature.** Say you run an analytics SaaS and "Pulse Reports" becomes "Live Dashboards". The old page should 301 to the new one. The product name changed for good, and you want the new URL to carry the old page's signals.

**You consolidated two blog posts.** When two articles compete for the same query and you merge them, 301 the weaker one to the stronger. A 302 here would leave the weak URL in play. Our post on [detecting and resolving keyword cannibalization](/blog/how-to-detect-and-resolve-keyword-cannibalization-on-your-site) covers how to choose which one survives.

**You are running a limited offer.** If `/pricing` points to `/pricing-black-friday` for a week, that is a 302, since `/pricing` is the URL you want to keep ranking. A 301 would tell Google to prefer a page that will soon be gone.

**The product is down for planned maintenance.** Don't redirect public pages to a maintenance page if you can avoid it. For an outage, Google's general guidance is to return a 503 status, which says the problem is temporary without moving anything.

**You moved an API endpoint.** Use 308 if clients send POST, PUT or PATCH requests. With a 301, some clients will resend the request as a GET and drop the body, which produces confusing failures rather than clean errors. Search engines have no stake in this one, so choose for the client's behavior.

**Logged-out users hit an app route.** Sending `/app/settings` to `/login` should be temporary, since `/app/settings` is still a real address. Crawlers that reach it get a 302 or 307 toward login, and app routes should be kept out of the index anyway.

**You changed domains.** A rebrand or domain move uses 301s from every old URL to its exact equivalent on the new domain, as part of a full migration plan. Sending every old page to the new homepage throws away most of what you are trying to keep.

## What happens if you pick the wrong one

A 302 left in place for months is the common mistake, and it usually comes from a framework or hosting default. The cost isn't as dramatic as older advice suggests. Google says the source URL usually stays in results with a temporary redirect, and the target may still be indexed if other signals point there. So a long-running 302 tends to produce a muddled result: the wrong URL shown in search, or a slow and uncertain switch to the right one.

A wrong 301 can be harder to undo. Browsers cache permanent redirects, so anyone who followed it may keep being sent to the target after you remove it from the server. If you aren't sure the move will stick, start with a 302, confirm that everything works, then switch to a 301. Google's own wording is to use permanent redirects when you are sure they won't be reverted.

## How to implement them without creating new problems

Set redirects on the server or at the edge, where possible, so the crawler gets a status code before any page loads. Google documents JavaScript redirects as a last resort because rendering can fail, and a redirect that is never rendered is a redirect it never sees.

In Next.js, the `redirects` option in `next.config` takes a `permanent` flag, and the codes it sends are 308 for permanent and 307 for temporary rather than 301 and 302. Google treats 308 like 301 and 307 like 302, so this isn't an SEO problem. It is worth knowing, because a teammate checking for a "301" will think the rule is broken. Check the current documentation for your framework version before relying on any default, since these details can change.

Four habits keep a redirect setup healthy:

- Point each redirect straight at the final URL, because chains slow crawlers and users. The same applies to [redirecting HTTP to HTTPS](/blog/how-to-redirect-http-to-https-without-losing-rankings).
- Map old URLs to their closest equivalent page, because a redirect to an irrelevant page may be treated as a soft 404.
- Update internal links to the new URL, so your own site stops depending on the redirect.
- Keep redirects in place for at least a year after a move, which is the minimum Google suggests for site moves, and longer if old links still bring visitors.

## How to confirm a redirect works

Don't judge by where your browser lands. A browser hides the status code and may be replaying a cached redirect. Use a request that shows each hop:

```
curl -sIL https://example.com/old-page
```

The output lists each response and its status. You want one redirect followed by a 200 on the final URL. More than one hop means a chain to flatten.

Then check how Google sees it. URL Inspection in Search Console reports the page that Google selected as canonical, and the page indexing report lists URLs excluded as "Page with redirect". Finding your old URLs there is normal after a change, and it is what you were aiming for.

For a site with many historical redirects, run a crawl each quarter and export every 3xx response. It usually turns up chains from past redesigns and internal links that still point at old addresses, both of which are quick fixes.

Redirects are one small part of keeping a growing site crawlable. If you want that handled as part of ongoing SEO work, [explore SEO Growth](/services/seo-growth).

## Frequently asked questions

### Does a 302 redirect pass PageRank?

Google representatives have said that 3xx redirects don't lose PageRank, though Google's documentation focuses on canonicalization. The practical difference between 301 and 302 is which URL Google tends to show: a permanent redirect favors the target, while a temporary one usually keeps the source in results.

### Should I use 301 or 308?

For ordinary web pages either works, as Google treats both as permanent. Use 308 when the request method must be preserved, such as a moved API route or a form that posts data.

### How long should I keep a 301 redirect in place?

Keep it for at least a year after a site move, and longer if the old URL still receives links or traffic. There is little cost in keeping redirects, and removing them can break old links.

### Why does my browser show a 307 I never configured?

It is often HSTS, which makes the browser upgrade HTTP requests to HTTPS internally. Test with curl to see what your server actually returns.

## About Comppound

Comppound runs SEO and AI search for B2B SaaS companies: a person sets the plan and reviews samples and every high-risk page, and AI speeds up production.

- [Check a page free](https://comppound.com/tools/seo-checker): Check one of your pages before you change anything else
- [See pricing](https://comppound.com/pricing): Want the content written, reviewed and published for you?
