Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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
2  
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
add comment

3 Answers

up vote 1 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
add comment

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

share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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.