In short
A 301 redirect tells browsers and search engines that a page has moved permanently to a new URL: the new one should be indexed, ranking signals consolidate to it, and browsers cache the redirect. A 302 says the move is temporary: the original URL should be kept as canonical and the redirect not cached. Use 301 for URL changes, migrations, HTTPS moves and consolidations; use 302 for genuinely temporary situations such as maintenance, A/B tests and geo-routing. Google now passes signals through both, but a long-lived 302 is eventually treated as permanent, and a 301 that is later reversed confuses caches.
What the codes mean
A redirect is a response telling the client that the thing it asked for is somewhere else, with a Location header giving the new address. The status code says what kind of somewhere else.
301 Moved Permanently. The resource has a new address for good. Browsers may cache the redirect and go straight to the new URL next time. Search engines should index the new URL, transfer the old one's signals to it, and stop crawling the old one eventually.
302 Found. The resource is temporarily at another address. Browsers should not cache the redirect. Search engines should keep the original URL in the index, since it is expected to come back.
307 Temporary Redirect and 308 Permanent Redirect are the modern equivalents that additionally guarantee the request method is preserved: a POST stays a POST. The old codes allowed clients to change POST to GET on redirect. For ordinary page redirects the difference is invisible; for form submissions and APIs it matters.
| Code | Move | Browser caches it? |
|---|---|---|
| 301 | Permanent | Yes |
| 302 | Temporary | No, by default |
| 308 | Permanent, keeps the request method | Yes |
| 307 | Temporary, keeps the request method | No, by default |
What Google actually does
For years the received wisdom was that 301s pass ranking signals and 302s do not, so an accidental 302 during a migration lost everything. Google has said since 2016 that all redirect types pass signals and that it uses the code as one hint among several about which URL to treat as canonical. A 302 that stays in place for a long time is treated as permanent. A 301 that points at a page which then redirects back is treated as a mistake.
So the practical difference is not whether signals pass, but which URL Google chooses to index and how quickly it makes the change. A 301 says: index the destination, now. A 302 says: keep the origin, for now. Use the one that matches what you mean, and Google will mostly follow.
When to use a 301
Any permanent URL change: a renamed page, a restructured section, a site migration, a move from HTTP to HTTPS, from www to non-www, or from one domain to another. Consolidating duplicate pages into one. Retiring a page in favour of its replacement. Redirecting expired campaign pages to their evergreen equivalent. In each case the old URL is not coming back, and the destination should inherit everything the old one had.
When to use a 302
Maintenance pages, where the original URL will return within hours. A/B tests that send some visitors to a variant while the original remains canonical. Geographic or language routing where the origin URL should stay indexed. Temporarily out-of-stock products redirecting to a category while they are unavailable. Redirects after a form submission, where 303 See Other is technically the correct code. In each case the origin is the real URL and the redirect is a detour.
If the temporary situation lasts months, change it to a 301 or accept that Google will treat it as one.
The mistakes
Redirecting everything to the homepage. A permanent redirect from a deleted page to an unrelated one is treated by Google as a soft 404, and the old page's signals are lost. Redirect to the closest equivalent, or return a 404 or 410 honestly.
Chains. Old URL to newer URL to newest URL. Each hop costs time and dilutes signals; redirect chains should be collapsed so every old URL points directly at the final destination.
Loops. A redirects to B, B redirects to A. Browsers give up with an error.
302 for a permanent move. Not the disaster it once was, but it delays Google's switch to the new URL and keeps the old one in results longer than intended.
301 for something temporary. Browsers cache 301s aggressively; reversing one means visitors keep being sent to the old destination until their cache expires, which can be a long time. Use 302 if there is any chance of reversal.
Redirecting without updating internal links. Every internal link to the old URL now goes through a redirect. Update the links so the redirect serves only external and historical traffic.
Forgetting canonicals and sitemaps. The sitemap should list destinations, not redirected origins; canonical tags on destinations should point at themselves.
Implementation
Redirects belong at the server or the CDN: .htaccess or the Apache configuration, Nginx return 301, the hosting platform's redirect rules, or the CMS's redirect manager. Meta refresh and JavaScript redirects are slower, pass signals less reliably and should be a last resort. Test each redirect returns the intended code with a tool or a curl request, since misconfiguration that returns 200 with redirect-like content, or a 302 where a 301 was intended, is common and invisible in a browser.
Redirects are the mechanism that lets a site change without losing what it has earned, and the difference between the two main codes is simply whether the change is for keeps. If you are planning a change with many URLs, book a call; the map is usually the whole job.
Common questions
Does a 302 redirect pass SEO value?
Yes. Google has said since 2016 that all redirect types pass ranking signals; the code is a hint about which URL to treat as canonical. A 302 tells Google to keep the original URL indexed for now, so the switch to the destination is slower, and a 302 left in place for months is eventually treated as permanent.
When should I use a 301 versus a 302?
Use a 301 whenever the old URL is not coming back: renamed pages, migrations, HTTPS and www changes, consolidated duplicates, retired pages. Use a 302 for genuinely temporary situations: maintenance, A/B tests, geo-routing, temporarily unavailable products. If a temporary redirect becomes long-term, change it to a 301.
What is the difference between 301 and 308?
Both mean a permanent move. A 308 additionally guarantees that the request method and body are preserved, so a POST is repeated as a POST at the new address, whereas a 301 allows clients to change it to a GET. For ordinary page redirects they behave identically; for form submissions and APIs, 308 is the correct permanent code and 307 the temporary one.
Can I reverse a 301 redirect?
Technically, but browsers cache 301s aggressively, so visitors who followed the redirect keep being sent to the old destination until their cache clears, which can take a long time, and Google will take time to switch back. Use a 302 for anything that might be reversed, and treat a 301 as a commitment.
Should I redirect deleted pages to the homepage?
No. Google treats a redirect from an unrelated page to the homepage as a soft 404 and discards the old page's signals. Redirect to the closest equivalent page if one exists; if none does, return a 404 or 410 so the old URL drops cleanly from the index.