303

See Other

3xx Redirection

ELI5

You submitted something successfully. Now go fetch this other page to see the result.

Server perspective

Use 303 when the original request succeeded or was accepted, but the client should retrieve a different resource next with GET or HEAD.

When to use

  • Return 303 for post/redirect/get flows after form submissions or write operations
  • Use it when the redirect target is an indirect result, confirmation page, or status resource
  • After POST, PUT, or DELETE when the next step should be a safe retrieval
  • Redirecting to a confirmation page, status page, or canonical read view of the result
  • Preventing accidental form resubmission with a browser refresh
  • Returning a resource URI after an action without repeating the original method

How to respond

  • Include a Location header naming the retrieval URI
  • Design the target resource to be safely fetched with GET or HEAD

Headers to consider

  • Location

Response body

  • A short explanatory body is optional, but the redirect target should be unambiguous from Location

Server-side pitfalls

  • Do not use 303 when the redirected request must keep the original method
  • Do not confuse 303 with a generic temporary redirect; its value is the forced switch to retrieval semantics
  • When the redirected request must preserve the original method and body; use 307 or 308
  • When you are simply moving a GET page temporarily or permanently; use the usual redirect codes instead
  • When the original request should directly return its own final representation

Examples

Post/redirect/get user creation flow

Request:POST https://api.example.test/users
Response:303 See Other # Headers Location: https://api.example.test/users/123

The write request succeeds, then the client fetches the created user's page with GET.

Submit job and inspect status page

Request:POST https://api.example.test/exports
Response:303 See Other # Headers Location: https://api.example.test/exports/jobs/abc

The client is redirected to a safe retrieval URI rather than repeating the POST.

References

Related Status Codes