Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When a user hits my SSL/TLS only server at port 80, should I advertise Upgrade Required (426) or redirect with Moved Permanently (301)?

What are the drawbacks and benefits of each approach?

As far as I can tell, all modern browsers support TLS upgrades. However, I see that w3m, lynx, etc, don't; neither do curl, wget, and various robots.

share|improve this question
    
Are you talking about what happens when a user hits the server via unencrypted HTTP? –  BenGC Jul 13 '11 at 1:14
    
Yes, I'll update the question. –  psilva Jul 13 '11 at 1:15

1 Answer 1

up vote 6 down vote accepted

It looks like a 426 should only be thrown if you actually tried negotiating for TLS and it failed. Because the user only used HTTP, we don't yet know their SSL capabilities so what you would want to do is 301 the user to HTTPS, and then if they are unable to handle TLS, you throw a 426.

share|improve this answer

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.