Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On a shop website, when "Pay now" is clicked we perform a header redirection to the same URL, just an SSL secured https version.

In such a common scenario, should we use a permanent (301), a temporary (302) or any other status code? Somehow, neither permanent nor temporary feels right (though I guess the latter will be more appropriate).

share|improve this question
Huzzah - 3 conflicting answers (and counting?)... – Mike Hudson Nov 21 '11 at 5:58
Interesting. I thought there would be some kind of a standard. – Olaf Nov 21 '11 at 9:09
up vote 2 down vote accepted

For more information on response codes, see: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html (or http://urivalet.com/reason-phrases/ for a summary).

To answer your question, and to allay the issues with the 303 response (that some clients don't understand it), you would be safer to stick with a 302.

share|improve this answer
I found the 302 most convincing. Thanks. – Olaf Dec 1 '11 at 14:17

A 303 See Other may be the most appropriate in this scenario.

share|improve this answer

If you are always redirecting to the SSL site, then a 301 would fit … but you might as well just change the URL you link to instead of redirecting.

share|improve this answer
Can't do that, for various reasons the redirect must happen from code. – Olaf Nov 21 '11 at 9:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.