Found
Production Risk
Low. The main risk is using it for permanent moves, which can have a negative impact on search engine optimization (SEO).
The URI of the requested resource has been changed temporarily. The new temporary URI is given in the response. This redirect is not cached by search engines, and the original URL should be used for future requests.
- 1A/B testing, where some users are temporarily sent to a different version of a page.
- 2Redirecting a user after a login to their dashboard.
- 3A resource is temporarily unavailable at its normal location.
A user logs into a website and is temporarily redirected to their account page.
POST /login HTTP/1.1 Host: example.com
expected output
HTTP/1.1 302 Found Location: /dashboard
Fix
Issue 302 with a Location header for temporary redirects
WHEN When a resource has temporarily moved and the original URL should remain canonical
HTTP/1.1 302 Found Location: /dashboard Cache-Control: no-store
Why this works
302 tells clients the redirect is temporary so they should not update bookmarks or cached URLs. Unlike 301, search engines do not transfer PageRank to the new URL. Use Cache-Control: no-store to prevent caching of the redirect itself.
✕
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev