What HTTP code to return for wrong protocol
http, http-status-codes
Solution
It think you are looking for: 403 Forbidden (at least this one I would opt for)
The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. If the server does not wish to make this information available to the client, the status code 404 (Not Found) can be used instead
Problem
I'm wanting to return a HTTP code for a user that hits HTTP on a HTTPS only domain or vice versa. Which HTTP Code would be suited for this? I don't want to redirect to the correct protocol as it would promote bad/insecure links and my server setup doesn't allow me to disable the protocol on the domains. I'm thinking 400, 403, 406, or 500.