Search code examples
http-status-code-301http-status-code-302

is it bad to use 301,302 redirects after form submission


Is it bad to use 301, 302 redirects after processing a form submission. Or is it only advised to use for pages that have "really been moved". I can show users nice urls if I use redirects.

Please advice.

Thanks


Solution

  • No, it is not bad. It's actually recommended best practice and called PRG (POST, Redirect, GET). This prevents users from seeing the nasty "Do you really want to send this form again?" message.

    It's recommended that you send 303 (See Other) or 302 (Found). 301 is saying that this resource has been relocated permanently.