HTTP Status Codes
What is the difference between 301 and 302?
A 301 redirect and a 302 redirect are the two most commonly used HTTP redirect status codes on the web. Both send visitors and web crawlers from one URL to another automatically and invisibly. But they communicate fundamentally different things to browsers and search engines, and using the wrong one has real consequences for both user experience and SEO.
The core difference is intent. A 301 says the move is permanent and the original URL is gone forever. A 302 says the move is temporary and the original URL will be back. Everything else (caching behaviour, SEO equity transfer, index updates) flows from that single distinction.
What they have in common
Before getting into the differences it is worth noting what 301 and 302 share. Both return a 3xx status code and a Location header pointing to the destination URL. Both cause browsers to follow the redirect automatically without any visible interruption to the visitor. Both are server-side redirects, processed before the page loads rather than after like a JavaScript redirect or meta refresh. And both are broadly supported across every browser, crawler, and HTTP client in existence.
For a casual visitor clicking a link, a 301 and a 302 are completely indistinguishable. The difference lives entirely in the metadata the server sends back, and in how browsers and search engines respond to that metadata.
The key differences
Permanence: a 301 signals that the original URL has moved permanently and will never return. A 302 signals that the move is temporary and the original URL is expected to become active again. This is the fundamental distinction from which all other differences follow.
SEO equity transfer: a 301 transfers link juice and SEO equity from the old URL to the new one. Backlinks pointing to the old URL begin benefiting the new URL. A 302 does not reliably transfer SEO equity. Search engines keep the original URL as the authoritative address and do not consolidate ranking signals to the destination.
Search engine indexing: after a 301, search engines update their index over time to replace the old URL with the new one. The old URL is eventually dropped and the new URL inherits its position. After a 302, search engines keep the original URL in their index and continue crawling it, treating the destination as a temporary location.
Browser caching: a 301 is cached by browsers. Once a browser has followed a 301, it stores the destination and goes directly there on future visits without requesting the original URL. A 302 is not cached. Every visit results in a fresh server request, giving you full control to change or remove the redirect at any time.
Canonical URL signal: a 301 sends a strong signal to search engines that the destination is the canonical version of the content. A 302 leaves the original URL as the canonical address.
How they affect SEO differently
This is where the distinction between 301 and 302 matters most in practice. Using the wrong one can quietly damage your search rankings over time without any obvious error or warning.
When you move a page permanently and use a 301, search engines follow the redirect, recognise the move as permanent, and begin the process of consolidating ranking signals (PageRank, backlink authority, traffic history) to the new URL. Over weeks or months the old URL disappears from search results and the new URL takes its place with the accumulated authority of the old one.
When you move a page permanently but use a 302 by mistake, search engines keep indexing the old URL. They follow the 302 to see the content but do not transfer SEO equity to the destination. The new URL builds no authority from the old one. If the old URL eventually stops resolving, all of that accumulated SEO value is lost rather than transferred.
This is one of the most common and costly SEO mistakes in web development, using a 302 where a 301 was needed, either through lack of awareness or because a framework defaulted to 302. Always audit your redirects to confirm permanent moves are using 301s.
How they affect browser caching differently
The caching difference between 301 and 302 has important practical implications beyond SEO.
A 301 is cached permanently by browsers. Once a user visits a URL that returns a 301, their browser stores the destination and skips the original URL entirely on future visits. This is efficient for performance but creates a problem if the redirect destination needs to change. Users who have already visited will continue being sent to the old destination from their cache, even after you update the redirect on the server. They will only see the new destination once their cache expires or they clear it manually.
A 302 is not cached. Every visit results in a fresh server request. This means you can change or remove a 302 at any moment and all subsequent visits will immediately reflect the change. This makes 302 far safer to use when you are not completely certain about the final destination or duration of the redirect.
Which one should you use
The decision between 301 and 302 comes down to one question: is this move permanent or temporary?
Use a 301 when:
A page has moved to a new URL permanently and the old URL will never be used again
You are migrating a domain or rebranding
You are redirecting HTTP to HTTPS permanently
You are consolidating www and non-www versions of your domain
You are restructuring URLs and retiring old patterns permanently
You are merging pages and retiring the old URLs
Use a 302 when:
A page is temporarily unavailable due to maintenance
You are running an A/B test and traffic will return to the original URL
You are redirecting to a seasonal campaign page with a defined end date
You are handling login or form submission flows in a web application
You are testing a redirect destination before committing to it permanently
When in doubt, default to 302. It is always easier to upgrade a 302 to a 301 once you are certain the move is permanent. Reversing a cached 301 is far more disruptive and takes longer to propagate.
A note on method handling
Both 301 and 302 have a nuanced history around HTTP request method handling. Both were originally specified to preserve the request method, meaning a POST should remain a POST at the destination. In practice, browsers have always switched POST to GET when following both 301 and 302, and this behaviour became the accepted standard.
If you need a temporary redirect that genuinely preserves the request method, use a 307. If you need a permanent redirect that preserves the request method, use a 308. For standard browser navigation involving GET requests, which covers the vast majority of web redirects, the method handling of 301 and 302 is irrelevant.
Quick reference
301 | 302 | |
|---|---|---|
Type | Permanent | Temporary |
SEO equity transfer | Yes | No |
Browser caching | Yes | No |
Index update | Yes — old URL replaced | No — old URL kept |
Canonical signal | Strong | None |
Safe to reverse | No — cached | Yes — not cached |
Default use case | Page moves, migrations | Maintenance, A/B tests |