Home / Learn / 301 vs 302 redirects: what's the difference?
Migration & go-live

301 vs 302 redirects: what's the difference?

Short answer: A 301 redirect tells browsers and search engines that a page has moved permanently — search engines transfer the old page's rankings to the new address. A 302 redirect says the move is temporary — the old address keeps its rankings, and search engines expect the page to come back. If a page has moved for good (a renamed page, a site migration, a new domain), use a 301. Use a 302 only when you genuinely plan to bring the original page back.

Redirects sound like a technical detail, but they're one of the highest-stakes settings on a website: pick the right kind and years of built-up Google rankings carry over to a new address; pick the wrong kind and those rankings can quietly stall or split. Here's what each one actually does, in plain language.

What is a redirect?

A redirect is an instruction your website gives to anyone who requests a page at its old address: "this page now lives over here — go there instead." Browsers follow it instantly, so a visitor clicking an old link or an outdated bookmark still lands on the right page. The number — 301, 302 — is the HTTP status code the server sends along with the instruction, and that code is what tells search engines how to interpret the move.

What does a 301 (permanent) redirect do?

A 301 says: this move is final. That one word changes how search engines behave:

  • Rankings transfer. Google treats the new address as the successor of the old one and passes almost all of the old page's ranking authority to it. This is why a site can move to a new domain without starting from zero.
  • The index updates. Over the following weeks, search results start showing the new address instead of the old one.
  • Browsers cache it. Browsers remember a 301 and may jump straight to the new address next time without even asking your server. That's fast — but it also means a 301 is hard to take back once visitors' browsers have stored it.

Use a 301 for renamed pages, deleted pages that have a clear replacement, http:// to https://, www to non-www (or the reverse), and any site or domain migration.

What does a 302 (temporary) redirect do?

A 302 says: the page will be back — send people elsewhere for now. Search engines react accordingly:

  • Rankings stay with the old address. Google keeps the original page in its index, because you've said it's coming back.
  • Nothing transfers. The temporary destination doesn't inherit the original page's authority.
  • Browsers don't cache it. Every visit checks with your server again, so you can remove the redirect at any time and the old page instantly works again.

Genuine 302 use cases are rare and short-lived: a product page redirecting to a "back in stock soon" notice, a page that's down for maintenance, or an A/B test.

Which one should you use?

Situation Use
Page renamed or moved for good 301
Whole site moved to a new domain 301
httphttps, www → non-www 301
Old blog post replaced by a newer one 301
Page temporarily offline or seasonal 302
Short-term test or campaign detour 302

If you're unsure, the answer is almost always 301. The situations that truly call for a 302 are the ones where you already know the page is coming back — and roughly when.

What happens if you use the wrong one?

A 302 where a 301 belongs is the classic, costly mistake. You migrate your site, set temporary redirects, and Google keeps waiting for the old pages to return — so the new pages don't inherit the old rankings for a long time. Google has become better at eventually treating long-lived 302s as permanent, but "eventually" can mean months of lost visibility you never needed to lose.

A 301 where a 302 belongs is the opposite trap: browsers and search engines commit to the move, and when you bring the original page back, cached browsers keep skipping past it. Undoing a widely-cached 301 is slow and messy — which is exactly why you shouldn't use one for anything temporary.

Redirects during a site migration

When a whole website moves — to a new platform, a new structure, or a new domain — 301 redirects are what carry your search rankings across. The rules of thumb:

  1. Keep URLs identical where you can. A page that keeps its address needs no redirect at all, and nothing is safer than that. (This is why a faithful migration preserves your URL structure.)
  2. Map every URL that changes to its closest equivalent — page to page, not everything to the homepage. Bulk-redirecting to the homepage wastes the old pages' authority.
  3. Leave the redirects in place for at least a year. Old links live on in other websites, emails and bookmarks for years; redirects are cheap to keep.

Frequently asked questions

How long should I keep a 301 redirect?

At least a year, and ideally indefinitely. Google recommends keeping migration redirects live for a minimum of one year so it can fully process the move, but links to your old URLs will keep existing on other sites long after that. Redirects cost nothing to keep — removing them is what costs you.

Do redirects slow my website down?

One redirect adds a single, usually imperceptible round trip. What hurts is a redirect chain — old address redirects to another old address, which redirects again. Always point every old URL straight at its final destination.

Do 301 redirects pass full SEO value?

Close to it. Google has said that a proper 301 passes essentially all of a page's ranking signals to the new URL. In practice, expect some short-term fluctuation while search engines process the move, then recovery — provided each page redirects to a genuinely equivalent page.

What about 308 and 307 redirects?

They're stricter modern cousins: 308 is permanent (like 301) and 307 is temporary (like 302), with one technical extra — they forbid browsers from changing the request method, which matters for forms and APIs. For normal web pages, 308 behaves like a 301 and 307 like a 302 in search engines' eyes.

Prefer to have this handled for you?

ShiftPress moves your website off WordPress and takes care of the technical details on this page — redirects, DNS, sitemaps, speed — while you change your site simply by asking.

Get started

Keep learning

What is a sitemap.xml — and does your site need one? How to point your domain at a new website without breaking your email