301 vs 302 Redirects: Which One Should You Use?

You've moved a page, renamed a folder, or merged two URLs into one, and now you need a redirect. You open your CMS or .htaccess file and see two options staring back: 301 and 302. They look almost identical, both send a visitor to a new address, so it's tempting to just pick whichever one is the default and move on.

That's the mistake that quietly costs sites their rankings. The two codes tell search engines completely different stories about a page, and choosing the wrong one can leave the old URL competing with the new one instead of handing its rankings over cleanly.

Quick Answer

Use a 301 redirect when a page has moved permanently — it passes ranking signals to the new URL and tells search engines to drop the old one from the index. Use a 302 redirect when the move is temporary, like an A/B test or a page under maintenance, since it keeps the original URL indexed and preserves its rankings while the redirect is active.

What are 301 and 302 redirects?

Both are HTTP status codes a server sends before pointing a browser to a different URL. The number is the only thing that changes, but that number carries a completely different instruction for search engines.

The practical takeaway: the code itself is a one-character decision, but it determines whether a page's SEO history transfers or stays parked at the old address.

Why the difference matters for SEO

Picking the wrong redirect type doesn't just create a technical inconsistency — it changes how a page performs in search:

📊 Quick stat The most common redirect-related ranking loss traces back to permanent moves that were implemented as 302s by default, not to 301s being used incorrectly — most CMS platforms default new redirects to 302 unless you specify otherwise.

Step-by-step: choosing and setting up the right one

  1. Ask if the old URL is coming back. If the content or page at that address is gone for good, it's permanent. If it will return — after a sale ends, a test finishes, or maintenance wraps up — it's temporary.
  2. Match the answer to the code. Permanent moves get a 301. Temporary moves, A/B tests, and maintenance pages get a 302.
  3. Set it up through your CMS or plugin. Most platforms and SEO plugins have a redirect manager where entering the old and new URL creates the correct status code without touching server files.
  4. Or add it directly if you manage the server. On Apache, a 301 is written as Redirect 301 /old-url /new-url in .htaccess; a 302 omits the "301" or uses Redirect 302 explicitly.
  5. Point every redirect to a live, relevant page. Redirecting to an unrelated page or a chain of multiple redirects dilutes the value being passed and confuses crawlers.
  6. Verify the status code, not just the destination. Use a header checker to confirm the response is actually a 301 or 302, since a redirect can visually work while returning the wrong code.
  7. Revisit temporary redirects periodically. If a 302 has been live for months with no sign of the original page returning, it's time to convert it to a 301.
Try the Rebrixe Redirect Generator — free Paste a URL, and generate its redirect link in 301,302,307,308. No coding required.
Generate a Redirect →

Common redirect mistakes

1. Leaving CMS defaults unchecked

Many website builders and plugins create 302 redirects by default. If a permanent page move goes live without changing that setting, the old URL can linger in the index far longer than intended.

2. Chaining multiple redirects together

Redirecting A to B, then later B to C instead of updating A directly to point at C, creates a chain that slows page load and can weaken how much ranking value ultimately reaches the final destination.

3. Redirecting everything to the homepage

When a specific page is retired, sending its redirect to the homepage instead of the closest matching page wastes the opportunity to preserve relevance and can look like a soft 404 to search engines.

4. Never revisiting old 302s

A 302 set up during a migration and forgotten about keeps telling search engines the move is temporary indefinitely, which can quietly hold back the new URL's rankings for months.

💡 Pro tip Keep a simple log of every redirect you set up, its type, and why, so a temporary 302 from a past campaign doesn't get forgotten and left live for years.

Real-world examples

How the choice between 301 and 302 plays out in situations most site owners actually run into:

Site migration
Domain change
301, every URL
Every old-domain URL is mapped to its new-domain equivalent with a 301 to consolidate rankings on the new domain.
Marketing team
Landing page A/B test
302, short-term
Traffic is split to a variant page with a 302 so the original stays indexed once the test concludes.
E-commerce store
Discontinued product
301, to category
A removed product page is permanently redirected to its closest matching category page instead of the homepage.
Ops team
Scheduled maintenance
302, hours only
Visitors are sent to a maintenance page with a 302 during a short outage window, then switched back once the site returns.

In each case, the decision came down to one question: will the original URL matter again, or is it gone for good?

301 vs 302 vs 307 vs 308 compared

A look at all four common redirect status codes and where each one actually applies.

Code Meaning Passes SEO signals Best for
301 Moved permanently Yes, consolidates rankings Site migrations, retired pages, merged content
302 Found / moved temporarily No, original keeps signals A/B tests, maintenance, seasonal pages
307 Temporary redirect, strict No, original keeps signals Temporary moves where the request method must not change
308 Permanent redirect, strict Yes, consolidates rankings Permanent moves where the request method must not change

Check any redirect right now — free

The Rebrixe Redirect Checker shows the exact HTTP status code, the full redirect chain, and the final destination URL for any link. No account, no watermark — just paste a URL and see what's actually happening under the hood.

Free Redirect Generator Paste a URL, and generate its redirect link in 301,302,307,308. No coding required.
Generate a Redirect →

Frequently asked questions

A 301 tells browsers and search engines that a page has moved permanently, so ranking signals and indexing should transfer to the new URL. A 302 says the move is temporary, so the original URL should stay indexed and keep its ranking signals while the redirect is in place.
Use a 301. Any time a URL is retired for good, whether from a site migration, a URL structure change, or a merged page, a 301 is the correct signal because it tells search engines to consolidate rankings onto the destination.
Not by default, but it can if the redirect is actually permanent. A 302 on a permanently moved page can leave the old URL indexed and delay or prevent ranking signals from consolidating onto the new one, since search engines take the temporary signal at face value.
As long as the situation is genuinely temporary, such as an A/B test, seasonal page, or maintenance window. Once it's clear the redirect isn't going away, it should be changed to a 301 rather than left as a 302 indefinitely.
A header-checking tool or your browser's network tab shows the HTTP status code returned before the final page loads. Looking for 301 or 302 in that response confirms which type is live, since visually a redirect looks identical either way.
307 and 308 are stricter, protocol-level versions of 302 and 301 that guarantee the request method (like POST) doesn't change during the redirect. For most everyday page-to-page SEO redirects, 301 and 302 are still the ones that matter.
Yes. Most CMS platforms and SEO plugins have a redirect manager where entering the old and new URL creates a proper 301 automatically, without needing to edit server config files by hand.

Generate your redirects in seconds

The Rebrixe Redirect Generator creates the correct redirect links for any URL — no account, no watermark, just paste a link and see the code.

Launch the Redirect Generator →
← Back to blogs