Free SEO audit for new clients — claim yours
Home/Blog/Technical SEO/301 vs 302 Redirects: Which One Should You Use?
Technical SEO

301 vs 302 Redirects: Which One Should You Use?

301 vs 302 Redirects: Which One Should You Use?
Table of contents
  1. Key Takeaways
  2. What Is a Redirect?
  3. 301 vs 302: The Core Difference
  4. When to Use a 301 Redirect
  5. When to Use a 302 (or 307) Redirect
  6. How to Implement Redirects: Step by Step
    1. Apache (.htaccess)
    2. Nginx
    3. Meta refresh (when you cannot touch the server)
  7. Redirect Chains and Loops
  8. How Long Should Redirects Stay in Place?
  9. Common Mistakes With Redirects
  10. How to Audit Your Existing Redirects
  11. Related Guides
  12. Frequently Asked Questions
    1. Does a 302 redirect lose link equity?
    2. What happens if I use a 302 for a permanent move?
    3. What is the difference between 301 and 308?
    4. How long should I keep a 301 redirect?
    5. Are JavaScript redirects bad for SEO?
    6. How many redirects in a chain will Google follow?
  13. Conclusion
  14. References

Redirects look like a tiny technical detail until a site migration goes wrong. Choose the wrong status code and the old URL can linger in search results for months; build a chain of redirects and crawlers waste time hopping from URL to URL before reaching the real page.

The good news is that the choice between a 301 and a 302 is simple once you understand what each one tells search engines. In this guide you will learn how Google interprets every common redirect type in 2026, when to use a permanent or temporary redirect, how to implement them on Apache, Nginx and WordPress, and how to audit redirects you already have.

Key Takeaways

  • A 301 (or 308) says “this URL has moved permanently”; a 302 (or 307) says “this is temporary, keep the original”.
  • Google uses permanent redirects as a strong signal that the target should become canonical; temporary ones do not send that signal.
  • Server-side redirects are best. Instant meta refresh is acceptable; JavaScript redirects are a last resort.
  • Keep redirects for at least a year, and redirect straight to the final URL to avoid chains.
  • Always redirect to the most relevant equivalent page, not blanket-redirect everything to the homepage.

What Is a Redirect?

A redirect is a server response that sends browsers and crawlers from one URL to another. Instead of returning the page with a 200 OK status, the server returns a 3xx status code plus a Location header naming the new address. Browsers follow it instantly, so most users never notice.

HTTP/1.1 301 Moved Permanently
Location: https://www.example.com/new-page/

For search engines, the status code carries meaning. It tells Google whether to replace the old URL in its index or keep the old one and treat the move as temporary.

301 vs 302: The Core Difference

Google's documentation is direct about how to pick one:

“Use permanent redirects when you're sure that the redirect won't be reverted.”

— Google Search Central, Redirects and Google Search

Under the hood, the difference is about canonicalisation. With a permanent redirect, Google's indexing pipeline uses the redirect as a signal that the target should be canonical. With a temporary redirect, it does not, so the original URL is more likely to stay in the index. Ranking signals are consolidated onto whichever URL Google chooses as canonical, which is why choosing correctly matters.

Status / methodMeaningHow Google Search treats itTypical use
301 Moved PermanentlyPermanentStrong signal the target is canonicalURL changes, HTTPS move, domain migration, merging pages
308 Permanent RedirectPermanent, method preservedSame as 301Permanent moves where POST must stay POST (APIs, forms)
302 FoundTemporaryNot used as a canonical signal for the targetShort promotions, A/B tests, temporary maintenance pages
307 Temporary RedirectTemporary, method preservedSame as 302Temporary moves where the request method must not change
303 See OtherTemporarySame as 302Sending a user to a confirmation page after a form POST
Instant meta refresh (0 s)PermanentTreated as permanentWhen you cannot change server config
Delayed meta refresh (>0 s)TemporaryTreated as temporaryRarely recommended
JavaScript locationPermanentTreated as permanent if Google renders itLast resort only

One note on browsers: a 301 is cached aggressively by browsers. If you set one by mistake, some visitors' browsers may keep following it even after you remove it. That is another reason to reserve 301s for genuine permanent moves.

When to Use a 301 Redirect

  • You change a page's URL slug or folder structure.
  • You move from HTTP to HTTPS, or from non-www to www (or the reverse).
  • You migrate to a new domain or rebrand.
  • You merge two thin or overlapping articles into one stronger page, which is a common fix for keyword cannibalisation.
  • You retire a product and have a close replacement or a highly relevant category page.

When to Use a 302 (or 307) Redirect

  • A product is temporarily out of stock and you want to point users elsewhere for a few days.
  • You are running a short seasonal campaign and will restore the original URL afterwards.
  • You are testing a new page design and want the original URL to remain the indexed version.
  • You send users to a location- or language-specific page based on their settings, while keeping the main URL as the canonical one.

The key question is simple: will the original URL come back? If yes, use a temporary redirect. If no, use a permanent one.

