Introduction: Redirects Are Small Changes With Big SEO Consequences
A redirect looks simple on the surface: a user requests Page A and is sent to Page B. But the redirect type you choose—301 (permanent) or 302 (temporary)—quietly tells search engines how to interpret that move. Get it right, and you preserve link equity, consolidate authority, and maintain rankings. Get it wrong, and you risk index bloat, split signals, crawl waste, and traffic drops.
This article goes deep on 301 vs 302 redirects. You’ll learn how each impacts link equity and indexing, when to use which status code, and how to implement them correctly. You’ll also get practical, step-by-step guidance for migrations, content consolidation, A/B testing, and eCommerce use cases, plus code examples and QA checklists to keep your redirects healthy.
Redirect Basics: What They Are and Why They Matter
A redirect is an instruction that tells browsers and bots that a resource has moved. It returns an HTTP status code and a Location header pointing to the new URL.
- Server-side redirects: Implemented at the server or application layer, they’re the most reliable for SEO (e.g., Apache, Nginx, application frameworks).
- Client-side redirects: Implemented in HTML or JavaScript (e.g., meta refresh, JS window.location). These are less preferred for SEO because search engines may handle them differently or later, and users can see delays.
Why redirects matter for SEO:
- They consolidate and pass link equity (PageRank-like signals) to the destination URL.
- They help search engines decide which URL to index (canonicalization).
- They impact crawl efficiency and site performance.
- They influence how browsers cache and revisit pages.
301 vs 302: What Each Status Code Really Means
-
301 Moved Permanently
- Tells bots and browsers that the original URL has permanently moved to the target URL.
- Signals that link equity and canonicalization should consolidate at the destination.
- Browsers often cache 301s aggressively, which can be good for long-term moves.
-
302 Found (Temporary)
- Indicates a temporary move. Search engines may keep the original URL indexed and treat the redirect as a temporary detour.
- Historically, 302s did not pass as much link equity as 301s. Today, major search engines can pass signals across 3xx redirects very well, but a 302 still suggests “don’t change the canonical.”
- Useful for short-lived changes, A/B tests, and maintenance windows.
Other codes worth knowing:
- 307 Temporary Redirect: Similar to 302 but guarantees the HTTP method doesn’t change (more precise behavior for browsers). SEO-wise, treated like a temporary redirect.
- 308 Permanent Redirect: Similar to 301 with method preservation. SEO-wise, acts like permanent.
Bottom line: Search engines can pass link equity through 3xx status codes, but your choice of 301 vs 302 still influences canonicalization (which URL is indexed), how long bots persist with the old vs new URL, and how browsers cache the move.
How Search Engines Handle Redirects Today
Modern search engines are smarter about 3xx redirects than they used to be, but there are still practical differences.
-
Link equity and signals:
- Link signals can pass across 301, 302, 307, and 308. In practice, 301/308 provide the clearest permanent signal to consolidate equity at the destination.
- With 302/307, engines may hesitate to switch the canonical because you’re telling them the move is temporary. Signals often flow, but the original URL may remain indexed longer.
-
Canonicalization and indexing:
- 301/308: Strong signal to index the target URL.
- 302/307: Suggests to keep the source URL as canonical, at least for a while. If a 302 persists, Google may eventually treat it as a 301-like move, but relying on that is risky.
-
Redirect chains:
- Multiple hops (A → B → C) dilute crawl efficiency and can slow signal consolidation. Keep it to a single hop whenever possible.
-
Cross-domain redirects:
- 301 cross-domain moves can consolidate signals across domains if you provide consistent signals (sitemaps, internal links, canonical tags, and redirect maps). A 302 cross-domain suggests a temporary move and can delay consolidation.
Link Equity: Myths, Nuances, and Practical Realities
You’ll often hear conflicting advice about how much “link juice” a redirect passes. Here’s the practical view:
- Modern search engines aim to pass link equity across 3xx redirects, especially 301/308. A one-to-one 301 from an old URL with strong backlinks to a new URL typically preserves most value.
- Redirect chains and loops can hinder signal flow and indexing. Reduce chains to a single hop.
- Consistency matters: The redirect type, canonical tags, internal links, sitemaps, and hreflang must point to the same destination. Mixed signals can slow or dilute consolidation.
- Anchor context and relevance still matter: A redirect won’t “fix” irrelevant backlinks; it transfers signals, not meaningfully change topical fit.
When to Use 301 vs 302: A Decision Framework
Use 301 (Permanent) when:
- You’ve restructured a site or changed permanent URL patterns (e.g., /blog/post-name to /articles/post-name).
- You’re performing a domain or subdomain migration (e.g., example.com → example.co.uk).
- You’ve moved from HTTP to HTTPS.
- You’re consolidating duplicate content or merging pages.
- A product is permanently discontinued and replaced by a close alternative or a category page.
- You’re enforcing a canonical version (non-www → www, trailing slash, lowercase).
Use 302 (Temporary) when:
- You’re running a short-term A/B test.
- A product is temporarily out of stock and you want users to see a category fallback for a few days/weeks.
- You’re geotargeting or seasonally redirecting (but read the caveats below).
- You’re performing short maintenance, promotional campaigns, or event-based redirects that will revert.
Caveats:
- If a 302 lasts for weeks or months, search engines may reinterpret it as permanent. If your intent changes, update the status code to 301 to speed up consolidation.
- Geotargeting redirects can inadvertently block search crawlers from accessing content. Prefer dynamic content or use hreflang and let users choose their region rather than auto-redirecting based on IP.
Practical Scenarios and Best Practices
1) Site Migrations and Domain Changes
- Preferred approach: 301 one-to-one mapping from each old URL to the most relevant new URL.
- Update internal links to point directly to new URLs—don’t rely on the redirect to fix internal navigation.
- Update canonical tags, sitemaps, hreflang, structured data (URLs), and robots.txt references to the new destination.
- Keep both properties in your search console and submit a change-of-address (if moving a whole domain).
- Maintain redirects indefinitely or at least 12–18 months to capture long-tail links and user bookmarks.
2) Moving to HTTPS
- Use 301 or 308 to permanently move HTTP → HTTPS.
- Force a single host and protocol canonicalization (e.g., http://example.com, http://www.example.com, https://example.com should all 301 to https://www.example.com).
- Update mixed content (hardcoded http assets), canonical tags, and sitemaps to HTTPS.
- Consider HSTS once fully migrated to optimize security and enforce HTTPS.
3) Content Consolidation
- If two articles overlap and you consolidate them, use a 301 from the weaker/duplicate URL to the stronger canonical page.
- Migrate the best content, update internal links, and refresh the consolidated piece with a clear title and structured headings.
- Update inbound links where possible by contacting linking sites; this speeds authority consolidation.
4) A/B Testing and Personalization
- Use 302/307 for experiments so search engines understand the change is temporary.
- Avoid cloaking: Make sure the same logic applies to both users and bots. If you must exclude bots from tests, serve them the original control URL consistently.
- Set test durations. Once the test ends and you choose a winner, switch to 301 and update internal links and sitemaps.
5) eCommerce: Out-of-Stock or Discontinued Products
- Temporarily out of stock: Keep the page live with clear messaging, waitlist options, and structured data (e.g., Offer availability). If you must redirect, use a 302 to a related category and return the product page when available.
- Permanently discontinued:
- If a near substitute exists, use 301 to the replacement product.
- If not, 301 to the most relevant category page.
- If there’s no relevant destination, consider 410 Gone (strong signal the page no longer exists), but be sure you’re okay with losing that URL’s equity.
Technical Implementation Examples
Note: Always test in a staging environment first and create a redirect map (old URL → new URL).
Apache (.htaccess)
Force HTTPS and www:
RewriteEngine On
RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
Add trailing slash (for directories), excluding files:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !\.[a-zA-Z0-9]{2,5}$
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^(.+)$ https://www.example.com/$1/ [R=301,L]
Redirect a specific page:
Redirect 301 /old-page/ https://www.example.com/new-page/
Nginx
Force HTTPS and www:
server {
listen 80;
server_name example.com www.example.com;
return 301 https://www.example.com$request_uri;
}
server {
listen 443 ssl;
server_name example.com;
return 301 https://www.example.com$request_uri;
}
Redirect a specific path:
location = /old-page/ {
return 301 https://www.example.com/new-page/;
}
Cloudflare Rules (Conceptual)
- Create a bulk redirect list for one-to-one mappings.
- Use a URL Rewrite/Forwarding rule:
- If Host equals example.com and URI path equals /old-page/
- Then Forwarding URL (301) to https://www.example.com/new-page/
WordPress
- Use a lightweight plugin to manage 301s (be wary of catch-all rules that cause loops).
- Avoid theme-level JavaScript redirects; prefer server-side rules.
- On slugs change, ensure automatic 301 is created and verify with curl.
Testing and QA: Don’t Ship Blind
Before launch:
- Build a redirect map: every old URL has a destination. Prioritize high-traffic/linked pages.
- Crawl the staging site with a crawler (Screaming Frog, Sitebulb) using the old URL list and verify:
- Status code: 301 vs 302 as intended.
- Single hop: A → B (no A → B → C chains).
- Destination is 200 OK (or the intended final status).
- Canonical tag on destination points to itself.
- Hreflang annotations updated and consistent.
Command-line checks:
- Verify headers:
- curl -I http://example.com/old-page/
- Confirm HTTP/1.1 301 Moved Permanently (or 302) and Location: final URL.
Browser and DevTools:
- Ensure no mixed content errors after HTTPS redirects.
- Check caching behavior (browsers may cache 301s).
After launch:
- Monitor Search Console for coverage, indexing, and crawl stats.
- Watch server logs or analytics for 404 spikes and fix missing redirects.
- Measure KPIs: rankings, organic sessions, conversions by landing page, and crawl rate.
- Keep a “watch list” of top 500 old URLs and ensure they behave correctly.
Common Mistakes That Hurt SEO
- Using 302 for a permanent migration. This delays canonicalization and risks split signals.
- Creating redirect chains or loops. Chains waste crawl budget and can degrade performance.
- Relying on JavaScript or meta refresh instead of server-side redirects.
- Not updating internal links, sitemaps, and canonical tags to the new URLs.
- Redirecting everything to the home page. Always map to the most relevant page.
- Failing to consider case sensitivity or trailing slashes (e.g., /Page and /page may be different on some servers).
- Using relative or malformed Location headers. Always provide a proper absolute URL for cross-domain moves.
- Forgetting to maintain redirects long enough. Removing 301s too soon can resurface old URLs in the wild (bookmarks, links).
Analytics and Measurement Considerations
- Preserve UTM parameters: Your redirect should forward query strings unless intentionally stripped.
- GA4 and attribution: Avoid long redirect chains that might lose referrer data; server-side redirects are less likely to disrupt attribution compared to client-side.
- Update goals and segments: If URLs change, adjust analytics goals, funnels, and dashboards.
- Annotations: Mark migration dates in analytics to contextualize performance changes.
- Backlink monitoring: Use link tools to find top referring pages. Outreach to update critical links to point directly to the new URLs.
Canonical Tags, Hreflang, and Redirects: Stay Consistent
- Canonical tags should align with redirects. If /old redirects to /new, canonical at /new should be self-referential, not pointing elsewhere.
- Hreflang annotations must reference the canonical URLs in each language/region variant. After a migration, update hreflang to the new URLs and avoid hreflang pointing at redirected or non-canonical pages.
- Sitemaps should list only canonical destination URLs, not old or redirected paths.
Special Cases: 404 vs 410, Soft 404s, and Parameter Handling
- 404 Not Found:
- Fine for genuinely missing content. If there’s a relevant replacement, prefer a 301.
- 410 Gone:
- Stronger signal that content is intentionally removed. Good for expired content with no replacement.
- Soft 404s:
- Pages that return 200 OK but look like a “not found” page to search engines. Avoid this by returning proper 404/410 when appropriate.
- Parameter handling:
- Use consistent rules to prevent duplicate content from tracking parameters (e.g., UTM). Consider a canonical or parameter handling in search console. Where feasible, pass parameters through redirects using $request_uri.
Actionable Checklist for a Smooth Redirect Deployment
Before:
- Inventory URLs: Export all indexable URLs and prioritize by traffic/links.
- Create a one-to-one redirect map with the appropriate status codes (301 vs 302).
- Update internal links, canonical tags, sitemaps, hreflang, and structured data to destination URLs.
- Prepare server rules and test on staging.
- Crawl staging with the old URLs to validate behavior.
During:
- Deploy in off-peak hours.
- Clear caches/CDN as necessary.
- Spot-check high-priority URLs with curl and browser tests.
- Submit new sitemaps; keep old sitemaps accessible for a few weeks to help discovery.
After:
- Monitor Search Console coverage, crawl stats, and indexation.
- Watch for 404s and unexpected 302s.
- Validate that rankings and organic traffic stabilize; investigate anomalies within 1–4 weeks.
- Keep redirects in place long-term; avoid early cleanup.
Quick Decision Guide (301 vs 302)
- Permanent URL change, site or domain migration: 301
- HTTP → HTTPS: 301 (or 308)
- Consolidate duplicate content: 301
- Trailing slash, www vs non-www canonical: 301
- Temporary promo or A/B test: 302 (or 307)
- Geo/seasonal redirect with plan to revert: 302 (consider alternatives to auto-redirecting)
- Product temporarily out of stock: usually keep 200; if redirecting, 302
- Product permanently discontinued: 301 to replacement/category or 410 if no replacement
Example: Redirect Mapping Strategy for a Blog Restructure
Scenario: You’re changing /blog/ to /insights/, tightening categories, and merging overlapping posts.
Steps:
-
Audit:
- Export all /blog/ URLs, traffic, backlinks, and keywords. Identify overlaps.
-
Map:
- For each blog post, choose the best destination:
- If you’re keeping the post under a new path: 301 /blog/post-name → /insights/post-name
- If merging two similar posts: 301 the weaker one → stronger canonical page.
- If retiring low-value content: 301 to the closest category or 410 if no fit.
- For each blog post, choose the best destination:
-
Implement:
- Add server-side rules for bulk path changes.
- Add individual redirects for exceptions.
-
Align signals:
- Update internal links in nav, footers, and in-content links.
- Update canonical tags to /insights/ URLs.
- Refresh sitemap with the new URLs only.
-
Validate:
- Crawl old URLs, check that each returns 301 and lands on a 200 with the correct canonical.
- Fix chains (avoid /blog/post → /insights/temp → /insights/post).
-
Monitor:
- Track rankings for top URLs pre/post.
- Watch crawl stats and 404 reports; patch gaps quickly.
Troubleshooting: Why Isn’t My Redirect Preserving Rankings?
- Incorrect status code: Using 302 for a permanent move can slow canonicalization.
- Mixed signals: Canonical tags, sitemaps, and internal links still point to old URLs.
- Chains or loops: A → B → C or A → B → A waste crawl budget and reduce trust.
- Irrelevant mapping: Redirecting to a generic page (like home) confuses intent and can lower relevance.
- Thin destination: The new page doesn’t meet the same user intent, has thinner content, or lacks structured data.
- Crawl barriers: Robots.txt blocks, noindex tags, or login walls on destination URLs.
- CDN or cache conflicts: Old headers cached; purge CDN and verify origin responses.
FAQs
-
Do 302 redirects pass link equity?
- Yes, search engines can pass signals through 302s, but 302 indicates the move is temporary. If your goal is permanent consolidation, use 301.
-
How long should I keep 301 redirects?
- Ideally indefinitely. Practically, keep them for 12–18 months at minimum to capture slow-moving links and bookmarks.
-
Can I change a 302 to a 301 later?
- Yes. If a temporary change becomes permanent, switch to 301, update internal links and sitemaps, and recrawl/submit URLs in search console.
-
Which is better: 301 or rel=canonical?
- They serve different purposes. A 301 physically moves users and bots to the new URL and consolidates signals strongly. rel=canonical is a hint for duplicate content within your site. Use 301 for actual moves, canonical for duplicates that remain accessible.
-
Is 308 better than 301?
- For SEO, 308 behaves like a permanent redirect (akin to 301). Use either; 308 preserves HTTP methods for certain requests. Most SEOs still default to 301.
-
Should I use meta refresh or JavaScript redirects?
- Avoid when possible. Server-side 301/302 are more reliable and faster for both users and bots.
Key Takeaways
- Choose 301 for permanent changes; choose 302 for short-lived moves. Your status code shapes how search engines index and consolidate signals.
- Modern search engines pass link equity through 3xx redirects, but clarity and consistency accelerate results.
- Keep redirects lean (single hop), relevant (map to the closest match), and long-lived (12–18 months minimum).
- Align all signals—internal links, canonicals, sitemaps, hreflang—with your redirect destinations.
- Test rigorously, monitor after launch, and fix chains, loops, or coverage issues quickly.
When you treat redirects as strategic infrastructure rather than quick fixes, you preserve hard-earned link equity and protect your rankings—even through large, complex changes.