HTTP
Which HTTP Redirect Should I Use?
Choosing the wrong redirect code can break bookmarks, harm SEO, or silently change POST requests to GETs. This decision tree walks you through permanence, method preservation, and client behavior to select the correct 3xx code for your use case.
Decision Steps
Is this redirect permanent (the old URL will never be used again)?
Must the HTTP method be preserved (e.g., a POST to the old URL should POST to the new URL)?
Must the HTTP method be preserved (e.g., a POST should remain a POST at the new location)?
Are you redirecting after a POST (form submission) to a GET page to prevent duplicate submissions (Post/Redirect/Get pattern)?
Possible Outcomes
301-moved-permanently
Permanent, method may change to GET
302-found
Temporary, method may change to GET
303-see-other
Always redirects to a GET (Post/Redirect/Get)
307-temporary-redirect
Temporary, method preserved
308-permanent-redirect
Permanent, method preserved