Server Fault is a question and answer site for system and network administrators. 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

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
up vote 7 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


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.