Hello ANNA!!
Technical SEO

301 vs 302 Redirects: Which One to Use and When

Redirects are one of those topics where old SEO folklore lingers. You'll still read that a 301 loses a set percentage of link value, or that a 302 passes nothing. Neither is how Google works today. Google has said that 3xx redirects don't lose PageRank. The real difference between a 301 and a 302 is what you're telling Google about which URL to keep in its index.

The redirect types

CodeMeaningWhat Google does
301 Moved PermanentlyThe page has moved for goodTreats the new URL as canonical; old URL drops from results over time
302 FoundTemporary moveUsually keeps the old URL indexed, at least initially
307 Temporary RedirectTemporary, keeps the request methodTreated like a 302
308 Permanent RedirectPermanent, keeps the request methodTreated like a 301

307 and 308 exist mainly for technical reasons: they guarantee a POST request stays a POST. For ordinary page moves, 301 and 302 are what you'll use.

There's one caveat on 302s. If a "temporary" redirect stays in place for a long time, Google may eventually treat it as permanent and index the destination. That's not something to rely on. Use the code that matches your actual intent.

When to use a 301

Use a permanent redirect whenever the old URL isn't coming back:

  • You changed a URL slug, for example /services/web-design-jaipur-2023 to /services/web-design-jaipur.
  • You merged two thin articles into one stronger one.
  • You moved from HTTP to HTTPS, or www to non-www. (The HTTPS and SEO guide covers this.)
  • You moved to a new domain.
  • You discontinued a product and there's a close replacement.
  • You restructured categories on a store.

When to use a 302

Use a temporary redirect when you genuinely intend the original URL to return:

  • A product is out of stock for two weeks and you're sending people to a similar one.
  • A seasonal page, such as a Diwali sale landing page, temporarily points to the main offers page out of season.
  • You're A/B testing a new version of a page on a separate URL. Google's own guidance for testing is to use 302s rather than 301s.
  • Country or language detection that sends users to a local version. Even here, give users a way to switch, and don't redirect Googlebot away from content it needs to see.

Things that aren't proper redirects

Meta refresh. A <meta http-equiv="refresh"> tag in the HTML. Google can follow an instant meta refresh and may treat it like a permanent redirect, but it's slower and worse for users. Use server redirects when you can.

JavaScript redirects. window.location changes. Google can process them after rendering, but they're less reliable and slower to be picked up. Only use them when server-side redirects are impossible.

Redirecting everything to the homepage. When you delete many pages and redirect them all to the homepage, Google often treats those as soft 404s, meaning it ignores the redirect. Redirect to the most relevant equivalent page, or let the URL return a 404 if nothing fits. Fixing 404 errors covers that decision.

Redirect chains and loops

A chain is when URL A redirects to B, which redirects to C, which redirects to D. It happens naturally over years of migrations. Google follows a limited number of hops (it has mentioned up to around ten) before giving up, and every hop adds load time for users.

Fix chains by updating each old URL to point straight to the final destination, and update internal links to point to the final URL so you don't depend on redirects at all.

A loop is when A redirects to B and B redirects back to A. Browsers show an error, and the page is unreachable. Loops usually come from conflicting rules: a CDN forcing HTTPS while the server forces HTTP, or a plugin and .htaccess disagreeing about trailing slashes.

How to set them up

  • Apache: in .htaccess, e.g. Redirect 301 /old-page /new-page, or rewrite rules for patterns.
  • Nginx: return 301 /new-page; inside a location block.
  • WordPress: a redirection plugin is fine, but avoid having two plugins managing redirects.
  • Shopify: URL Redirects under Online Store > Navigation. Shopify can create these automatically when you change a product handle; make sure the option is ticked.
  • CDNs and hosts: many offer redirect rules at the edge, which is fast.

How to keep track

Keep a redirect map for every migration: a spreadsheet of old URL, new URL and redirect type. It sounds tedious until you need to debug something a year later. After launch, crawl the old URL list and confirm each one returns a single 301 to a 200 page.

Watch for backlinks too. If a high-value external link points to a URL that now 404s, a redirect recovers that link value. Checking your most-linked old URLs with the broken link checker catches these quickly.

Export a list of your 50 most-linked or highest-traffic URLs, run them through a redirect checker, and look for anything that returns a 302 for a permanent move, more than one hop, or a 404. Those three fixes cover most redirect problems.

FAQ

301 vs 302 Redirects: Which One to Use and When: common questions

Do 301 redirects lose link value?

Google has said 3xx redirects don't cause a loss of PageRank. Redirecting to an unrelated page, such as the homepage, can still lead Google to treat it as a soft 404 and ignore the signals.

How long should I keep a 301 redirect in place?

Ideally indefinitely, especially if external links point to the old URL. Google has suggested keeping redirects for at least a year, but removing them later gains you nothing and risks broken links.

Can a 302 redirect hurt SEO?

Only if you use it for a permanent move. Google may keep the old URL indexed instead of the new one for a while. Use 302s for genuinely temporary situations.

Should I redirect deleted pages to the homepage?

Not as a blanket rule. Redirect to the closest relevant page if one exists. If nothing matches, a 404 or 410 is more honest and Google handles it fine.

Related guides