301 vs 302 Redirects: Which to Use and How to Check a Chain

5 min read
October 25, 2026

Short answer: use a 301 (or 308) when a URL has moved for good: a new domain, HTTPS, a www change, a renamed page. Use a 302 (or 307) only when the old URL will come back, such as a short maintenance page or an A/B test. Google treats a permanent redirect as a strong signal that the target is the page to index and a temporary one as a weak signal.

You can see which kind a URL sends, and every hop after it, with the free redirect checker.

The four redirect status codes

CodeMeaningMethod on the next requestUse it for
301 Moved PermanentlyGone for goodBrowsers may switch POST to GETDomain moves, HTTPS, renamed pages
302 FoundTemporarily elsewhereBrowsers may switch POST to GETShort-lived moves you will undo
307 Temporary RedirectTemporarily elsewhereMust stay the sameTemporary moves of forms and APIs
308 Permanent RedirectGone for goodMust stay the samePermanent moves of forms and APIs

The method column comes from the HTTP standard, RFC 9110. For ordinary page links, where the browser sends a GET anyway, 301 and 308 behave the same, as do 302 and 307. A 303 See Other is a different tool: it sends the browser to a result page with a GET after a form submission.

What Google does with each

Google's documentation on HTTP status codes says a 301 or 308 is "a strong signal that the redirect target should be processed", while a 302 or 307 is "a weak signal". Its redirects guide puts it this way: with a temporary redirect, "the indexing pipeline doesn't use the redirect as a signal that the redirect target should be canonical."

In practice:

  • After a permanent redirect, Google moves the old URL's place in its index to the new one over time.
  • After a temporary redirect, Google may keep showing the old URL in results, because you said it is coming back.

So a site that moved to a new domain with 302s can spend months with the old domain in search results. That is the most common redirect mistake, and it often comes from a hosting panel or plugin whose default is 302.

Meta refresh and JavaScript redirects

Not every redirect is an HTTP status code. Google's redirects guide states that it reads an instant meta refresh (<meta http-equiv="refresh" content="0; url=…">) as a permanent redirect and a delayed one as temporary. It recommends JavaScript redirects only when neither a server-side nor a meta refresh redirect is possible, because Google "might never see it if rendering of the content failed."

The redirect checker follows HTTP redirects and reports a meta refresh on the final page without following it. It does not run JavaScript.

Chains, loops and downgrades

Chains. A chain is a redirect that lands on another redirect. A typical one after an HTTPS and www change:

http://www.example.com/    301 → https://www.example.com/
https://www.example.com/   301 → https://example.com/
https://example.com/       200

Each hop costs the visitor another round trip. Google's crawlers follow up to 10 hops by default, so a short chain still works, but there is no reason to keep one. Point every old variant straight at the final URL:

http://www.example.com/    301 → https://example.com/
https://www.example.com/   301 → https://example.com/

Loops. A loop sends the browser back to a URL it already visited, usually because two rules undo each other (one adds a trailing slash, another removes it). Browsers stop with an error such as "too many redirects", and the page cannot be indexed.

HTTPS downgrades. A chain that goes from https:// to http:// and back exposes that hop to tampering and adds a hop. The checker flags it.

Setting the right code

On Next.js, redirects() in next.config.js takes permanent: true for a 308 and permanent: false for a 307:

async redirects() {
  return [
    { source: "/old-pricing", destination: "/pricing", permanent: true },
  ];
}

On nginx, return 301 https://example.com$request_uri; sends a permanent redirect. On Apache, Redirect 301 /old /new. Most hosting dashboards and CDNs ask you to choose the code when you add a rule. Choose permanent unless you know the move is temporary.

A checklist before you launch or migrate

  1. Check all four variants of your domain: http:// and https://, with and without www. Each should reach the final URL in one hop.
  2. Check old URLs from your previous site structure, especially the ones with backlinks.
  3. Check the exact URL you submit to directories and launch platforms. A listing that links to a redirect still works, but one that links to a loop or a 404 sends nobody anywhere.
  4. Check that the final page answers 200, not 404, and does not send X-Robots-Tag: noindex.
  5. After a domain move, keep the redirects in place for at least a year.

Then check how the final page looks when it is shared with the Open Graph checker. If you have just launched, you can also list your product on ConfettiSaaS.

CS
Published by
ConfettiSaaS
Founder guides from the ConfettiSaaS directory.
Focus: Building, charging for and launching SaaS products. Product facts are checked against vendor documentation on the date given in each guide.