Dev4Press No Script

Network Error Logging

Network Error Reporting (or NEL for short) is experimental security header, currently supported by Google Chrome browser, and other browsers based on the Chromium (Brave, Vivaldi, Edge, Opera…). The purpose of this header is to allow browser to send reports related to network connectivity or issues when trying to browse your website.

There are two types of reports that can be sent: Network Error and Network Success. When it comes to Success, it is not recommended to have these reported, because it will flood the reports with every successful network request for any file on your website. And, you don’t really need to have those reports. Error reports are what is actually useful to have and know about.

To learn about NEL, check out this great article on Scott Helme’s website: Network Error Logging: Deep Dive.

NEL Reports Panel

If the NEL feature is active, and the logging is handled by the coreSecurity Pro, a new panel will be added with the list of all NEL reports logged by the plugin.

To see the new panel, and learn more about it, check out NEL Reports article.

NEL Settings

This feature settings follow similar pattern as other headers related features. The first option is to decide on having the header use .HTACCESS or direct method for adding it to the page.

Settings to enable logging include option to enable it, and specify the URL for reports. This URL should be empty if you want coreSecurity Pro to track these reports, or if you plan to use third party service for reports tracking, here you need to insert the URL for that reports services.

Main NEL Header Rules
Main NEL Header Rules

But, the most important thing here is setting the header rules for NEL. There are basic rules to specify the age for the header (relevant to browsers caching), and including of the subdomains for the reporting. This option is highly recommended, if you use multisite network with subdomains configuration, or you have CDN on the subdomain.

Advanced rules are very interesting, and they are used to configure the frequency of NEL reports delivery.

Failure Fraction

Default value for this option is 100% (or 1.0). That means that every error is going to be reported. This can be huge number of repeated issues, so, you can specify the percentage of errors to deliver, with 50% being default value set by the plugin. If you set this value to 0, that means that no reports will be delivered.

Success Fraction

Default value for this option is 0% (or 0.0). That means that no success reports are going to be reported, and that is how it should stay for most cases. If you set this to 100% (or 1.0), every successful report will be delivered, and that is going to be a huge number of reports you don’t need.

It is highly recommended to keep this value at 0!!!

NEL Report Types

Currently, NEL reports various types of errors, and they can be split into several groups, and each of these has multiple error types:

  • DNS: related to the domain name resolving issues and DNS server issues.
  • TCP: related to the transmission control protocol issues with connectivity to the website.
  • TLS: related to the issues with the TLS/SSL and cipher problems during communication.
  • HTTP: related to the issues with server errors (4xx and 5xx), redirections and more.

Additionally, there are report types dealing with Unknown errors and Abandoned requests.

Rate this article

You are not allowed to rate this post.

Leave a Comment