The 511 status code indicates that the client needs to authenticate to gain network access.
The response representation SHOULD contain a link to a resource that allows the user to submit credentials (e.g., with an HTML form).
Note that the 511 response SHOULD NOT contain a challenge or the login interface itself, because browsers would show the login interface as being associated with the originally requested URL, which may cause confusion.
The 511 status SHOULD NOT be generated by origin servers; it is intended for use by intercepting proxies that are interposed as a means of controlling access to the network.
This is part of the expanded “Additional HTTP Status Codes” as defined in RFC 6585.
This is basically the thing with hotel wifi where it blocks your access to the network until you put in a room code.
511
responses MUST NOT be cached.