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
| Code | Meaning | What Google does |
|---|---|---|
| 301 Moved Permanently | The page has moved for good | Treats the new URL as canonical; old URL drops from results over time |
| 302 Found | Temporary move | Usually keeps the old URL indexed, at least initially |
| 307 Temporary Redirect | Temporary, keeps the request method | Treated like a 302 |
| 308 Permanent Redirect | Permanent, keeps the request method | Treated 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-2023to/services/web-design-jaipur. - You merged two thin articles into one stronger one.
- You moved from HTTP to HTTPS, or
wwwto 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.