307 vs 308: Temporary Redirect vs Permanent Redirect
307 and 308 can look similar in logs, but they tell clients, crawlers, and API consumers different things.
| Aspect | 307 | 308 |
|---|---|---|
| Meaning | Temporary Redirect describes how the server processed the request and what the client should do next. | Permanent Redirect describes how the server processed the request and what the client should do next. |
| Typical use case | HTTP 307 Temporary Redirect indicates a redirection response outcome. | HTTP 308 Permanent Redirect indicates a redirection response outcome. |
| Caching/client behavior | Check cache headers and downstream behavior for 307. | Check cache headers and downstream behavior for 308. |
| SEO implications | Search crawlers interpret 307 according to redirect-codes semantics. | Search crawlers interpret 308 according to redirect-codes semantics. |
| API/backend impact | API clients may branch logic specifically on 307. | API clients may branch logic specifically on 308. |
When to use one vs the other
Use 307 when the response should communicate temporary redirect behavior; use 308 when permanent redirect is the accurate protocol signal.
A frequent mistake is swapping 307 and 308 for convenience; that causes client retry bugs, incorrect cache signals, and misleading monitoring data.
Decision summary: if user agents should receive the Temporary Redirect signal, return 307; if they should receive Permanent Redirect, return 308.
FAQ
What is the biggest difference between 307 and 308?
307 communicates Temporary Redirect, while 308 communicates Permanent Redirect. Choosing the right one keeps clients and intermediaries predictable.
Do 307 and 308 have SEO or caching impact?
Yes. Search engines and caches interpret status classes differently. Use each code according to its semantics to avoid accidental indexing, stale responses, or crawl inefficiency.
Can APIs safely return 307 instead of 308?
Only when it matches contract semantics. API clients often branch logic by exact code, so swapping them can break retries, auth handling, or user-facing errors.
Related guides: 307 Temporary Redirect ยท 308 Permanent Redirect