# Understand 302 redirects

Source: https://docs.fortrabbit.com/dev/http-status-codes/others/302
Reviewed: 2026-06-22

> A 302 is a redirect, not an error. Like a 301 it sends the client to a different URL, but it signals a temporary move: the original address stays the canonical one and should keep being requested.


A 302 is a redirect, not an error. Like a [301](/dev/http-status-codes/others/301) it sends the client to a different URL, but it signals a temporary move: the original address stays the canonical one and should keep being requested.

## When to use 302 over 301

Reach for a 302 when the redirect is not meant to last:

- A maintenance or holding page while the real content is offline
- A/B tests or geo-based routing where the source URL must stay live
- A login or paywall gate that bounces visitors and later lets them through
- Any rule that might be removed again soon

If the move is final, use a [301](/dev/http-status-codes/others/301) instead.

## Browser caching

A 302 is not cached the way a [301](/dev/http-status-codes/others/301) is. By default browsers keep requesting the original URL and follow the redirect each time, so removing the rule takes effect right away. That makes 302 the safer choice while a redirect is still in flux — there is no permanent entry stuck in visitors' browsers to undo.



```shell
$ curl -I https://example.com/sale
HTTP/2 302
location: https://example.com/landing
```

## SEO considerations

Search engines treat a 302 as temporary, so they keep the original URL in the index and do not transfer ranking to the target. That is correct for a short-lived redirect, but a common mistake for a permanent one.

- Using 302 for a permanent move means the new URL never inherits the old ranking.
- For a real move, switch to a 301 so the index and link equity follow.
- When unsure, a 302 is the reversible default — promote it to 301 once the target is confirmed stable.

## Set up a 302

Custom redirects on fortrabbit are written in `.htaccess` with `mod_rewrite`. The redirect examples use `R=301`; swap in `R=302` for a temporary redirect. See [Redirects with .htaccess](/dev/htaccess/redirects).

---

- [Redirects with .htaccess](/dev/htaccess/redirects)
- [Domain forwarding](/platform/dns/domain-forwarding-service)
