Redirect codes look similar to visitors, but they communicate different intent to browsers and search engines. The first question is simple: is the change permanent or temporary? The second is technical: must a non-GET request keep its original method and body?
Quick decision table
| Code | Meaning | Method behavior | Common use |
|---|---|---|---|
| 301 | Permanent | Some clients may change POST to GET | Permanent page or domain move |
| 302 | Temporary | Some clients may change POST to GET | Short-lived substitution |
| 307 | Temporary | Preserves method and body | Temporary API or form endpoint move |
| 308 | Permanent | Preserves method and body | Permanent move requiring method preservation |
Google Search Central recommends permanent server-side redirects when a move is lasting and recognizes 301 and 308 as permanent. For temporary moves, use a temporary redirect so the original URL can remain preferred.
When to use 301
Use 301 for permanent webpage moves: renamed articles, consolidated products, HTTPS normalization or a carefully planned domain migration. Update internal links and sitemaps to the destination rather than forcing crawlers through redirects forever.
When to use 302
Use 302 when the old URL should return after a temporary event, such as maintenance, a short out-of-stock alternative or a controlled experiment. Do not use it as a convenient default for a permanent redesign.
Why 307 and 308 exist
Clients historically changed a redirected POST into a GET when following 301 or 302. A 307 guarantees temporary redirection without changing the method or body; 308 provides the permanent equivalent. This matters for APIs and forms.
SEO migration checklist
- Map every valuable old URL to the closest relevant new URL.
- Avoid redirecting unrelated pages to the homepage.
- Implement one server-side hop whenever possible.
- Test status, Location header and destination response.
- Update internal links, canonicals, hreflang and XML sitemaps.
- Keep permanent redirects long enough for users and search engines.
- Monitor Search Console, traffic and 404s.
If Google is slow to discover the change, use our Google indexing troubleshooting guide.
Avoid chains and loops
A chain such as A → B → C adds latency and complicates crawling. Point A directly to C when safe. A loop eventually returns to the starting URL and usually causes a browser error.
Redirect or canonical?
A redirect sends users and crawlers elsewhere. A canonical tag leaves both pages accessible and suggests a preferred version. Redirect when the old page should no longer be visited; use canonicalization when duplicate pages must remain accessible.
How to test
- Request the old URL without a cached session.
- Confirm the expected 3xx status and exact Location header.
- Confirm the destination returns 200 rather than another redirect.
- Test query strings only when they should be preserved.
- For 307/308, test the relevant non-GET method safely.
- Crawl a representative sample before full deployment.
FAQ
Does a 301 pass SEO signals?
Google treats a permanent redirect as a strong canonical signal. Relevance and clean implementation still matter.
Is 308 better than 301 for SEO?
Not inherently. Both signal a permanent move; 308 is useful when the request method and body must remain unchanged.
Should every 404 redirect home?
No. Redirect only when a relevant replacement exists. A truthful 404 or 410 can be better when there is no substitute.
Bottom line
Use 301 or 308 for permanent moves and 302 or 307 for temporary ones. Map, test and monitor every migration.
