302
HTTPREDIRECTNotable3xx RedirectionHIGH confidence

Found

Production Risk

Low. The main risk is using it for permanent moves, which can have a negative impact on search engine optimization (SEO).

What this means

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.

Why it happens
  1. 1A/B testing, where some users are temporarily sent to a different version of a page.
  2. 2Redirecting a user after a login to their dashboard.
  3. 3A resource is temporarily unavailable at its normal location.
How to reproduce

A user logs into a website and is temporarily redirected to their account page.

trigger — this will error
trigger — this will error
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

Issue 302 with a Location header for temporary redirects
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.

What not to do

Version notes

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All HTTP errors