301 and 302 are HTTP redirect status codes that both send a browser to a new URL, but they signal very different intent. A 301 says "this moved permanently"; a 302 says "this is temporary, keep using the original." Search engines treat them accordingly.
Getting this wrong hurts SEO. Use a 302 for a permanent move and you may fail to pass link equity to the new URL; use a 301 for a temporary change and search engines may drop the original from their index.
At a glance
Aspect
301 Redirect
302 Redirect
Meaning
Permanent move
Temporary move
SEO link equity
Passes to the new URL
Stays with the original
Caching
Cached aggressively by browsers
Not cached by default
Index effect
New URL replaces old in index
Original URL stays indexed
Best for
Domain changes, permanent URL updates
A/B tests, maintenance, promos
When to use 301 Redirect
You've permanently moved a page or changed domains.
You want the new URL to inherit ranking signals.
You're consolidating duplicate URLs for good.
When to use 302 Redirect
The change is temporary — maintenance, a sale, or a test.
You want the original URL to keep its search presence.
You'll restore the original destination soon.
Verdict
Default to 301 for anything permanent so link equity flows to the destination, and reserve 302 for genuinely temporary situations. Because browsers cache 301s hard, test carefully before deploying one — an accidental permanent redirect is painful to undo. Always check the full redirect chain to avoid loops and unnecessary hops.