4

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.

  • 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
7

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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