SEO Strategy · 4 min read
301 vs 302 Redirects: When to Use Each for SEO
Short answer
Use a 301 (or 308) when a URL has moved for good, so Google shows the new URL in results. Use a 302 (or 307) only when the move is temporary and you want the original URL to stay in search, such as a short promotion, maintenance page or A/B test.
Key takeaways
- Google treats 301 and 308 as permanent and uses them as a canonical signal; 302, 303 and 307 are temporary and keep the source URL in results.
- 307 and 308 keep the request method (a POST stays a POST); 301 and 302 allow clients to switch a POST to GET.
- Point every old URL straight at its final destination; chains waste crawl effort and add points of failure.
A developer sets up a redirect and asks: 301 or 302? Many frameworks default to 302. The wrong code rarely breaks a site, but it can keep old URLs in Google longer and slow a migration. This page explains what each code means, how Google reads it and which to use for common cases.
What is the difference between a 301 and a 302?
A 301 says the resource has moved permanently; a 302 says it is temporarily somewhere else and the original URL should be kept.
The HTTP standard, RFC 9110, defines 301 Moved Permanently, 302 Found, 307 Temporary Redirect and 308 Permanent Redirect. It also lists 301 and 308 as cacheable by default, which means browsers may remember a permanent redirect and skip the old URL next time. So a mistaken 301 is hard to undo.
Google mirrors the same split. Its redirect documentation says permanent redirects show the new target in search results, while temporary redirects show the source page.
When should you use 307 or 308 instead?
Use 307 or 308 when the request method must not change, typically for form posts and APIs.
RFC 9110 explains that early browsers often changed a redirected POST into a GET, that this became prevailing practice, and that 301 and 302 were adjusted to allow it. 307 and 308 were added to indicate method-preserving redirects unambiguously.
For ordinary page moves, where crawlers and browsers send GET requests, 301 and 308 behave the same for SEO, as do 302 and 307. Google groups 301 and 308 as permanent and 302, 303 and 307 as temporary.
| Code | Meaning | Method preserved | Google treats as |
|---|---|---|---|
| 301 | Moved Permanently | Not guaranteed | Permanent |
| 308 | Permanent Redirect | Yes | Permanent |
| 302 | Found | Not guaranteed | Temporary |
| 303 | See Other | Changes to GET | Temporary |
| 307 | Temporary Redirect | Yes | Temporary |
Which redirect should you use in common situations?
If you would be unhappy to see the old URL back in Google next month, the move is permanent.
| Situation | Use | Why |
|---|---|---|
| Domain change or HTTPS move | 301 or 308 | The old URLs are gone for good |
| Merging two articles into one | 301 | Consolidates signals on the survivor |
| www to apex (or the reverse) | 301 | One permanent host |
| Out-of-stock product returning next week | 302, or keep the page live | You want the original URL kept |
| Service down for a few hours | 503 status, or a 302 to a status page | The real URL comes back soon |
| Geo or language selection | Often no redirect; use links and hreflang | Forced redirects can block crawlers from versions |
| A/B test of a landing page | 302 | The original remains the canonical page |
| Login wall for logged-out users | 302 or 303 | The protected URL stays the real address |
Hypothetical example: a retailer runs a two-week holiday sale and points /gifts/ to /holiday-sale/ with a 302. After the sale, the redirect is removed and /gifts/ keeps its rankings because Google never treated the sale page as its replacement. A 301 could have let the sale URL replace /gifts/ in results.
How does Google handle meta refresh and JavaScript redirects?
Google reads an instant meta refresh as permanent and a delayed one as temporary, and uses JavaScript redirects only as a last resort.
Google recommends server-side redirects where possible; if you cannot configure the server, an instant meta refresh is next best. JavaScript redirects depend on rendering, which Google warns can fail. A plain "this page has moved" link should not be relied on.
How do you avoid redirect chains in a migration?
Map every old URL directly to its final destination, and update internal links so they skip redirects altogether.
Chains build up over years (HTTP to HTTPS, www to apex, old slug to new). During a migration:
- Export every old URL with links or traffic.
- Map each one to the single most relevant new URL, not to the homepage.
- Collapse existing chains so each old URL makes one hop.
- Update internal links, canonicals and sitemaps to the final URLs.
- Crawl the old URL list after launch and confirm one hop and a 200 at the end.
Redirects are also a strong canonical signal, so a clean redirect map does double duty against duplicate content (see our guide to testing for duplicate content).
After launch, run the GEO readiness checker to confirm your robots.txt still lets search and AI crawlers reach the new URLs. If you are planning a move, our technical SEO audit includes the redirect map and post-launch checks.
Frequently asked questions
Does a 302 pass ranking signals?
Google uses redirects as canonicalization signals. With a temporary redirect, Google generally keeps the source page in results, though the target can still be indexed if other signals point to it. If the move is permanent, use a 301 so your intent is clear.
What happens if I use a 302 by mistake during a migration?
Google may keep showing the old URLs longer and take more time to consolidate signals onto the new ones. Switch the rules to 301 as soon as you notice, then recrawl the old URL list to confirm the change.
Is a meta refresh redirect OK for SEO?
Google treats an instant meta refresh (0 seconds) as a permanent redirect and a delayed one as temporary. Server-side redirects are still preferred because every client handles them consistently.
How long should I keep redirects after a site move?
Google's redirect documentation does not set a period for keeping redirects. Keep them while old URLs still get links or traffic, which usually means years.