Server Error
511

Network Authentication Required

The client needs to authenticate to gain network access, typically through a captive portal or WiFi login page.

# Quick Definition

The 511 Network Authentication Required status code indicates that the client needs to authenticate to gain network access. This is not an error from the target web server but from the network itself -- typically a captive portal that intercepts HTTP requests before the user has logged in to the WiFi network or accepted terms of service.

# When Does a 511 Error Occur?

A 511 response is generated by network infrastructure (not the destination server) when a user connects to a network that requires authentication before granting internet access. This is the standard behavior of captive portals found in hotels, airports, coffee shops, hospitals, and corporate guest networks.

When you connect to such a network and try to access any website, the network gateway intercepts your request and returns a 511 response with a login page. Once you complete the authentication (accepting terms, entering a password, or providing payment), the gateway allows your traffic through to the actual internet. Defined in RFC 6585, the 511 was created to distinguish captive portal interception from actual server errors.

# Common Causes

# How to Fix a 511 Error

  1. Open a browser and visit an HTTP site -- Navigate to http://neverssl.com or http://captive.apple.com. HTTPS sites may not trigger the captive portal redirect correctly. The login page should appear automatically.
  2. Complete the captive portal login -- Accept the terms of service, enter your credentials, room number, or complete whatever authentication the network requires.
  3. Check for automatic portal detection -- [iOS/macOS] A captive portal window usually appears automatically. [Android] Tap the "Sign in to network" notification. [Windows] Look for a "network action needed" prompt.
  4. Flush your DNS cache -- [Windows] Run ipconfig /flushdns in Command Prompt. [macOS] Run sudo dscacheutil -flushcache in Terminal. [Linux] Run sudo systemd-resolve --flush-caches.
  5. Forget and reconnect to the network -- In your WiFi settings, forget the network and reconnect from scratch. This often resets the captive portal state and triggers the login page again.
  6. Try a different browser or incognito mode -- Sometimes browser extensions, ad blockers, or cached DNS entries interfere with captive portal detection. Try an incognito/private window.

# HTTP Example

Request
GET / HTTP/1.1
Host: example.com
Response (from network gateway)
HTTP/1.1 511 Network Authentication Required
Content-Type: text/html

<html>
<head><title>Network Login Required</title></head>
<body>
  <h1>Welcome to Airport WiFi</h1>
  <p>Please <a href="https://portal.airport.com/login">log in</a>
     to access the internet.</p>
</body>
</html>

# Related Status Codes

# Frequently Asked Questions

What is a captive portal?+
A captive portal is a web page that is displayed to newly connected users before they are granted broader access to the network. You typically encounter them when connecting to public WiFi at hotels, airports, coffee shops, or corporate guest networks. The portal may ask you to accept terms of service, enter a password, provide an email address, or make a payment before granting internet access.
Why do I see 511 errors on my phone?+
If you see 511 errors on your phone, it usually means you are connected to a WiFi network that requires authentication (like a hotel or coffee shop WiFi) but you haven't completed the login process. Open your phone's browser and try navigating to any HTTP website -- the captive portal login page should appear. On iOS, the captive portal detection usually triggers automatically.
Is the 511 error from the web server?+
No, the 511 status code is not generated by the web server you are trying to reach. It is generated by the network infrastructure (router, gateway, or captive portal device) that sits between you and the internet. The network intercepts your HTTP request and returns 511 to inform you that authentication is required before your request can pass through to the actual server.

Get alerted before your users notice

Monitor your endpoints 24/7 and catch connectivity issues before they impact your users.

Start Free Monitoring