The short answer
301, 302 or 308: for a permanent change such as a migration, use 301 or 308, which Google treats the same way. Use 302 or 307 only when the old URL will come back. Choose 308 over 301 when POST requests must keep their method, which matters for forms and APIs, not for rankings.
Key points
- Permanent change: 301 or 308. Temporary change: 302 or 307.
- Google treats 301 and 308 the same, and 302 and 307 the same.
- Choose 308 over 301 when POST requests must keep their method.
- Expect 308s from frameworks that use them for permanent redirects.
- Server-side redirects first; 0-second meta refresh only as a fallback.
- Redirect straight to the final URL in one hop.
- Test every old URL with a crawler, not a browser.
- Recheck codes if old URLs stay indexed.
For a migration, use a permanent redirect: 301 or 308. Google treats the two the same way. Use 302 or 307 only when the old URL will come back. The real choice in a 301 vs 308 redirect is not about SEO. It is about whether browsers and other clients may change the request method, which matters for forms and APIs, not for rankings.
Getting the code wrong is one of the quietest migration mistakes. A temporary redirect where a permanent one was meant does not break anything a user can see. The page loads. But it tells Google something different about which URL should be indexed, and that difference can last for months before anyone checks.
This guide is part of our website migration SEO series. It explains what each code means, how Google treats it, and how to check what your server actually sends.
What does each redirect code mean?
There are four redirect codes you will meet in practice. Two are permanent, two are temporary. Within each pair, the difference is whether the client may change the request method when it follows the redirect.
| Code | Name | Permanent or temporary | Request method kept? | How Google treats it |
|---|---|---|---|---|
| 301 | Moved Permanently | Permanent | Not guaranteed: older clients may change POST to GET | Strong signal that the target should be canonical |
| 308 | Permanent Redirect | Permanent | Yes, method and body unchanged | Equivalent to 301 |
| 302 | Found | Temporary | Not guaranteed: older clients may change POST to GET | Weak signal that the target should be canonical |
| 307 | Temporary Redirect | Temporary | Yes, method and body unchanged | Equivalent to 302 |
There is also 303 (See Other), which is used after a form submission to send the browser to a result page. Google lists it as temporary, alongside 302 and 307. You will rarely choose it for SEO purposes.
Google's documentation on HTTP status codes puts it plainly: 308 is "Equivalent to 301" and 307 is "Equivalent to 302", but "they're semantically different", so you should still use the code that fits the situation, because other clients may rely on the difference.
How does Google treat permanent and temporary redirects?
Google follows both kinds, but uses them differently when choosing which URL to index. A permanent redirect is a signal that the target should be the canonical URL. A temporary redirect is not.
From Google's redirects documentation:
- Permanent (301, 308): Googlebot follows the redirect, and the indexing pipeline uses it as a signal that the target should be canonical.
- Temporary (302, 303, 307): Googlebot follows the redirect, but the indexing pipeline does not use it as a signal that the target should be canonical. Google adds that the target "might still be indexed if other canonicalization signals are present."
In plain terms: with a permanent redirect, you are telling Google "index the new URL". With a temporary one, you are telling Google "the old URL is still the real one, for now". In a migration, that is the wrong message.
Google also says it keeps both the source and the target URL. One becomes canonical and the other becomes an alternate name. After a domain move, it says the old URLs may still show in results now and then, and fade over time.
So should a migration use 301 or 308?
Either. Both are permanent and Google treats them as equivalent. Pick the one your stack handles cleanly, and use it consistently.
A few practical points help the choice:
- 301 is the common default. Most servers, CDNs, plugins and SEO tools default to it, and every client understands it.
- 308 keeps the request method. If old URLs receive POST requests, such as form endpoints or API calls, a 308 makes sure the client sends the same POST to the new URL. With a 301, some clients may switch to GET and the request can fail.
- Some frameworks choose for you. For example, the Next.js documentation says that setting
permanent: truein its redirects config uses 308, andpermanent: falseuses 307. If your new site is built on such a framework, seeing 308s in a crawl is expected, not a bug.
What matters for search is that the redirect is permanent, server-side, and goes straight to the final URL in one hop.
When is a 302 or 307 the right choice?
When the move really is temporary and the original URL will return. Google's guidance says to use permanent redirects "when you're sure that the redirect won't be reverted", and temporary redirects when you "just want to send users to a different page temporarily".
Reasonable uses:
| Situation | Code | Why |
|---|---|---|
| A short campaign page replaces a category for a few days | 302 or 307 | The category comes back |
| A page is under maintenance and visitors go to a holding page | 302 or 307 | The original returns |
| Users are sent to a login page before a protected page | 302 or 307 | The protected URL stays the real one |
| A product line is gone for good and has a clear replacement | 301 or 308 | The change is not going to be reversed |
| Any URL change in a migration, redesign or domain move | 301 or 308 | The new URL is the one you want indexed |
If you cannot say when a temporary redirect will end, it is probably permanent. Use the permanent code.
What happens if you use a 302 by mistake?
The pages still load, so nobody notices. But Google gets a weak signal instead of a strong one, and it may keep the old URL as the indexed version for longer than you want.
This mistake is easy to make because some redirect tools and rewrite rules produce a 302 unless told otherwise, and because it is invisible in a browser. In our worked example, a redirect map that covered 96% of URLs but missed the revenue, a crawl of the proposed map found 1,410 redirects using 302 where a 301 was intended. That figure is from a worked example, not a client, but the pattern is the one to look for.
The fix is simple once found: change the rule to the permanent code and recrawl to confirm. The hard part is finding it, which is why the status code belongs in every redirect test.
If your migration is close and nobody has checked the codes your server actually returns, that is part of a Website Migration Protection review.
What about meta refresh and JavaScript redirects?
Use them only when server-side redirects are not possible. Google lists them, but ranks them below server-side redirects for how likely they are to be interpreted correctly.
From Google's redirects documentation:
- Instant meta refresh (0 seconds) is treated as permanent. A delayed meta refresh is treated as temporary.
- JavaScript redirects are a last option. Google says rendering can fail, so it "might never see" the redirect.
- Crypto redirects, meaning a link on the old page that says "we moved", are not something Google says to rely on.
On platforms that do not allow server redirects for some pages, a 0-second meta refresh is the safer fallback. For a migration of any size, push for server-side rules. See the guide on replatforming SEO.
How do you check which code your server sends?
Test the response directly, not in a browser address bar. Browsers follow redirects silently and cache permanent ones, so they hide what is happening.
- Command line. Request the old URL and read the status line and
Locationheader, without following the redirect. - Crawler in list mode. Load every old URL from your redirect map. Export the status code, the first destination, the final destination and the number of hops.
- Browser developer tools. The Network tab shows each hop and its code, as long as the cache is disabled.
- Search Console. URL Inspection is useful for the final URL, but Google's documentation says its inspection tools do not follow redirects. Inspect the destination URL, not only the source.
Check the whole map, not a sample. Rules written for one URL pattern often produce a different code for another. Redirect codes are one of the things a technical SEO audit should check, and fixing them on a live site is part of our Technical SEO service.
What not to do
- Do not use 302 or 307 for a permanent change because it "feels safer". It sends the opposite signal.
- Do not mix codes in one chain, such as a 301 followed by a 302. Redirect straight to the final URL with one permanent code.
- Do not trust the browser to tell you which code was sent.
- Do not rely on JavaScript redirects for pages that matter in search.
- Do not change 301s to 308s across a live site just for tidiness. They are equivalent for Google, and any change to redirect rules is a chance to break one.
How do you know your redirects are right?
They are right when every old URL returns one permanent code and lands, in one hop, on a relevant page that returns 200.
After launch, check:
- Crawl of the old URL list: 100% permanent codes, single hop, 200 destination. Report any exceptions by value, most important first.
- Page indexing report: old URLs move into "Page with redirect" over the following weeks. New URLs become indexed.
- Performance report: clicks and impressions move from old URLs to new ones, page group by page group.
If old URLs stay indexed for longer than you expect, check the codes again before anything else. Our page on migration traffic loss covers what to do when the value does not transfer.
Questions teams ask about redirect codes
Our developers used 308 instead of 301. Do we need to change them?
No. Google treats 308 as equivalent to 301. Leave them as they are, as long as they go straight to the final URL.
We used 302 during the migration. How bad is that?
It weakens the signal that the new URL should be indexed. Change the rules to 301 or 308 and recrawl to confirm. Then watch whether the old URLs leave the index over the next weeks.
How long should redirects stay in place?
Google's site-move guide says "for as long as possible, generally at least 1 year." Many teams keep them indefinitely, because old links do not expire.
Do redirects lose ranking value?
Google's site-move guide says "301 and other permanent redirects don't cause a loss in PageRank." The losses in migrations come from other things: redirecting to the wrong page, missing pages, long chains or a temporary code used by mistake.