How Do You Troubleshoot the Error Message “Client sent an HTTP request to an HTTPS server”?

Problem scenario
You run curl commands, but you keep getting this error "Client sent an HTTP request to an HTTPS server." What should you do?

Possible Solution #1
Use https instead of http. See this for more information.

Possible Solution #2
The "problem" is not actually a problem or a true error message. Some web servers have nothing but this as text. This is a sign that the web server is working correctly and the curl command was successful.

Possible Solution #3
Are you using Caddy and Nginx Proxy Manager? Can you not use Caddy and Nginx Proxy Manager (per https://vaultwarden.discourse.group/t/i-get-a-client-sent-an-http-request-to-an-https-server-error-on-all-pages/2296) at the same time?

Possible Solution #4
Are you using Go instead of just curl? If so, see https://github.com/golang/go/issues/49310

Leave a comment

Your email address will not be published. Required fields are marked *