Indexing and redirects

301 vs 302 redirects: which one should you use?

Use a 301 when a page has moved for good, and a 302 when the move is temporary. The difference tells Google which address to keep in its index. Here's how each redirect works.

A redirect sends visitors and search engines from one address to another. The status code tells them whether the move is permanent or temporary, and that affects which address Google shows in its results.

The redirect codes

CodeNameMeaningUse it for
301Moved PermanentlyThe page has a new home for goodSite moves, changed URLs, merged pages
302FoundTemporarily elsewhereShort promotions, A/B tests, maintenance
307Temporary RedirectLike 302, keeps the request methodTemporary moves for forms and APIs
308Permanent RedirectLike 301, keeps the request methodPermanent moves for forms and APIs

For SEO, 301 and 308 are treated the same way, as are 302 and 307.

How Google treats each one

  • Permanent redirects (301, 308) are a strong signal that the new address should replace the old one in search results. Ranking signals pass to the new page.
  • Temporary redirects (302, 307) are a weak signal. Google usually keeps the old address in its index, because you've said you're coming back.

Google has said redirects don't lose PageRank, so a 301 isn't "leaking" value. And if a 302 stays in place for a long time, Google may eventually treat it as permanent. But it's better to send the right signal from the start.

Free tool

Redirect Checker

Paste an address. See every redirect it goes through, the final page, and whether all versions of your homepage end up in the same place.

Free, no sign-up. Clarnic reads the page the way a search engine does.

Open the full Redirect Checker page →

When to use a 301

  • You changed a page's URL.
  • You moved from HTTP to HTTPS, or between www and non-www.
  • You moved to a new domain.
  • You merged two pages into one.
  • You deleted a page and there's a close replacement.

When to use a 302

  • A product is temporarily out of stock and you send people to a category for a few days.
  • A seasonal page temporarily points elsewhere.
  • You're testing a new version of a page.
  • The site is in short maintenance.

If you're not sure whether you'll ever go back, you probably won't. Use a 301.

Redirect chains and loops

A chain is a redirect to a redirect: A → B → C. Each hop slows the page and adds a point of failure. Google follows up to 10 hops, but fewer is better. Fix chains by pointing A straight to C, and update internal links to the final address.

A loop sends A → B → A, and the page never loads. Browsers show an error; Google gives up.

Other kinds of redirect

  • Meta refresh (<meta http-equiv="refresh">): an instant meta refresh is treated like a permanent redirect, but a server redirect is more reliable.
  • JavaScript redirects: Google can follow them after rendering, but they're slower to be picked up. Use server redirects where you can.

Check a redirect

Enter any address in the checker on this page. It follows every hop, shows each status code and destination, and flags chains, loops, temporary redirects that look permanent, and the common www/HTTPS variations. To check several addresses at once, use the bulk HTTP status checker.

Questions

What is the difference between a 301 and a 302 redirect?

A 301 says a page has moved permanently, so Google indexes the new address. A 302 says the move is temporary, so Google usually keeps the old one.

Do 301 redirects lose SEO value?

No. Google has said permanent redirects pass PageRank without loss.

How long should I keep a 301 redirect?

At least a year, and ideally permanently, especially if other sites link to the old address.

Is a 302 redirect bad for SEO?

Not when the move really is temporary. It's a problem when used for permanent moves, because Google may keep showing the old address.

See what to fix on your website today.

Free plan, no credit card. Your first fixes in about a minute.