Network Error Logging (NEL)
Why NEL Is Important
Traditional monitoring only shows requests that reach your server. If a user cannot connect due to a DNS failure, TLS error, or network timeout, your server never knows. NEL fills this gap by having the browser report these failures to a collector endpoint.
NEL is particularly valuable for detecting DNS hijacking, BGP routing issues, CDN configuration errors, and certificate problems that affect specific users or regions. A spike in NEL reports from a particular ISP or region can indicate a localized DNS issue or network attack.
NEL works with the Reporting API (Report-To header) to define where reports are sent. Reports include the error type, server IP, protocol, elapsed time, and other diagnostic information. Services like Cloudflare, Sentry, and dedicated NEL aggregators can collect and analyze these reports.
Checking Your Setup
A security audit may check for NEL header presence. To enable NEL, configure the NEL and Report-To headers specifying a reporting endpoint. Monitor the collected reports for unusual patterns that might indicate DNS issues or network-level attacks.