Skip to main content

NEL

ResponseActive

NEL (Network Error Logging) configures the browser to report network-level errors – DNS failures, TCP connection errors, TLS handshake failures, and HTTP protocol errors – to a reporting endpoint. Unlike CSP violation reports which cover application-layer issues, NEL captures transport-layer failures that no server-side logging can see (since they happen before the request reaches the server).

NEL: {"report_to": "<group>", "max_age": <seconds>, "include_subdomains": <bool>, "failure_fraction": <float>}

Description

NEL is configured as a JSON policy in the NEL response header. The browser stores this policy and uses it to report network errors to the URL specified in the Report-To header. Parameters include max_age (policy lifetime), include_subdomains, and success_fraction (sampling rate for successful requests). NEL is particularly valuable for diagnosing CDN and ISP issues that affect real users but are invisible to origin server logs.

Examples

Enable NEL
http
NEL: {"report_to": "default", "max_age": 86400, "include_subdomains": true, "failure_fraction": 1.0}
Report-To: {"group": "default", "max_age": 86400, "endpoints": [{"url": "https://reports.example.com/nel"}]}

Related

Specification

W3C Network Error LoggingNEL specification →