The short answer

Use a 301 redirect when the old URL has been replaced for the foreseeable future. Use a 302 redirect when the original URL still matters and the alternate destination is temporary.

That intent is the foundation. A permanent code tells clients that they can treat the new URL as the lasting replacement. A temporary code tells them to keep the original URL in mind because it may serve its own content again.

Do not choose a 302 simply because it feels safer. If a migration is genuinely permanent, label it accurately. If an experiment is genuinely temporary, avoid making it look permanent.

301, 302, 307, and 308 at a glance

StatusIntentRequest methodTypical use
301PermanentMay be changed to GET by some clientsPage or domain migration
302TemporaryMay be changed to GET by some clientsShort campaign or conditional route
307TemporaryMust be preservedTemporary API or form endpoint move
308PermanentMust be preservedPermanent endpoint move with strict method handling

The method column matters most for requests other than GET. A normal page visit uses GET, so 301 and 302 behavior is usually straightforward. A form submission or API call can use POST, PUT, PATCH, or DELETE, where changing the method can change the operation.

When a 301 redirect is the right choice

A 301 fits changes that should remain true after the next release, campaign, and content update. Common examples include:

  • A page moved from /old-name to /better-name.
  • Two articles were consolidated into one stronger resource.
  • A domain changed and the old domain will remain only as a forwarding layer.
  • HTTP and duplicate hostname variants are being consolidated onto one canonical HTTPS hostname.
  • A product was replaced by a clear successor and the old URL should not return.

Point the old URL to the closest equivalent, not automatically to the homepage. A permanent redirect preserves meaning best when someone following an old link arrives at the resource they expected.

When a 302 redirect is the right choice

A 302 fits a reversible condition. For example, a retailer may route a landing page to a seasonal campaign for two weeks, then restore the original. A service may temporarily direct traffic away from a page during maintenance. A signed-out user may be routed to authentication before returning to the requested page.

Temporary does not mean “for the first few days of a permanent migration.” It describes the relationship between URLs, not how recently the rule was created. If the old address is retired, use a permanent status from the beginning.

Why 307 and 308 exist

Historical client behavior made 301 and 302 less precise for non-GET requests: a client could follow a redirect by changing a POST into a GET. The 307 and 308 codes make method preservation explicit. A 307 is the temporary counterpart and a 308 is the permanent counterpart.

For a normal content page, the practical decision is usually 301 versus 302. For an API, upload, checkout, or form endpoint, confirm whether the method and body must be replayed. If they must, 307 or 308 communicates that requirement clearly.

What permanent and temporary redirects signal to search engines

Search engines use redirect status as one signal when deciding which URL to retain and show. A permanent redirect supports consolidation around the destination. A temporary redirect suggests that the original may still be the preferred long-term address.

Status alone is not magic. Internal links, canonical tags, sitemaps, navigation, and content should agree with the move. After a permanent migration, update those references to the final URL instead of forcing crawlers through the redirect forever.

Cache behavior also varies by status and response headers. A permanent redirect may be remembered aggressively by browsers and intermediaries. Test a rule carefully before exposing it broadly, because an incorrect permanent redirect can appear to persist after the server configuration is fixed.

Common redirect status mistakes

Using 302 for every rule

This hides the real intent of permanent migrations and can leave multiple URLs competing as references. Classify the move before choosing the code.

Redirecting missing pages to the homepage

A technically successful destination is not necessarily a relevant replacement. If no equivalent exists, a clear 404 or 410 can be more honest and more useful.

Stacking several correct redirects

Three individually reasonable 301 rules can still form a slow route. Update the earliest rule so it points directly to the current destination, then use the redirect checker to confirm one clean hop.

Changing status without testing variants

Check HTTP, HTTPS, www, non-www, trailing-slash, and parameterized forms that people actually use. A rule can be perfect for one variant and loop on another.