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. In 2022, when Shopify migrated thousands of merchant storefronts to a new checkout URL structure, it defaulted many transitions to 301s specifically to avoid this trap — competitors who ran the same kind of migration on 302s reported ranking dips that took months to recover. 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. Google's own documentation confirms this directly — its Search Central guidelines state that 301s pass the full ranking signal within days to weeks, while 302s are treated as a hint, not an instruction, so the original URL can stay in the index indefinitely.

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 and page builders — including default WordPress redirect plugins before manual configuration — set new redirects to 302 unless the site owner explicitly changes it.

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. On Nginx, the equivalent is return 301 https://example.com/new-url; inside the relevant location block.
  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

These are the four mistakes that show up most often in technical SEO audits, roughly in order of how much ranking damage they cause.

1

Leaving CMS defaults unchecked

Many website builders and plugins create 302 redirects by default. A common real-world case: a WooCommerce store discontinues an old product URL and lets the plugin's auto-redirect handle it, not realizing the default is temporary. Months later, the old product URL is still indexed, splitting authority that should have consolidated on the replacement page.

Fix: Check your plugin or CMS redirect settings once, and set the default status code to 301 for anything you mark as a permanent move.
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. This is especially common after a site goes through two or three redesigns over several years, where each redesign added a new hop without cleaning up the old ones — some enterprise sites accumulate chains five or six redirects long before anyone audits them.

Fix: Audit your redirect map at least once a year and flatten any chain so every old URL points directly to the current live page.
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. This happens most often during bulk migrations, where a developer maps hundreds of discontinued URLs to / as a shortcut instead of mapping each one individually.

Fix: Map each retired URL to its closest live equivalent — a category page, a parent article, or a similar product — not a blanket homepage redirect.
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. This is one of the most common findings in technical SEO audits of sites that migrated domains or replatformed a year or more ago — the redirect still works perfectly for visitors, so nobody notices the status code was never corrected.

Fix: Keep a redirect log with dates, and set a calendar reminder to convert any 302 that's still live after 60–90 days.
💡 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.
Case in point

An HTTPS migration that almost went wrong

A mid-sized publisher moving from http:// to https:// is one of the most common permanent-redirect scenarios in practice. The site owner sets up redirects for every page, but the hosting provider's default SSL configuration ships with 302s. Search Console starts showing both the HTTP and HTTPS versions of the same articles indexed separately within a few weeks, splitting click and impression data between two versions of the same page.

The fix is straightforward once identified: switch the server config from a 302 to a 301 for the entire HTTP-to-HTTPS ruleset. Within a month, Google Search Console typically consolidates the two versions and impressions merge back onto the HTTPS property.

Lesson: always check your host's default SSL redirect type — HTTPS migrations are permanent moves and need a 301, not whatever the hosting panel ships with.

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

The "strict" distinction matters more than it sounds. A 301 or 302 technically permits browsers to switch a POST request to a GET request during the redirect, which is harmless for a normal page move but can silently break a form submission or API call. A 307 or 308 guarantees the method stays exactly the same, which is why they're the safer choice for redirecting endpoints that receive form or API data rather than simple page views.

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. The underlying mechanics are identical — same HTTP response, same instant redirect for the visitor — the only difference is the status code number and the instruction it carries to crawlers.
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. This applies whether you're moving a single blog post or an entire domain during a rebrand.
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. The damage isn't the redirect itself, it's the mismatch between what the code claims and what's actually happening to the page.
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 useful rule of thumb: if a 302 has been live for more than 60–90 days with no plan to remove it, treat that as the signal to convert it.
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 — the browser gives no indication of which code sent it to the new page.
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 — 307 and 308 mainly come up when redirecting API endpoints or form submission URLs.
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. For static sites or custom servers, a one-line rule in .htaccess or an Nginx config accomplishes the same thing.

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