SEO··9 min read

301 vs 302 Redirects: Which to Use and How Google Treats Them

A 301 redirect tells browsers and search engines that a page has moved permanently. A 302 says the move is temporary and the original URL will be back. For visitors the two look identical: they land on the new page either way. The difference is what search engines index and what browsers remember, and choosing the wrong one is a common reason old URLs linger in Google for months after a migration.

The short answer

  • Use 301 (or 308) when a URL has changed for good: a new slug, a merged page, a domain move, HTTP to HTTPS.
  • Use 302 (or 307) when the original URL will return: a temporary sale page, maintenance, A/B tests, or sending visitors to a localized page while keeping one canonical URL.
  • If you're unsure, ask: “Should Google show the new URL in search results?” If yes, it's a 301.

All four redirect codes compared

CodeNamePermanent?Keeps the request method?Cached by browsers?
301Moved PermanentlyYesNot guaranteed: browsers may turn POST into GETYes, by default
308Permanent RedirectYesYesYes, by default
302FoundNoNot guaranteed: browsers may turn POST into GETOnly with caching headers
307Temporary RedirectNoYesOnly with caching headers

For ordinary page links, which are GET requests, 301 and 308 behave the same, as do 302 and 307. The newer codes matter for forms and APIs, where a redirected POST must stay a POST. Some frameworks now use them by default: Next.js redirects return 308 for permanent and 307 for temporary moves.

There is also 303 See Other, used after a form submission to send the browser to a results page with a GET request. It's for application flow, not for moving content.

How Google treats each redirect

Google's documentation splits redirects into two groups:

  • Permanent (301, 308, and an instant meta refresh): a strong signal that the redirect target should be the canonical URL. Google moves the old URL's ranking signals to the new one and, over time, shows the new URL in results.
  • Temporary (302, 303, 307, and a delayed meta refresh): a weak signal. Google follows the redirect to the content, but it may keep showing the original URL in search results, because you've said that URL is coming back.

This is why the choice matters in a migration. Redirect an old URL with a 302 and Google may keep the old URL indexed and displayed for a long time. A 301 lets the new URL take over.

Do 301 redirects lose PageRank?

No. Google has stated that 3xx redirects, permanent or temporary, don't lose PageRank. The old advice that each redirect “leaks” about 15% of link equity is out of date. Chains still have costs, though: each hop is an extra request for visitors and for Googlebot, which follows at most 10 hops before reporting a redirect error.

What if a 302 stays in place for a long time?

Google has said that if a temporary redirect stays in place for a long time, it may start treating it as permanent and index the target. That's a fallback, not something to rely on. If the move is permanent, say so with a 301.

How browsers treat each redirect

Browsers cache 301 and 308 redirects, often indefinitely unless the response includes caching headers that say otherwise. Once a visitor has followed a 301, their browser may go straight to the new URL without asking your server again. That's efficient, but it means a mistaken 301 is hard to undo for people who have already seen it. When you're testing a new redirect rule, start with a 302 and switch to 301 once you've confirmed it's right.

302 and 307 responses aren't cached unless they carry explicit caching headers, so every visit checks with the server.

A related quirk: in Chrome DevTools you may see 307 Internal Redirect on an http:// request. That isn't your server; it's the browser upgrading to HTTPS because the site sent an HSTS header earlier.

When to use each one

SituationUse
Changed a page's URL or slug301
Merged two articles into one301 from the old one to the merged page
Moved to a new domain301 for every URL to its equivalent, not all to the homepage
HTTP to HTTPS, www to non-www301
Deleted a product with a close replacement301 to the replacement
Deleted a page with no equivalentNo redirect: return 404 or 410
Temporary promotion or seasonal page302
Site under maintenanceBetter: a 503 status with Retry-After; not a redirect
Sending visitors to a country or language version302, while each version also declares hreflang
Login required for a page302 to the login page
API endpoint moved, clients send POST308

Redirecting many deleted pages to the homepage is a common mistake. Google usually treats an irrelevant redirect like that as a soft 404, so it gains nothing, and visitors land somewhere they didn't expect. Redirect only when there's a genuinely equivalent page.

How to set up 301 and 302 redirects

# Apache (.htaccess)
Redirect 301 /old-page/ https://example.com/new-page/
Redirect 302 /sale/ https://example.com/black-friday/

# Nginx
location = /old-page/ { return 301 https://example.com/new-page/; }
location = /sale/     { return 302 https://example.com/black-friday/; }

# PHP
header("Location: https://example.com/new-page/", true, 301);
exit;

# Express (res.redirect defaults to 302)
res.redirect(301, "/new-page/");

// Next.js (next.config.js) — permanent: true sends 308, false sends 307
async redirects() {
  return [{ source: "/old-page", destination: "/new-page", permanent: true }];
}

In WordPress, a redirect plugin or your SEO plugin's redirect manager lets you choose the code per rule. Whatever the setup, a redirect should go straight to the final URL. If /old redirects to /newer, which redirects to /newest, update the first rule to point at /newest.

How to check which redirect a page uses

The browser hides the status code, so check it directly. The Redirect Checker lists every hop with its code, and can run as Googlebot or check 20 URLs at once after a migration. From the command line:

curl -sI https://example.com/old-page/ | grep -iE "^(HTTP|location)"
HTTP/2 301
location: https://example.com/new-page/

Also confirm the destination is the URL you want indexed: it should return 200 and carry a self-referencing canonical, which the Canonical Tag Checker verifies. A redirect to a page whose canonical points somewhere else sends Google mixed signals.

Migration checklist

  1. Map every old URL to its closest new equivalent before launch.
  2. Use 301 (or 308) redirects, one hop each, directly to the final URL.
  3. Update internal links, canonicals and the XML sitemap to the new URLs, so you aren't relying on redirects for your own navigation.
  4. Don't block the old URLs in robots.txt. Google has to crawl them to see the redirects.
  5. Keep the redirects for at least a year, and longer if old URLs still get links or traffic.
  6. Watch Search Console's Page indexing report for redirect errors and 404s in the weeks after launch. If redirects loop, see how to fix ERR_TOO_MANY_REDIRECTS.

Frequently asked questions

Is a 302 redirect bad for SEO?

Not when the move really is temporary. It becomes a problem when it's used for a permanent change, because Google may keep the old URL in results. Switching it to a 301 fixes that.

Should I use 301 or 308?

For normal web pages either works, and Google treats them the same. 308 guarantees that POST requests stay POST, which matters for forms and APIs. If your server or framework defaults to 308, there's no need to change it.

Is a meta refresh or JavaScript redirect as good as a 301?

Google can follow both, and treats an instant meta refresh as permanent. But they only work after the page loads, many other crawlers ignore them, and they're slower for visitors. Use a server-side 301 whenever you can.

How long does it take Google to update after a 301?

It depends on how often Google crawls the old URL. Frequently crawled pages can switch within days; rarely visited ones can take weeks or months. Keeping the old URLs crawlable and listing the new ones in your sitemap speeds things up.

The Tech Scouts

Writer at TheTechScout.