301 vs 302 redirect: which one to use
Use a 301 redirect when a URL has moved permanently and a 302 when the move is temporary. Google shows the target of a permanent redirect in results and keeps the original for a temporary one. 307 and 308 do the same jobs but never change the request method.
- 301 and 308 are permanent. 302 and 307 are temporary.
- Google treats 301 and 308 as strong canonical signals, and 302 and 307 as weak ones.
- Use a 308 or 307 only if POST requests must keep their method.
What is the difference between 301, 302, 303, 307 and 308?
| Code | Type | Method handling | Typical use |
|---|---|---|---|
| 301 Moved Permanently | Permanent | GET stays; other methods may become GET | Site or URL restructure, HTTP to HTTPS |
| 308 Permanent Redirect | Permanent | Method and body unchanged | Permanent move with non-GET operations |
| 302 Found | Temporary | GET stays; other methods may become GET | Page temporarily unavailable |
| 307 Temporary Redirect | Temporary | Method and body unchanged | Temporary move with non-GET operations |
| 303 See Other | Temporary | Becomes GET, body dropped | After a POST so a refresh does not resubmit |
Source: MDN: Redirections in HTTP. 307 and 308 were added to remove the method ambiguity in 301 and 302.
How does Google treat each type?
Strong
301 and 308 are strong signals that the target should be canonical
Source: Google Search Central
Weak
302, 303 and 307 are weak signals. 307 equals 302, and 308 equals 301
Source: Google Search Central
10 hops
Googlebot generally follows up to 10 redirect hops. Other crawlers may differ
Source: Google Search Central
1 year
Keep site-move redirects as long as possible, generally at least a year
Source: Google Search Central
Which redirect should you pick?
- 01
Will it be reverted?
If the old URL will never come back, use 301 (or 308). Google says to use permanent redirects when you are sure the redirect will not be reverted.
- 02
Is it a short-term change?
For a temporary outage, an A/B test or seasonal page, use 302 so the original URL stays in search results.
- 03
Do non-GET requests matter?
For APIs and forms that POST, use 308 (permanent) or 307 (temporary) so the method and body are preserved.
- 04
Redirect to the right target
Send each old URL to its closest equivalent in one hop, not through a chain.
- 05
Update internal links
Point links and the sitemap at the final URL so visitors skip the extra round trip.
- 06
Test the result
Run
curl -sIL URLand confirm one hop, the right status and the final 200.
How do you set up each redirect?
# Apache: permanent (301)
Redirect permanent / https://www.example.com
# Apache: Redirect alone defaults to 302
Redirect / https://www.example.com
# nginx: permanent redirect to www
server {
listen 80;
server_name example.com;
return 301 $scheme://www.example.com$request_uri;
}Do not leave a 302 in place for a permanent move
A 302 that should have been a 301 is a common mistake after migrations. Google treats the redirect type as a canonicalization hint, so a lasting 302 can leave the old URL showing in results. Check the status code of every migrated redirect, not only that it lands on the right page.
Common questions
What is the difference between a 301 and a 302 redirect?
A 301 says the page moved permanently, so crawlers should replace the old URL with the new one. A 302 says the move is temporary, so crawlers keep the original URL. Browsers follow both the same way for visitors.
Does a 301 redirect pass SEO value?
Google treats a 301 as a strong signal that the target is the canonical page, so the new URL is what appears in results. Google does not publish a percentage for any loss. Redirect each page to its closest equivalent and keep it in place for at least a year.
When should I use a 302 instead of a 301?
Use a 302 when the original URL will return, such as during maintenance, a short promotion, a test, or a temporary out-of-stock redirect. The original URL stays the one shown in search results.
What are 307 and 308 redirects?
They are the method-preserving versions of 302 and 301. A 307 is temporary and a 308 permanent, and both guarantee the browser repeats the same method and body. Google treats 307 like 302 and 308 like 301.
How many redirects are too many?
Googlebot generally follows up to 10 hops, but every hop adds a round trip, so aim for one. Browsers also stop at a limit and show an error, as in a redirect loop.
Keep reading
Watch your domains automatically
Aepto monitors expiry, DNS, SSL and uptime for every domain you own and alerts you when something changes. Free for 3 domains.