301 vs 307: Moved Permanently vs Temporary Redirect

301 and 307 can look similar in logs, but they tell clients, crawlers, and API consumers different things.

Aspect301307
MeaningMoved Permanently describes how the server processed the request and what the client should do next.Temporary Redirect describes how the server processed the request and what the client should do next.
Typical use caseHTTP 301 Moved Permanently indicates a redirection response outcome.HTTP 307 Temporary Redirect indicates a redirection response outcome.
Caching/client behaviorCheck cache headers and downstream behavior for 301.Check cache headers and downstream behavior for 307.
SEO implicationsSearch crawlers interpret 301 according to redirect-codes semantics.Search crawlers interpret 307 according to redirect-codes semantics.
API/backend impactAPI clients may branch logic specifically on 301.API clients may branch logic specifically on 307.

When to use one vs the other

Use 301 when the response should communicate moved permanently behavior; use 307 when temporary redirect is the accurate protocol signal.

A frequent mistake is swapping 301 and 307 for convenience; that causes client retry bugs, incorrect cache signals, and misleading monitoring data.

Decision summary: if user agents should receive the Moved Permanently signal, return 301; if they should receive Temporary Redirect, return 307.

FAQ

What is the biggest difference between 301 and 307?

301 communicates Moved Permanently, while 307 communicates Temporary Redirect. Choosing the right one keeps clients and intermediaries predictable.

Do 301 and 307 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 301 instead of 307?

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: 301 Moved Permanently ยท 307 Temporary Redirect

Related comparisons