How to Implement Redirects: Step by Step

  1. Map old URLs to new ones. Build a spreadsheet with every old URL and its best-matching new URL. Prioritise pages with backlinks and organic traffic.
  2. Pick the right status code for each row using the table above.
  3. Implement server-side. Use your server or CMS (examples below) rather than JavaScript.
  4. Update internal links so they point directly at the new URLs instead of relying on redirects. Our guide to internal linking explains why this matters.
  5. Update canonicals, hreflang and the XML sitemap to list only final destination URLs. See our XML sitemap guide.
  6. Test every redirect with a crawler or curl -I to confirm one hop and the correct status code.
  7. Monitor Search Console for crawl errors and indexing changes over the following weeks.

Apache (.htaccess)

# Single permanent redirect
Redirect 301 /old-page/ https://www.example.com/new-page/

# Temporary redirect
Redirect 302 /summer-sale/ https://www.example.com/offers/

Nginx

location = /old-page/ {
    return 301 https://www.example.com/new-page/;
}

Meta refresh (when you cannot touch the server)

<meta http-equiv="refresh" content="0; url=https://www.example.com/new-page/">

On WordPress, a redirect plugin or the redirect manager in your SEO plugin handles this without editing server files. On Shopify, use the built-in URL redirects in the admin.

Redirect Chains and Loops

A chain happens when URL A redirects to B, which redirects to C. Chains usually build up over years of migrations. Google's crawlers follow up to 10 hops, but its site-move documentation advises redirecting straight to the final destination and, if that is impossible, keeping chains to ideally no more than three hops. Long chains also slow users down because each hop is a new request, which hurts page speed.

A loop happens when URLs redirect back to each other. Neither users nor crawlers ever reach a page, so loops must be fixed immediately.

How Long Should Redirects Stay in Place?

Google's site-move guidance says to keep redirects for as long as possible, generally at least one year, and from a user's perspective to consider keeping them indefinitely. Old URLs live on in backlinks, bookmarks and emails. Removing redirects too early turns those visits into 404 errors; our post on fixing 404 errors covers what to do if that has already happened.

Common Mistakes With Redirects

MistakeWhy it hurtsFix
Using 302 for a permanent migrationOld URLs may remain indexed longerSwitch to 301 or 308
Redirecting everything to the homepageGoogle may treat irrelevant redirects as soft 404sRedirect to the closest relevant page, or return 404/410
Redirect chains after repeated migrationsWasted crawl requests and slower page loadsPoint every old URL directly at the final URL
Leaving internal links pointing at redirected URLsUnnecessary hops for users and botsUpdate links in menus, content and templates
Removing redirects after a few weeksLost backlink value and broken user journeysKeep for at least a year, ideally permanently
Relying on JavaScript redirectsGoogle may not see them if rendering failsUse server-side redirects

How to Audit Your Existing Redirects

Run a full crawl with a tool such as Screaming Frog, Sitebulb or Semrush Site Audit and filter for 3xx responses. Look for temporary redirects that have been live for months, chains, loops and internal links pointing at redirects. Then cross-check Search Console's Page indexing report for “Page with redirect” to see which URLs Google has dropped in favour of their targets. A redirect review is a core part of every SEO audit.

Frequently Asked Questions

Not in the way older SEO advice suggested. The real difference is canonicalisation: Google treats a 301 as a strong signal that the target should be the canonical URL, while a 302 does not send that signal, so the old URL may stay indexed.

What happens if I use a 302 for a permanent move?

Google may keep showing the old URL in search for longer. If the redirect stays in place for a long time, Google can eventually treat it like a permanent one, but using a 301 from the start is clearer and faster.

What is the difference between 301 and 308?

Both are permanent and Google treats them the same way. A 308 guarantees the request method (such as POST) is preserved, which matters for APIs and forms, while browsers may change POST to GET on a 301.

How long should I keep a 301 redirect?

Google recommends keeping redirects for as long as possible, generally at least one year. For URLs with backlinks or bookmarks, keeping them indefinitely is the safest choice.

Are JavaScript redirects bad for SEO?

They are a last resort. Google can follow them only if it renders the page successfully, so use server-side redirects or an instant meta refresh when you can.

How many redirects in a chain will Google follow?

Google's crawlers follow up to 10 redirect hops by default, but Google advises redirecting straight to the final destination and keeping chains very short.

Conclusion

Use a 301 (or 308) when a URL is gone for good and a 302 (or 307) when the original is coming back. Implement redirects on the server, link directly to final URLs, keep redirects for at least a year, and audit for chains after every migration. Get those basics right and your rankings will follow your content to its new address. For a deeper look at preferred URLs, read our explainer on the canonical tag.

Planning a migration or redesign? Our web development and SEO teams build redirect maps that protect your traffic. Request a free quote before you launch.

References

  1. Google Search Central: Redirects and Google Search
  2. Google Search Central: Site moves with URL changes
  3. Google Search Central: How HTTP status codes and network errors affect Google Search
  4. Google Search Central: How to specify a canonical URL
  5. MDN Web Docs: Redirections in HTTP
  6. Semrush: 301 vs. 302 Redirect — Which to Choose for SEO and UX
My SEO Experts Team

Our team of SEO and digital marketing specialists has been helping businesses grow organically since 2018. More about us.

Keep reading

Related articles

Ready to grow your business online?

Get a free, no-obligation proposal tailored to your goals and budget.

CallFree Quote